Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Export WebElement value to Excel
#1
Solved: 10 Years, 9 Months ago
Hello everyone I am trying to export the innertext value of webelement value to the excel sheet.I was able to get it in the msgbox but not in excel.help...!!!
Reply
#2
Solved: 10 Years, 9 Months ago
Hi,
Please see the code below for your reference
Code:
strText=Browser(...).Page(...).getRoproperty(....)
'Create Excel app
Set objAppExcel=CreateObject("Excel.Application")
objAppExcel.visible=True
'Open the worksbook
objAppExcel.workbooks.open "D:\Test.xls"
'Set focus on the workbook
objAppExcel.Workbooks("Test.xls").Activate
'Create work sheet obj
Set objExcelSheet=objAppExcel.ActiveWorkbook.Worksheets(1)
'Write to work sheet
objExcelSheet.cells(1,1)=strText
'Save worksheet
objExcelSheet.saveAs "D:\Test.xls"
'Clear  obj reference
Set objExcelSheet=Nothing
'quit app
objAppExcel.quit
Set objAppExcel=Nothing

Regards,
Ravi
Reply
#3
Solved: 10 Years, 9 Months ago
Thanks a lot,,it worked
Reply


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,331 04-14-2019, 05:18 PM
Last Post: mounika6677
Exclamation WebElement("WebElement").Click is not working sia sharma 7 23,210 09-28-2016, 08:58 PM
Last Post: supputuri
  Export data shayk1985 3 3,102 05-18-2013, 09:40 AM
Last Post: venugqtp
  export function is not working diya 1 2,314 12-18-2012, 11:07 AM
Last Post: Ankesh
  Importdata and Export results shayk1985 1 2,160 12-17-2012, 12:26 PM
Last Post: udayanem

Forum Jump:


Users browsing this thread: 1 Guest(s)