Prepare for your Next Interview
This is a discussion on Is there any limit to number of columns in excel file, when reading it from script? within the WinRunner forums, part of the Software Testing category; Hi..! Please help,I am not facing this issue. When i use a ddt_get_parameters(tableName,parametersList,numberOfParameters), i am not able to read the table's column after column 'BK'. ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
Is there any limit to number of columns in excel file, when reading it from script?
Hi..!
Please help,I am not facing this issue. When i use a ddt_get_parameters(tableName,parametersList,numberOfParameters), i am not able to read the table's column after column 'BK'. is there any limit on the columns that this method can read from an excel sheet?? Thanks,.,! |
| Sponsored Links |
|
|||
|
Re: Is there any limit to number of columns in excel file, when reading it from scrip
Hi Sandeep,
There is no limit as such to the number of columns that can be read. Do you get any error message on executing dddt_get_parameters. Also ensure that after BK there is no blank column in the Excel file. Incase there is a limit, WR should return a error code either stating "E_MAX_COLUMNS_EXCEEDED" error number -10045 or "E_NOT_PARAMETER". do let me know about the details.... Cheers....
__________________
Regards, V.Umesh Krishnan QA Consultant |
|
|||
|
Re: Is there any limit to number of columns in excel file, when reading it from scrip
HI..!
thanks for the reply, Here is my full code. public function Read_From_File(in dTable,in rowStart,in rowEnd) { #Section : Variables Declaration auto sParamList; #string-Stores the list of parameters in the datatable auto sKeyWord; #string-hold the keyword after the substring operation. auto nParamNumber; #numeric- To hold the number of parameters in the data table auto aFields[]; #array-To hold the fields and the keywords defined as parameters in the datatable auto sData; #String that holds the string retreived from the data table auto table_RowCount; auto enum; #ddt_open(dTable,0); rc = ddt_open(dTable, DDT_MODE_READ); ddt_get_parameters(dTable,sParamList,nParamNumber); split(sParamList,aFields," "); # the separator is a tab ddt_get_row_count(dTable,table_RowCount); for(table_Row=1; table_Row <= table_RowCount ; table_Row ++) { ddt_set_row(dTable,table_Row); report_msg("Checking Row With Row.No: " & table_Row); for(enum = 2; enum <= nParamNumber; enum++)#reading only from column 2. { sKeyWord = substr(aFields[enum],1,7);#getting the the current column header. sData=ddt_val(dTable,aFields[enum]);#getting the value of the cell of current row and column. switch(sKeyWord)#depending on header, ill perform some actions. { case "BtnPrss": button_press(sData); break; case "evalfnc": eval(sData); break; .....Many more cases. I am calling this function from main script like this. Read_From_File("C:\myFolder\sheet1",1,5); and in sheet1, i am calling the same function again in the header evalfnc, like,cell value = Read_From_File("C:\myFolder\sheet2",10,15); in sheet 2. Here i am facing this problem, I can read all the column headers from sheet1,(no limit.) but inside sheet2,i can read only till column 'BK'. I am not able to figure out why i am not able to read the headers after the column. Does it have anything to do with calling the same function within the function?? |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Datatable: Creation, Writing and Reading the values from Excel Sheet | ravisuriya | QTP | 3 | 02-29-2008 11:41 AM |
| Read excel values into script without opening excel | nemishdmehta | QTP | 1 | 02-11-2008 07:19 AM |
| Run sample graph reading a file | sheker2007 | Data Warehousing | 2 | 09-25-2007 02:59 PM |
| reading data from excel sheet in QTP | JobHelper | QTP | 4 | 09-11-2007 07:33 AM |
| Reading a TSR file | JobHelper | QTP | 1 | 07-27-2007 07:33 AM |