Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Help needed with "DataFormat.Error: File contains corrupted data"

Morning All,

I am struggling with trying to escape this error in Power Query. Basically, getting multiple files from SharePoint folder which are then filtered to only retain XLSX ones, but there seems to be error with one file. I suspect its possibly an encrypted file (password protected) and that's fine. All I want is to bypass this error in query editor. I tried replace error values, remove error rows etc but none of that seems to work. I still get that error row. Any advise on how can I exclude this row? 


If I load and apply I get this error. 

 

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    ignore this, I found the file that was password protected finally. In my case, this seems to happen when extracting the Excel file's Content into another column which would then be expanded further to get to the various worksheets within the files. As I kept scrolling through the Contents column I noticed "Error" value and against this value I was able to get the file name and path. I have removed the password and hoping that should fix the issue.

     

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    ignore this, I found the file that was password protected finally. In my case, this seems to happen when extracting the Excel file's Content into another column which would then be expanded further to get to the various worksheets within the files. As I kept scrolling through the Contents column I noticed "Error" value and against this value I was able to get the file name and path. I have removed the password and hoping that should fix the issue.

     

     

    • v-jingzhang's avatar
      v-jingzhang
      Community Support

      Hi Anonymous 

       

      Exactly. I found when I tried to import data from an Excel file which is encrypted by a password, I got this error too. Thank you for this finding!

       

      Best Regards,
      Community Support Team _ Jing