'Unable to read document OfficeImportErrorDomain error 912 on generaring .xlsx file using openXml
I am using OpenXMl to generate Excel file (.xlsx). I am able to open generated file (.xlsx) on my computer but I can not open it on my Ipad. It is not password protected even, but I do get the 912 error.
This is my C# code
string fileName = "Report.xlsx";
Response.Clear();
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";// "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"; //"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" '"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" '"application/vnd.ms-excel"
Response.AddHeader("Content-Disposition", "attachment;filename=" + fileName);
Any Help is greatly appreciate.
Solution 1:[1]
Have you tried to generate the .xlsx file you need with a third-pard component, such as ClosedXML?
We used it recently, it takes 15 mins to implement: maybe you can give it a try. If the issue is related to not-perfectly compliance with the OpenXml format, maybe ClosedXml can do better...
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ˈvɔlə |
