Micro Focus QTP (UFT) Forums
Access not saved excel file - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Access not saved excel file (/Thread-Access-not-saved-excel-file)



Access not saved excel file - randhirsinghskhn - 09-04-2018

I want to access the cell values present in an excel file which is not saved.
An already opened excel file having some values.

I wrote below code:


Code:
set excl=getobject("","excel.application")
set worksheet1= excl.ActiveSheet
for each cell in worksheet1.usedrange
msgbox cell.value
next


but in 3rd row I am getting error of object required Worksheet1

Kindly help