Forum Discussion
Updating Main Dataset
- 4 years ago
kh0050 ok, so you can put all your file Excel in the same folder and then do this:
let
Source = Folder.Files("PATH FILES EXCEL"),
#"Filtered Hidden Files1" = Table.SelectRows(Source, each [Attributes]?[Hidden]? <> true),
#"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File", each #"Transform File"([Content])),
#"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
#"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1",{"Transform File"}),
#"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File", Table.ColumnNames(#"Transform File"(#"Sample File")))in
#"Expanded Table Column1"
What does this do? It takes all the Excel files in the folder and sends them to append creating a single table.
Try it!
B.
kh0050 Hi!
Where do your datasets come from? Database or Excel? If Database you can send the two tables to append, then in case I'll show you how, if Excel there is a method to take all the Excel files inside the same folder.
Let me know,
B.
Thanks, All the data I have are in Excel downloaded from the database.
- BeaBF4 years agoSuper User
kh0050 ok, so you can put all your file Excel in the same folder and then do this:
let
Source = Folder.Files("PATH FILES EXCEL"),
#"Filtered Hidden Files1" = Table.SelectRows(Source, each [Attributes]?[Hidden]? <> true),
#"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File", each #"Transform File"([Content])),
#"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
#"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1",{"Transform File"}),
#"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File", Table.ColumnNames(#"Transform File"(#"Sample File")))in
#"Expanded Table Column1"
What does this do? It takes all the Excel files in the folder and sends them to append creating a single table.
Try it!
B.