6 Replies Latest reply: Dec 16, 2015 2:18 AM by Ariel Klien RSS

    Dynamic Fields Name In Excel

    Ariel Klien

      Hello All Experts,


      I have 2 Excels Files:

      1) Fields Names

      2) Data


      i attached for example


      today i'm doing this code:



      LOAD A

      FROM [field Name.xlsx] (ooxml, no labels, table is Sheet1);


      for i=1 to NoOfRows('FieldName')

             let vName$(i)=Peek('A',i-1,'FieldName');

      next i;



      LOAD A as '$(vName1)',

                B as '$(vName2)',

                C as '$(vName3)',

                D as '$(vName4)'

      FROM Data.xlsx (ooxml, no labels, table is Sheet1);

      drop Table FieldName;


      It is work fine but i need something dynamic.


      If in the excel file i will add another field - i need manually to change the code in the Script.

      I want automatic reload.


      Any Idea?