Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sagaraperera
Creator
Creator

ALL FILE ATTACHED

Dear All

I have number of files with same content but in different name. normally i import files to one by one. as given below

LOAD BCOD,

     Category,

     Description,

     FR,

     HH,

     TC,

     MS,

     SS,

     SI,

     MR,

     TT,

     PP,

     EN,

     MW,

     MC,

     M3,

     M4

    FROM

\\10.10.1.252\central_accounts_budget\Product_P&L_Dec16\01EXP.xls

(biff, embedded labels, table is HO$);

LOAD BCOD,

     Category,

     Description,

     FR,

     HH,

     TC,

     MS,

     SS,

     SI,

     MR,

     TT,

     PP,

     EN,

     MW,

     MC,

     M3,

     M4

    FROM

\\10.10.1.252\central_accounts_budget\Product_P&L_Dec16\02EXP.xls

(biff, embedded labels, table is HO$);

is there any possibility to import all the all files i want to script at ones without copy & paste one by one.

sagara

4 Replies
devarasu07
Master II
Master II

hector_munoz
Specialist
Specialist

Hi SANKA PERERA,

There are two possible ways:

  • Using a mask in the FROM statemet:

LOAD Fecha,

     Horas,

     Cliente,

     [Tipo Tarea],

     [Cod. Incidencia],

     [Pertenece a QV],

     Detalles

FROM [.\HORAS\Horas_Semanales_????????_HMM.xlsx] (ooxml, embedded labels, table is Hoja1);

  • Using a FOR EACH loop as the following way:

FOR EACH vsFile IN FileList('.\HORAS\Horas_Semanales_????????_HMM.xlsx')

  LOAD Fecha,

       Horas,

       Cliente,

       [Tipo Tarea],

       [Cod. Incidencia],

       [Pertenece a QV],

       Detalles

  FROM $(vsFile) (ooxml, embedded labels, table is Hoja1);

NEXT

I hope it helps you.

Regards,
H

beck_bakytbek
Master
Master

vinieme12
Champion III
Champion III

try below,This is all you need

LOAD BCOD,

    Category,

    Description,

    FR,

    HH,

    TC,

    MS,

    SS,

    SI,

    MR,

    TT,

    PP,

    EN,

    MW,

    MC,

    M3,

    M4

    FROM

\\10.10.1.252\central_accounts_budget\Product_P&L_Dec16\*.xls

(biff, embedded labels, table is HO$);



Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.