📅  最后修改于: 2022-03-11 14:58:47.192000             🧑  作者: Mango
LET vFilePath = 'C:\Qlikview\Data';
FOR EACH file in FileList('$(vFilePath)\*.xlsx'); // Loops each excel file in the given Folder
LET vFileYear = Left(Right(file, 9), 4); // Gets the year portion from the filename
LET vMaxYear = Rangemax(vFileYear, vMaxYear); // Gets the max year for every iteration
NEXT
Data:
LOAD *
FROM
[$(vFilePath )\Budget $(vMaxYear).xlsx] // Load Max year data
(ooxml, embedded labels, table is [Sheet1]);