In my application at the end of my test I'll get a number which I need to capture. Each time when I run the script it'll generate different number. How can I capture the number(in text form) and export that in to an excel sheet. Using the following code I am able to export only one number(always) but when I trying to export different number I am getting an error message 'Object not found'

x=Browser("").Page("").We bElement("").Getroproperty("text")

Datatable.Importsheet "Path of Xl file",1,1
Datatable.Value("colname",1) = x
Datatable.Exportsheet "Path of xl file",1