Forum Discussion
How to refresh data from excel ?
How to refresh data from excel ?
I add new column and edit column name in file excel.
Please guide me about it.
Hi Anonymous ,
If you add a new column in your excel file after importing data into Power BI, the new column won't be imported into Power BI after refreshing.
One workaround, try to change the query like this:
let Source = Excel.Workbook(File.Contents("D:\test.xlsx"), null, true), #"Removed Other Columns" = Table.SelectColumns(Source,{"Data"}), #"Expanded Data" = Table.ExpandTableColumn(#"Removed Other Columns", "Data", Table.ColumnNames(Table.Combine(#"Removed Other Columns"[Data])), Table.ColumnNames(Table.Combine(#"Removed Other Columns"[Data])) ), #"Promoted Headers" = Table.PromoteHeaders(#"Expanded Data", [PromoteAllScalars=true]) in #"Promoted Headers"But there is a disadvantage: the types of all columns will need to defect manually.
Best regards
Icey
If this post helps, then consider Accepting it as the solution to help other members find it faster.
2 Replies
- amitchandakSuper User
Anonymous , refer my video on the same
https://youtu.be/h0yLtceT0i4?list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
rename column - https://youtu.be/meUxcbwujl8?list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
- IceyCommunity Support
Hi Anonymous ,
If you add a new column in your excel file after importing data into Power BI, the new column won't be imported into Power BI after refreshing.
One workaround, try to change the query like this:
let Source = Excel.Workbook(File.Contents("D:\test.xlsx"), null, true), #"Removed Other Columns" = Table.SelectColumns(Source,{"Data"}), #"Expanded Data" = Table.ExpandTableColumn(#"Removed Other Columns", "Data", Table.ColumnNames(Table.Combine(#"Removed Other Columns"[Data])), Table.ColumnNames(Table.Combine(#"Removed Other Columns"[Data])) ), #"Promoted Headers" = Table.PromoteHeaders(#"Expanded Data", [PromoteAllScalars=true]) in #"Promoted Headers"But there is a disadvantage: the types of all columns will need to defect manually.
Best regards
Icey
If this post helps, then consider Accepting it as the solution to help other members find it faster.