After .AddParameter, my datatable row count is huge!!
Question ID: 105408
1
0

We’re importing an Excel worksheet into a QTP datatable and that works fine.
After importing, adding a datatable parameter causes the row count to be 65536??

DataTable.ImportSheet spreadsheetLocaion , 1, "DataFile"
dataFileCount = DataTable.GetSheet("DataFile").GetRowCount ‘Returns 1
DataTable.GetSheet("DataFile").AddParameter "STATUS", ""
dataFileCount = DataTable.GetSheet("DataFile").GetRowCount ‘Returns 65536???

This really screws up our tests. What do we do?

Marked as spam
Posted by (Questions: 387, Answers: 66)
Asked on May 2, 2014 4:27 pm
47 views
Answers (1)
1
Private answer

This is a known issue. Here's a workaround for it:

1. Change Font Color to be Automatic:
2. Excel 2007 or higher > Home Tab > ''Styles'' Group > Cell Styles
3. Right Mouse click on ''Normal'' style > Modify
4. Click ''Format'' > ''Font'' tab
5. Choose ''Color'' > ''Automatic''
6. Save the XLS file.

Remember that the DataTable is NOT an Excel spreadsheet and does not accept all of the formatting and formulas that Excel does. Here's some links that will help clean formatting:

[http://eyeontesting.com/questions/2750/hp-run-results-viewer-message-cant-create-data-tab.html][1]

[http://eyeontesting.com/questions/3142/problem-with-qtp-11-run-results-viewer-1.html][2]

[1]: http://eyeontesting.com/questions/2750/hp-run-results-viewer-message-cant-create-data-tab.html
[2]: http://eyeontesting.com/questions/3142/problem-with-qtp-11-run-results-viewer-1.html

Marked as spam
Posted by (Questions: 17, Answers: 807)
Answered on May 2, 2014 4:30 pm
0
That worked great! Thanks so much!
( at May 2, 2014 4:30 pm)
EyeOnTesting

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

X
Scroll to Top