Quality Testing

Quality is delighting customers

Hello Guys,

please help me

I merged two files by specified condition and saved it as new file (File4.xls).

Then I import it  and get this message:

"The DataTable.Import (file) operation failed. Invalid file.

Line (118): "DataTable.Import  sFile4".


File4.xls was correctly created and saved. If somebody met this problem?


 sFile4 = "Q:\LK\File4.xls"
 DataTable.Import  sFile4               ' this line stopped my execution
 iNumRows = DataTable.GetSheet(sSheet).GetRowCount  


Thank you.


Views: 905


Reply to This

Replies to This Discussion

two things observe here
1. which format you are using when you saved the file. Unable to open file4.xls
2. You did not mention the sheet name in the path. you have to give sheet name also. If you have only one sheet in the file then no need to mention sheet name.

Once try with sheet name
try with this
DataTable.ImportSheet "C:\name.xls" ,1 ,"name"

Here '1' means, it will take 'sheet1'. You can mention the sheet name also
simple thing always give file extension .xls whenever u r importing an excel sheet

Line (118): "DataTable.Import sFile4.xls".


TTWT Magazine





© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service