Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
My objectif is to extract a refresh date from excel file
the problem is that this column is dynamic (date of the refresh of the excel file)
thiis is my code
Temp_Table:
LOAD
"Last Refresh Date : 9/9/2021 2:07:25 PM"
FROM [lib://CNX]
(ooxml, embedded labels, table is tabme1);
Let vVar22 = FieldName(1 ,'Temp_Table');
Table2:
load *,
if ('$(vVar22)' like 'Last Refresh Date*', '$(vVar22)' ) as Last_refresh_t
resident Temp_Table;
Table3:
load * ,
left(subfield(Last_refresh_t,':',2),9) as Last_refresh
resident Table2;
drop table Temp_Table;
drop table Table2;
The problem when i will load the first table the field in red will change every date because it is the refresh date
So what do you think ? what i should do to extract this date dynamicly
Thanks
Right now you are loading the Excel with embedded label, but instead try with no label
(ooxml, embedded labels, table is tabme1);
If you don't know the column name, but know the column index you can load link below. If you only want the first row, you can add "First 1"
First 1
LOAD
A as ReloadDate
FROM
[xlsx.xlsx]
(ooxml, no labels, table is Sheet1);
Right now you are loading the Excel with embedded label, but instead try with no label
(ooxml, embedded labels, table is tabme1);
Thanks for answer ,
the problem when i do this it gives me the a list of all the data in the same column but me i need only this :
"Last Refresh Date : 9/9/2021 2:07:25 PM" to retrieve the date (tomorrow it will be 15/9/2021 etc..
Regards
If you don't know the column name, but know the column index you can load link below. If you only want the first row, you can add "First 1"
First 1
LOAD
A as ReloadDate
FROM
[xlsx.xlsx]
(ooxml, no labels, table is Sheet1);
You can just do Where RecNo() = 1 to just extract the first row from the data