Click here to Skip to main content
15,886,422 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
OpenXML not opening a .xlsx (latest version) file on the windows server due to missing document properties, however if you open that file on your local system and you upload it on server then it works because all the properties got created when you opened it.

on the server when application trying to open the file it is going under catch block of FileFormatException.

Also the same file works when I run my console application on local system.

Why that file going under catch on the server?

The excel file has only one node under /docProps/app.xml
XML
<ap:Properties xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes" xmlns:ap="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" />

The same excel file also not getting open with ClosedXML.

What I have tried:

Nothing has been tried yet as it works fine on local system.
Posted
Updated 30-Oct-18 4:50am
v5
Comments
Herman<T>.Instance 30-Oct-18 11:33am    
Have you checked the contents of the xlsx file using 7-zip?
Maybe there are no rows of data in the file.
IamWsk 31-Oct-18 1:34am    
when you open it on local computer it doesn't show any error or mistake.
Herman<T>.Instance 31-Oct-18 4:34am    
if you would use an unzip program on the file you could see the inner xml content. That might give the clue to your error.
IamWsk 31-Oct-18 10:19am    
Ok thanks, Let me try with this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900