I am currently using openxml sdk to generate an excel workbook. Once the excel workbook is generated I save it to the server. If I open the file from the directory its saved to, I do not have an issue, however if a user attempts to download this file from a website the user gets this error message"excel found unreadable content in <file_name>.xlsx. do you want to recover the contents of this workbook?"
if the user clicks yes, the workbook is recovered. Any ideas what would cause this?
Hi,
You need to know the office version what they are using. The versions will not give a major problem/error. But there are few xml namespaces that do differ from office 2007 to office 2010. So, you need to ensure the versions are same. Ask the user to send a copy of the downloaded excel and try to validate it using Office OpenXML SDK 2.0 Productivity Tool. It will help you to figure out what's wrong.
I figured out the problem and found a solution. It turns out when I wrote the file out to the Response (Response.BinaryWrite()), I needed to call Response.End(), otherwise the response object was writing page markup out with the file binaries. Excel got angry when it read the page markup and then cleaned it up.
Yes. You can use Response.Redirect("filePath+fileName.extension").
I am able to create excel with dataset data with no issues but i want some column values to be displayed as a additional row appended to current row. With rowspans and some column merges. Any help would be greatly appreciated