Issue with XLSX Export - Corrupted File Error (v0.56.5)

Hi there,

I’m not entirely sure if this is the right place to post this, but I’m reporting a bug as it has become quite an urgent matter for us.

I reviewed the topic from 2023, but I am still not sure how the issue was resolved.
Getting error while downloading xlsx file - Bug reports - Metabase Discussion

Starting this morning, whenever I attempt to download a table as an xlsx file, it only downloads a very small file (around 20KB). When I try to open it, Excel displays the following error message:

"Excel cannot open the file 'my_file_name.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file."

This error occurs regardless of whether the "formatted" option is enabled or not. Fortunately, exporting as a CSV file still works without any issues.

We are currently using version 0.56.5.

It’s quite interesting because we haven't made any changes to our environment or configuration, yet this started happening suddenly. I would appreciate any help or guidance on how to resolve this.

Best regards,

First, you are going to want to sanitize that json file, there is sensitive information, like the names and email addresses of your users, in there.

Second, is /tmp writable in the container? Doesn’t look like it is (or the server’s disk is full):

Error processing query: /tmp/poifiles/poi-sxssf-sheet15350732956516616213.xml: No space left on device

You might have to mount a tmpfs on /tmp so Metabase has temp space to generate the downloadable files to. Or, you can provide an alternate location for temporary files using a JVM property.

Also, follow these instructions to install the timezone database in your MySQL instance. You will probably have to do this from outside the container as the container likely doesn’t have the timezone database installed in it. This will quiet the complaints about your timezone being missing.

1 Like

Thank you for the response. In my haste, I completely forgot to include the organized JSON file.

I appreciate you checking that for me. I will apply your suggestions and run some tests.

Hi, dwhitemv
After checking, I found that the /var/log directory was at 100% capacity, which caused the system to stop functioning properly.

After clearing out the data, it is now back to normal. Your mention of the storage issue was a huge help.

I also appreciate you pointing out the JSON sanitization issue. I was quite surprised by that.

Thank you again!

1 Like