0

I have a daily file I receive from a vendor (generated with PowerBI), and 6 days a week it works fine in the (closed source) tool I'm sending it to. These days the row count is < 10000.

One day a week I get the same file with over 60K rows and my tool will not load it. It gives me an error that says:

MIME type mismatch for file: x.xlsx. Expected type:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, Actual type: application/x-tika-ooxml

Does anyone know why I would be getting this error? I'm assuming that it has to do with the number of rows, but I'm not positive. Everything else (I am assured by the vendor) is the same when generating the file - it's the same job. I am copying the file using the same method (downloading and using scp) and loading the file into the tool the same way.

I've used file --mime-type and the python magic libs and the files look to be the same from those tools. The utility that's giving me the error is closed source and I don't know how they check the MIME type.

Does anyone have any ideas? I'm stuck.

I'm afraid I don't have any code to post b/c both tools are closed source to me, but figured somebody might have seen this with PowerBI.

mikeb
  • 10,578
  • 7
  • 62
  • 120
  • 1
    The Excel XML format used in the weekly one is not the same as the daily one, that what the error refers to, it's not the number of rows. application/x-tika-ooxml is not a supported Excel mime type. I assume that the weekly export is using a different process to the daily one, maybe with some sort of compression built in. https://stackoverflow.com/questions/4212861/what-is-a-correct-mime-type-for-docx-pptx-etc/4212908#4212908 – Jon Aug 11 '22 at 14:00
  • I understand - my question is why are they different MIME types even though I am assured that they use the same method to generate the file. The only difference I can see is the drastic difference in the number of rows for the file that's not working. – mikeb Aug 11 '22 at 14:13

0 Answers0