let
源 = Folder.Files("\\肖燕婷\00调解所有数据\02调解桔子\AAA桔多多分案\00每日渠道案件表"),
筛选的行 = Table.SelectRows(源, each ([Name] <> "202505-0801委案案件最新在库截止20250901.xlsx" and [Name] <> "先锋渠道M3抽案日期8.6-7号留案表_20250822毕聪.xlsx" and [Name] <> "先锋组8月渠道3抽案留案表_20250818.xlsx" and [Name] <> "先锋组8月渠道5留案_20250815.xlsx" and [Name] <> "先锋组9月人员名单.xlsx" and [Name] <> "先锋组渠道9月留案表8.31_20250831FR吴细香.xlsx" and [Name] <> "先锋组渠道M3跟M5 8.29号留案_20250829FR毕聪.xlsx" and [Name] <> "必胜组9月分案名单.xlsx" and [Name] <> "桔子每日渠道截至8.29系统案件列表_20250829.xlsx" and [Name] <> "桔子每日渠道调解记录202509.xlsx" and [Name] <> "每日渠道8.19分案名单.txt" and [Name] <> "舒玲燕截止8.22贷后案件列表.xlsx" and [Name] <> "舒玲燕贷后案件列表_20250806.xlsx" and [Name] <> "调解桔子每日渠道7.26-8.5贷后系统案件列表_20250815.xlsx" and [Name] <> "调解桔子每日渠道7.26-8.5贷后系统案件列表_20250818.xlsx" and [Name] <> "调解桔子每日渠道贷后系统案件列表_20250731.xlsx" and [Name] <> "调解桔子每日渠道贷后系统案件列表_20250802.xlsx")),
已添加自定义 = Table.AddColumn(筛选的行, "文件日期", each Text.Middle([Name], Text.PositionOf([Name], "_") + 1, 8)),
更改的类型 = Table.TransformColumnTypes(已添加自定义,{{"文件日期", type date}}),
排序的行 = Table.Sort(更改的类型,{{"文件日期", Order.Descending}}),
已添加自定义1 = Table.AddColumn(排序的行, "源文件名", each [ name]),
删除的列 = Table.RemoveColumns(已添加自定义1,{"源文件名"}),
排序的行1 = Table.Sort(删除的列,{{"文件日期", Order.Descending}}),
筛选的行1 = Table.SelectRows(排序的行1, let latest = List.Max(排序的行1[文件日期]) in each [文件日期] = latest),
已添加自定义2 = Table.AddColumn(筛选的行1, "源文件名", each [Name]),
筛选的隐藏文件1 = Table.SelectRows(已添加自定义2, each [Attributes]?[Hidden]? <> true),
调用自定义函数1 = Table.AddColumn(筛选的隐藏文件1, "转换文件", each 转换文件([Content])),
删除的其他列1 = Table.SelectColumns(调用自定义函数1, {"转换文件"}),
扩展的表格列1 = Table.ExpandTableColumn(删除的其他列1, "转换文件", Table.ColumnNames(转换文件(示例文件))),
更改的类型1 = Table.TransformColumnTypes(扩展的表格列1,{{"案件类型", type text}, {"身份证笔数", Int64.Type}, {"身份证0", type text}, {"案件编号", type text}, {"有效调解员", type text}, {"业务线条", type text}, {"案件状态", type text}, {"客群标签", type any}, {"最近登录APP时间", type any}, {"投诉标记", type text}, {"202406月起委案次数", type text}, {"是否重复客户", type text}, {"旧案分案日期", type date}, {"调解名义/APP名称", type text}, {"案件延期与撤案备注", type text}, {"委案开始日期", type date}, {"委案结束日期", type date}, {"法催批次号", Int64.Type}, {"案件编号_1", type text}, {"调解团队", type text}, {"调解员", type text}, {"客户姓名", type text}, {"性别", type text}, {"身份证号", type text}, {"手机号", Int64.Type}, {"最新电话状态#(lf)(必填)", type text}, {"历史电话状态(必填)", type text}, {"跟进时间#(lf)(必填)#(lf)月/日", type date}, {"跟进标签#(lf)(必填)", type text}, {"调解记录#(lf)(接通必填)", type text}, {"下次跟进日期", type any}, {"承诺还款金额", type any}, {"订单数", Int64.Type}, {"最大逾期天数", Int64.Type}, {"订单逾期总金额", type number}, {"未到期剩余本金", type number}, {"未到期剩余利息", type number}, {"逾期本金", type number}, {"逾期利息", type number}, {"最大逾期账龄", Int64.Type}, {"配偶姓名", type any}, {"配偶电话", Int64.Type}, {"联系人1姓名", type any}, {"联系人1电话", Int64.Type}, {"联系人2姓名", Int64.Type}, {"联系人2电话", Int64.Type}, {"联系人3姓名", type any}, {"联系人3电话", Int64.Type}, {"联系人4姓名", Int64.Type}, {"联系人4电话", Int64.Type}, {"调解团队-9/17-23", type text}, {"调解员-9/17-23", type text}, {"调解团队-9/16", type text}, {"调解员-9/16", type text}, {"调解团队-9/9-15", type text}, {"调解员-9/9-15", type text}, {"调解团队-9/1-8", type text}, {"调解员-9/1-8", type text}, {"调解团队-8月", type text}, {"调解员-8月", type text}, {"25/8/21调解团队", type text}, {"25/8/21调解员", type text}, {"25/8/18-8/20调解团队", type text}, {"25/8/18-8/20调解员", type text}, {"25/8/15-8/17调解团队", type text}, {"25/8/15-8/17调解员", type text}, {"25/8/7-8/14调解团队", type text}, {"25/8/7-8/14调解员", type text}, {"25/8/6调解团队", type text}, {"25/8/6调解员", type text}, {"25/8/2-8/5调解团队", type text}, {"25/8/2-8/5调解员", type text}, {"25/8/1调解团队", type text}, {"25/8/1调解员", type text}, {"2025/7/17-7/31调解团队", type text}, {"2025/7/17-7/31调解员", type text}, {"2025/7/6-7/16调解团队", type text}, {"2025/7/6-7/16调解员", type text}, {"2025/7/3-7/5调解团队", type text}, {"2025/7/3-7/5调解员", type text}, {"2025/7/1-7/2调解团队", type text}, {"2025/7/1-7/2调解团队_2", type text}, {"2025/6/23-6/30调解团队", type text}, {"2025/6/23-6/30调解团队_3", type text}, {"2025/6/13-6/22调解团队", type text}, {"2025/6/13-6/22调解员", type text}, {"2025/6/12调解团队", type text}, {"2025/6/12调解员", type text}, {"2025/6/9-6/11调解团队", type text}, {"2025/6/9-6/11调解员", type text}, {"2025/6/3-6/8调解团队", type text}, {"2025/6/3-6/8调解员", type text}, {"2025/6/1-6/2调解团队", type text}, {"2025/6/1-6/2调解员", type text}, {"2025/5/24-5/31调解团队", type text}, {"2025/5/24-5/31调解员", type text}, {"2025/5/9-5/23调解团队", type text}, {"2025/5/9-5/23调解员", type text}})
in
更改的类型1 这里帮我修改成需要加上源文件名的