Results 1 to 3 of 3

Thread: Is there any limit to number of columns in excel file, when reading it from script?

  1. #1
    Junior Member
    Join Date
    Feb 2008
    Answers
    7

    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,.,!


  2. #2
    Expert Member
    Join Date
    Oct 2007
    Answers
    375

    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....


  3. #3
    Junior Member
    Join Date
    Feb 2008
    Answers
    7

    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??


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact