Importing Excel into UFT always goes to GlobalSheet
Question ID: 108517

Using the below code I am trying to import an Excel spreadsheet into UFT datatable. My Excel spreadsheet only has one worksheet called "TestData". Only thing is, instead of importing into the DataTable sheet called "TestData", it always goes into the GlobalSheet instead of my TestData sheet. How can I fix this?

Datatable.Importsheet (TestDataFile),"TestData", 1

Marked as spam
Posted by (Questions: 386, Answers: 64)
Asked on July 24, 2018 8:34 pm
Answers (1)
Private answer

DataTable and Excel sheet indexes begin with 1, so if you use 1 as the index of the DataTable sheet, as your code shows, then it will always import into the GlobalSheet. The GlobalSheet is always present in a UFT GUI test and will always be index of 1. To change the sheet that the imported data goes into, either use the sheet name or a different index.

You can find this and other related information in the [UFT Help Center][1].


Marked as spam
Posted by (Questions: 16, Answers: 807)
Answered on July 24, 2018 8:35 pm
Ok, I guess I didn't take the indexing into account. Thanks!
( at July 24, 2018 8:36 pm)

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

Scroll to Top