Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

LOAD WITH LOOP

Good day gentlemen!

It's been a few hours I'm trying to solve this problem, however I am unable to hold a LOOP, with 3 tables that I read.

I used the following command:

FOR Each v_maquina in "02","08","12"

Log:

LOAD [Hora Início],

     [Hora Fim],

     [Qtd. Horas],

     [Cod. Apontamento],

     [Desc. Apontamento],

     Turno,

     Operador,

     [Nro. Ordem],

     [Descrição OP],

     [Qtd. Produzida],

     [Desperdício Acerto],

     [Desperdício Virando],

     Atividade,

     Processo,

     Elemento,

     [Cod. Recurso],

     [Peso Médio (g)],

     Observações

FROM

(ooxml, embedded labels, table is Sheet1);

NEXT v_maquina

What is wrong with the command?

Please find attached the 3 tables, I'm trying to read.

I appreciate if someone can help me.

Thank you!

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Use single quotes:

FOR Each v_maquina in '02','08','12'

load * FROM [LOG_K$(v_maquina).xlsx]

(ooxml, embedded labels, table is Sheet1);

next


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Anonymous
Not applicable
Author

first of all remove quotes around the numbers...that should fix the issue. please see attached QVW file..

Gysbert_Wassenaar

Use single quotes:

FOR Each v_maquina in '02','08','12'

load * FROM [LOG_K$(v_maquina).xlsx]

(ooxml, embedded labels, table is Sheet1);

next


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Hi Vinay !

Thanks for writing, your answer helped me a lot.

Thanks again.

hugs.

Anonymous
Not applicable
Author

Hi Gysbert !

Thanks for helped me.

Now the script is working.

hugs.