Wrong count for UsedRange rows and columns in datatable. - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Wrong count for UsedRange rows and columns in datatable. (/Thread-Wrong-count-for-UsedRange-rows-and-columns-in-datatable) |
Wrong count for UsedRange rows and columns in datatable. - qtpexpert - 06-19-2012 Hi guys, I have a problem in exporting the testcasefile to other sheet in Datatable Issue is: In Datatable 3 sheets(Global,Subdriver,Report)are there. When i execute the script qtp will import the testcase file to 'subdriver' sheet. here it is taking correct used range row numbers and column numbers. Before execution I formatted testcasefile. After execution qtp will export this 'subdriver' sheet to 'Report' sheet, and it will write pass fail column then it will create a testReport file in one specific folder. after that it will take the used range row numbers and column numbers for setting the colors for pass,Fail values.But it is giving wrong number of rows and columns. Example: TestReport file having 10 rows,9 columns.But it is giving 256 columns and 65563 rows. due to this reason during script execution it is not coming out from the loop. I am using below mentioned code. Code: Public Function fnResColor(testReport) How can we improve the performance? If anyone knows the solution pls reply. Thanks in advance! RE: Wrong count for UsedRange rows and columns in datatable. - SteveS - 06-20-2012 Is your TestReport file saved as an xlsx file, if so try saving it as an xls file instead. RE: Wrong count for UsedRange rows and columns in datatable. - qtpexpert - 06-20-2012 Thanks for your solution. My testcase file is xls file and TestReport file also saved as xls file. pls reply if you have any other solution. |