Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
holguinmora
Contributor III
Contributor III

Create and Insert a Variable

Hi to all

On the next lines a variable that I´m trying to create and insert a variable to get all the tables in a HTML file. 

The value on field "Hojas" is 5 that equals the number of tables in file:  

FROM [lib://Dropbox - alejandro@inflexion.com.co/PruebasHojas/Job REPORTE DE VENTAS, Step 1.htm]

Script:

LOAD
Hojas
FROM [lib://NumeroHojas]
(html, codepage is 28591, embedded labels, table is @1);

let vprueba= Hojas;
drop Table;

For VHojas = 1 to $vprueba;

LOAD
*
FROM [lib://Dropbox - alejandro@inflexion.com.co/PruebasHojas/Job REPORTE DE VENTAS, Step 1.htm]
(html, codepage is 708, embedded labels, table is [$(VHojas)$]);

And I get the next error:

Captura de Pantalla 2019-08-18 a la(s) 9.51.42 a. m..png

 

Labels (2)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

Try to define your variable like this:

let vprueba= peek('Hojas',-1,'YourTable');

It will fetch the value of Hojas on the last row in a table called YourTable. Adjust the table name to fit your data.

View solution in original post

2 Replies
Vegar
MVP
MVP

Try to define your variable like this:

let vprueba= peek('Hojas',-1,'YourTable');

It will fetch the value of Hojas on the last row in a table called YourTable. Adjust the table name to fit your data.

holguinmora
Contributor III
Contributor III
Author

It worked perfectly!!!

Thank You very much!!