LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  How to select specified excel sheet (by alias), not sheet1

    Employee
    Posted 10-17-2013 02:15

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: RobG

    Hi All,
    As a newbie to Lavastorm, I'm having a problem in just selecting a single named sheet from my Excel data source. Sheet1$ appears to be selected automatically. Is there a way to specify where my data actually is?
    Thanks in Advance.


  • 2.  RE: How to select specified excel sheet (by alias), not sheet1

    Employee
    Posted 10-17-2013 10:14

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ltolleson

    By default the Excel Acquisition node reads the first sheet starting in cell A1 into the first output of the node.

    If you want to read in more than 1 sheet from an Excel file you can simply add additional output pins to the Excel node and the sheets are read in order as they occur in the file. If there are more sheets in the file than output pins, then you will only get the output for the first N number of sheets. The input and output pin management is located under the IO tab.

    If you only want to read 1 sheet and it is not the first sheet, then you will need to proved a WorkbookSpec. This parameter is located under the Optional tab. The WorkbookSpecExample parameter provides examples of different ways to interact and retrieve data from an Excel file.

    Here are some different WorkbookSpec examples...

    # Get the data from a sheet named MyFirstSheet. Header in row 1 column A, and data starting on row 2.
    <workbook>
    <sheet name="MyFirstShee"/>
    </workbook>


    # Get data from the third sheet. Header in row 1 column A, and data starting on row 2.
    <workbook>
    <sheet index="3" />
    </workbook>


    # Get data from the second sheet. Header in row 5 column A, and data starting on row 8
    <workbook>
    <sheet index="2" headerRow="5" dataStartRow="8" />
    </workbook>


    # Get data from the second sheet. ONLY pull in the fields named Product and Description. Header in row 1 column A, and data starting on row 2.
    <workbook>
    <sheet index="2">
    <field name="Product" />
    <field name="Description" />
    </sheet>
    </workbook>