Forum Discussion

shubhimu's avatar
shubhimu
Contributor
7 years ago

Is it possible to read multiple sheets of any workbook using the single datasource in ready api ?

Hi,

 

In ready api, we have provision to add data source and their we can select data source option from the drop down. Lets say i selected excel as an data source and add my excel sheet. I am able to add and successfully run the excel data source data and that too with out coding.

 

Is it possible to read multiple sheets of any workbook using the single data-source in ready api ?

 

Kindly let me know the steps for the same. 

 

Thanks,

Himanshu

 

 

  • Lucian's avatar
    Lucian
    Community Hero

    Hi,

     

     

    When you create an excel datasource you are prompted to select a worksheet so I don't think reading multiple worksheets using a single DataSource step is feasible without coding.

     

    But why do you want to do it using a single datasource step anyways?

    • shubhimu's avatar
      shubhimu
      Contributor

      Hi,

       

      Thanks for the reply. Actually our objective is to design a framework with minimum coding so that non technical person can also understand it easily.

       

      Although using POI i am able to achieve my purpose but if we can achieve this with out coding or minimum coding then that would be of great help.

       

      Thanks,

      Himanshu

      • groovyguy's avatar
        groovyguy
        Community Hero

        While you cannot do this with a single Data Source, you can use multiple ones and if you set it up right, a Data Source Loop can ensure you are refreshing each one on a new pass. 

  • Hi shubhimu

     

    You have to specify Worksheet Name and it will be same for 1 Data Source, if you want to get Data from different sheets then you need to add multiple datasource.

     

    My suggestion will be write a simple groovy code of around 10 lines to read data from excel sheet.

     

    look at the screenshot: