shreyavanga opened a new issue, #850:
URL: https://github.com/apache/poi/issues/850

   Hi all,
   
   I'm working on a project where I use a template .xlsx file, update it with 
data, and save it as a new file using Java and Apache POI.
   
   The implementation works correctly, and the generated Excel file opens fine. 
However, when I check the file type using the **file --mime-type** command on 
macOS, it shows the MIME type as application/octet-stream instead of the 
expected application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.
   
   Here are a few things I’ve tried so far:
   
   Verified the MIME type of the original template file — it correctly shows 
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.
   
   When I open the generated file in Excel and simply resave it (without making 
any changes), the MIME type is then detected correctly as 
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.
   
   I unzipped the generated file to inspect its internal structure and it 
appears intact.
   
   Tested this across different JDK versions but the issue persists.
   
   Is there anything I might be missing in the write process or a way to ensure 
the correct MIME type is reflected directly after generation?
   
   Any insights or suggestions would be appreciated!
   
   Thanks,


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to