📜  加载最新的 Excel 文件 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:47.192000             🧑  作者: Mango

代码示例1
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]);