Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
zaka0204
Regular Visitor

Unzip and load csv from web - error "we didn't recognize the format of your first file"

Hi

I am trying to unzip and load csv files from the web. I used Mark White's process (http://sql10.blogspot.com/2016/06/reading-zip-files-in-powerquery-m.html) to unzip and bring into Power BI (thanks!) but when I get to the point where I need to combine the binary, I get the following error.

error.PNG

For the second step of Mark's process, the code I used is:

let
Source = Web.Contents("https://www150.statcan.gc.ca/n1/tbl/csv/32100426-eng.zip"),
Files = UnzipContents(Source)
in
Files

 

The data I am trying to pull in can be found at:

https://open.canada.ca/data/en/dataset/a4d912d2-fdf8-47ba-b7a4-e27d0cfa2d54

I right click on the Access button for English CSV and copy link to insert into code.

 

Any assistance would be appreciated.

Thanks

 

 

5 REPLIES 5
ilaydacandan
Frequent Visitor

Hello everyone,

 

I am facing exactly the same problem and unfurtantely I can't unzip whole files. Is there any update? @hnguy71 @zaka0204 @desarrollosbi 

Thank you in advance

@amitchandak @Greg_Deckler @Jihwan_Kim Is there anyone who can help me solve the problem?

hnguy71
Super User
Super User

Hi @zaka0204 

 

I think your steps are correct. If you open the zip there are two files in there. One is incompatible with the other which gives you the error.  I suggest extracting just the data you need and importing from there.

 

I did a test run with two like files using the Zip function and it works:

 

zipfunction.PNG



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Dear colleagues, how do you do it? I did the same but only 1 csv is listed for me, since there are 2, and the one that this list does not let me see the data

thanks

 

 

Yes, I knew that worked, what I was hoping was to avoid having to unzip and store the file and then import ie hoping to automate it more.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors