Forum Discussion
juangomez
6 years agoHelper I
Import Multiple Tables from Excel in a Single Query
Hi Everyone I am currently importing several tables from Excel Workbooks. And it is distributed in several sheets. I have 3 different sheets: - Volume - Sales - Units Each sheet is a big ...
- 6 years ago
Hi juangomez ,
We can get data by folder to work around.
let Source = Folder.Files("D:\Case\20200212\testfolder"), #"Removed Columns" = Table.RemoveColumns(Source,{"Extension", "Date accessed", "Date modified", "Date created", "Folder Path", "Attributes"}), #"Added Custom" = Table.AddColumn(#"Removed Columns", "Custom", each Excel.Workbook([Content],true)), #"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Name", "Data", "Item", "Kind", "Hidden"}, {"Custom.Name", "Custom.Data", "Custom.Item", "Custom.Kind", "Custom.Hidden"}), #"Expanded Custom.Data" = Table.ExpandTableColumn(#"Expanded Custom", "Custom.Data", {"a", "b", "c"}, {"Custom.Data.a", "Custom.Data.b", "Custom.Data.c"}), #"Removed Columns1" = Table.RemoveColumns(#"Expanded Custom.Data",{"Content"}) in #"Removed Columns1"For more details, please refer to the third - party article.
v-frfei-msft
6 years agoCommunity Support
Hi juangomez ,
We can get data by folder to work around.
let
Source = Folder.Files("D:\Case\20200212\testfolder"),
#"Removed Columns" = Table.RemoveColumns(Source,{"Extension", "Date accessed", "Date modified", "Date created", "Folder Path", "Attributes"}),
#"Added Custom" = Table.AddColumn(#"Removed Columns", "Custom", each Excel.Workbook([Content],true)),
#"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Name", "Data", "Item", "Kind", "Hidden"}, {"Custom.Name", "Custom.Data", "Custom.Item", "Custom.Kind", "Custom.Hidden"}),
#"Expanded Custom.Data" = Table.ExpandTableColumn(#"Expanded Custom", "Custom.Data", {"a", "b", "c"}, {"Custom.Data.a", "Custom.Data.b", "Custom.Data.c"}),
#"Removed Columns1" = Table.RemoveColumns(#"Expanded Custom.Data",{"Content"})
in
#"Removed Columns1"
For more details, please refer to the third - party article.
- juangomez6 years agoHelper I
Hello
Thanks for your answer, will create the additional "File" table to import data.
One question, can this Folder.files be linked to One Drive folder the same as are the Excel files are linked and may be updated?
Juan Diego