Corrupted file while creating excel .xlsx
I am reading a file as binary in a table from a content repository. This file is downloaded locally on my computer. When opening the file with excel 2010 I get a message that the file is corrupted and can be restored. When I click on ok, the file is restored and I can see the content. I am uploading the created file in my code. So I upload a corrupted file. How can I fix this issue. Downloading from the content repository and uploading should happen in the background without interaction. How can I fix the problem. The mime type is correct.