Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have to files : Release 1 , Release 2 (xlsx) in folder
When I write vFileYear =1 or vFileYear = 2 it works , but when I try : vFileYear = Trim(Right(Left(file, 9), 1))
it's not working. any suggestion ?
LET vFilePath = 'lib://Folder_Planning_Control/Release';
FOR EACH file in FileList('$(vFilePath)/*.xlsx');
LET vFileYear = Trim(Right(Left(file, 9), 1));
NEXT
Data:
LOAD *
FROM
[lib://Folder_Planning_Control/Release/Release $(vFileYear).xlsx]
(ooxml, embedded labels, table is 'Page 1');
Your vFileYear returning value is with the file path.
Example
vFilePath = lib://Folder_Planning_Control/Release
file = lib://Folder_Planning_Control/Release/Release 1.xlsx
Left(file,9) =lib://Fol
Right(Left(file,9),1) = l
With that, the output is wrong.
Your vFileYear returning value is with the file path.
Example
vFilePath = lib://Folder_Planning_Control/Release
file = lib://Folder_Planning_Control/Release/Release 1.xlsx
Left(file,9) =lib://Fol
Right(Left(file,9),1) = l
With that, the output is wrong.
thanks!
how should I write this?
You can try this:
right(left(SubField(vFile, '/', 5),9),1)