我正在使用 OpenXMl 生成 Excel 文件(.xlsx)。我可以在计算机上打开生成的文件 (.xlsx),但无法在 Ipad 上打开它。它甚至没有密码保护,但我确实收到了 912 错误。
这是我的 C# 代码
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);
非常感谢任何帮助。