Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to write a data in excel file
#6
Solved: 10 Years, 8 Months, 4 Weeks ago
Hi, i think this will help you.
Append the row and write again

Code:
Dim fso
Set fso=CreateObject("Excel.Application")
fso.visible=true
Set excel_obj=fso.workbooks.open("D:\BookingResults\test1.xls")
Set obj_worksheet=excel_obj.worksheets(1)
cell_address=obj_worksheet.UsedRange.Address
add_array1=split(cell_address,":",-1,0)
add_array=Split(add_array1(1),"$",-1,0)
row=add_array(2)+1
col=add_array(1)
obj_worksheet.cells(row,col).activate
obj_worksheet.cells(row,col).value="Hi"

Correct me if wrong.

Regards,
Sankalp
Reply


Messages In This Thread
RE: How to write a data in excel file - by vIns - 06-07-2011, 06:43 PM
RE: How to write a data in excel file - by Arul - 08-20-2011, 08:01 PM
RE: How to write a data in excel file - by Ankesh - 08-23-2011, 07:00 PM
RE: How to write a data in excel file - by sshukla12 - 08-24-2011, 10:29 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to export the output value of a webedit object to a new excel file. mounika6677 1 1,324 04-14-2019, 05:18 PM
Last Post: mounika6677
  Access not saved excel file randhirsinghskhn 0 925 09-04-2018, 07:26 AM
Last Post: randhirsinghskhn
  Want to read the data from excel and set read value in the JavaTable rajeevk7 0 2,162 07-10-2017, 04:20 PM
Last Post: rajeevk7
  dtLocalSheet empty even though excel file contains data cantorre 2 2,203 05-10-2017, 12:47 PM
Last Post: vidhi
  Reading data from excel sheet serenediva 1 8,780 03-03-2017, 10:07 AM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 2 Guest(s)