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.  Import Specification Node

    Employee
    Posted 07-02-2013 09:13

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

    Originally posted by: lava

    Hello,
    I have several excel files that will be adding to my graph periodically throughout the year. All the files are going to have the same import specifications.
    My question is: Is there a way to store this specifiaction in a node? It will just save me the time to copy and paste the spec every time a add a new file.
    Thanks for any help.


  • 2.  RE: Import Specification Node

    Employee
    Posted 07-02-2013 09:33

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

    Originally posted by: stonysmith

    I'm not fully aware of what you are needing to do, but it is possible to read ALL of the Excel files with a single node.

    Add a Directory List node to your graph, configure it to find the proper Excel files, then add that as an input to the Excel node.
    On the Excel node, instead of hard-coding a file name.. put 'FileName' into the FileNameExpr parameter.

    The Excel node wil then try to read every excel sheet found by the DirectoryList node.


  • 3.  RE: Import Specification Node

    Employee
    Posted 07-02-2013 10:20

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

    Originally posted by: lava

    stonysmith,
    I did what you said, work great, but I have another issue where my start row is not working. I'm now reading in all the files, but the data start row is not working. I must be missing something. Essentially, all my data starts in cell A8 of every sheet in every file, named CS-Expense. Thank so much.
    <workbook>
    <sheet/>
    <sheet name="CS-Expense" dataStartRow="8" >
    <field name="Expense Id"/>
    <field name="Emp Id"/>
    <field name="Flight Destination"/>
    </sheet>
    <generatedFields>
    <field type="filename" />
    <field type="sheet" name="SheetInFile" />
    <field type="row" name="RecordNumber"/>
    </generatedFields>
    </workbook>


  • 4.  RE: Import Specification Node

    Employee
    Posted 07-02-2013 10:39

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

    Originally posted by: stonysmith

    If you are only trying to read a single sheet from each workbook, then remove the second line above "<sheet/>" That, with the other <sheet tag is trying to read TWO sheets from each workbook.


  • 5.  RE: Import Specification Node

    Employee
    Posted 07-02-2013 10:45

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

    Originally posted by: lava

    Excellent. Thanks so much. I'm new to Brainscript so its the little things that tie me up.

    I'm all set now. Thank You