Forum Discussion

cbhoffm1's avatar
cbhoffm1
Advocate I
7 years ago
Solved

Excel Export File from a Table is Corrupt

When I am exporting data from a published report in my workspace I am getting an error message upon opening the file:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The .CSV option works fine but any export to excel either summarized or underlying data throws the 2 above erros when I open the files.  I have tried multiple machines and workspaces and I'm still getting the 2 errors.  Is there a setting that needs to be changed in order to prevent the error from appearing?  This will look very bad on client facing reports.

  • I did some more testing on this and identified it is one record in particular that is causing the issue.  I'm not sure if it's the <blank> value in one column or the resulting Divide by 0 in another but I would not think this is enough to corrupt the workbook.  I'll let you know what I find.

  • Upon further testing, the issue was the Divide by 0 error.  If there are any errors in the data the Excel file will throw the corrupt error instead of just treating those errors as text.  Using the replace errors function in Power Query resolved the issue and the Excel export is fine now.

6 Replies

  • v-yuta-msft's avatar
    v-yuta-msft
    Community Support

    Hi cbhoffm1,

     

    I have made a test on your issue but couldn't reproduce it. Excel file can be opened correctly on my side. What's your office version? Can you open the .xlsx file on excel web?

     

    Regards,

    Jimmy Tao

  •  

    Hi Jimmy,

     

    I am using Office 365 to open the file.  When I tried excel online, I am getting the below error message.  When I click Yes, I get the same 2 messages as in my original post.

     

     

    Thanks,
    Chris

     

    • v-yuta-msft's avatar
      v-yuta-msft
      Community Support

      Hi cbhoffm1,

       

      This issue seems more related to O365, I would recommend you to post your issue to O365 forum.

       

      Regards,

      Jimmy Tao

  • Hi Jimmy,

     

    This issue only appears for Excel exports from Power BI.  It does not appear to happen with any other files.

     

    Regards,
    Chris

  • I did some more testing on this and identified it is one record in particular that is causing the issue.  I'm not sure if it's the <blank> value in one column or the resulting Divide by 0 in another but I would not think this is enough to corrupt the workbook.  I'll let you know what I find.

  • Upon further testing, the issue was the Divide by 0 error.  If there are any errors in the data the Excel file will throw the corrupt error instead of just treating those errors as text.  Using the replace errors function in Power Query resolved the issue and the Excel export is fine now.