Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to insert value in notepad from excel
#1
Not Solved Cool 
Hi All,

I am trying to write a script to insert values in excel sheet which has 3 columns in it(ie column1,column2 and column3).After inserting the values need to insert those values in notepad also.

The case is
1. In excel sheet whenever we run the script only one value should be present with the updated value.
2. In notepad for each run of the script there should be separate line of values present (ie for example if we had run the script for 3 times there should be three lines in notepad)
3. The last value in the notepad should be in the excel sheet.Apart from that nothing should be there.

Could any one help me with this would be of great help to me.

Thanks in advance.

Thanks
Thilak
Reply
#2
Not Solved
Hi
1. In excel sheet whenever we run the script only one value should be present with the updated value.
For this you can just say:
' here update i (loop) as you want
Code:
Set objExcel=CreateObject("Excel.Application")
Set objBook=objExcel.WorkBooks.Open(("C:\path\filename1.xls")
Set objSheet=objExcel.Sheets("SheetName1")
For j= 1 To 3
objSheet.Cells(i,j).value="value"
Next
2. In notepad for each run of the script there should be separate line of values present (ie for example if we had run the script for 3 times there should be three lines in notepad)
Code:
Set fso=CreateObject("Scripting.FileSystemObject")
Set filename=fso.OpenTextFile("C:\path\filename1.txt",8,True)
'write the text here
filename.WriteLine "updating the text file"
3. 3rd point is not clear for me.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Fifth word from every thousand line in notepad files. sallu.iet@gmail.com 0 978 01-17-2020, 09:58 AM
Last Post: sallu.iet@gmail.com
  Unable to insert data into datatable Prashanth 1 3,654 05-10-2013, 03:07 PM
Last Post: Saket
  insert call to new action bistritapcv 1 2,606 04-06-2013, 12:09 PM
Last Post: ravi.gajul
  how to insert error msg in a datatable using Dp? zakshah.12 0 2,040 03-05-2013, 07:49 AM
Last Post: zakshah.12
  Copy Data from Notepad jegansurya 3 6,850 07-04-2012, 05:31 PM
Last Post: Shridevi.Salagare

Forum Jump:


Users browsing this thread: 1 Guest(s)