Forum Discussion
Trying to extract files from ZIP
Hi sowmya2553
As tested, with help of this blog and this thread,
I can get tables from zip file,
Click on "Binary", you could see your data.
You could open my pbix, change the file path below with yourself.
let
path = "C:\Users\maggiel\Desktop\case\6\6.28",
Source = Folder.Files(path),
#"Filtered Rows to only .zip" = Table.SelectRows(Source, each ([Extension] = ".zip")),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows to only .zip",{"Content"}),
#"Added Custom UnzipContents" = Table.AddColumn(#"Removed Other Columns", "Custom", each UnzipContents([Content])),
Custom = #"Added Custom UnzipContents"{0}[Custom]
in
Custom
Note, don't use the path for the zip file, but enter the path of the folder where zip file lies.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello Maggie,
I have tried exactly the same but still getting the same error message :(
Also I have tried to edit on your power BI as well but still the same.
Kindly help
I am unable to attacht the screenshot as its not giving me option to attach the file or image.
Regards,
Sowmya
v-juanli-msft wrote:Hi sowmya2553
As tested, with help of this blog and this thread,
I can get tables from zip file,
Click on "Binary", you could see your data.
You could open my pbix, change the file path below with yourself.
let path = "C:\Users\maggiel\Desktop\case\6\6.28", Source = Folder.Files(path), #"Filtered Rows to only .zip" = Table.SelectRows(Source, each ([Extension] = ".zip")), #"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows to only .zip",{"Content"}), #"Added Custom UnzipContents" = Table.AddColumn(#"Removed Other Columns", "Custom", each UnzipContents([Content])), Custom = #"Added Custom UnzipContents"{0}[Custom] in CustomNote, don't use the path for the zip file, but enter the path of the folder where zip file lies.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-juanli-msft wrote:Hi sowmya2553
As tested, with help of this blog and this thread,
I can get tables from zip file,
Click on "Binary", you could see your data.
You could open my pbix, change the file path below with yourself.
let path = "C:\Users\maggiel\Desktop\case\6\6.28", Source = Folder.Files(path), #"Filtered Rows to only .zip" = Table.SelectRows(Source, each ([Extension] = ".zip")), #"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows to only .zip",{"Content"}), #"Added Custom UnzipContents" = Table.AddColumn(#"Removed Other Columns", "Custom", each UnzipContents([Content])), Custom = #"Added Custom UnzipContents"{0}[Custom] in CustomNote, don't use the path for the zip file, but enter the path of the folder where zip file lies.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- sowmya25537 years agoHelper I
My code is as below
let
path = "C:\Users\MNLUSowm\Desktop\BEA",
Source = Folder.Files(path),
#"Filtered Rows to only .zip" = Table.SelectRows(Source, each ([Extension] = ".zip")),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows to only .zip",{"Content"}),
#"Added Custom UnzipContents" = Table.AddColumn(#"Removed Other Columns", "Custom", each UnzipContents([Content])),
Custom = #"Added Custom UnzipContents"{0}[Custom]
in
Custom