엑셀 내보내기에서 C# .net으로 작업하고 있습니다. 데스크톱 및 랩톱에서 잘 작동하는 아래 코드를 사용하고 있습니다. 내가 IPAD이를 사용할 때엑셀 내보내기가 IPAD에서 작동하지 않습니다.
homeServices = new HomeServices();
string htmlOutput = "";
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ClearContent();
HttpContext.Current.Response.ClearHeaders();
HttpContext.Current.Response.Buffer = true;
HttpContext.Current.Response.ContentType = "application/ms-excel";
HttpContext.Current.Response.Write(@"<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">");
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=Export.xls");
HttpContext.Current.Response.Charset = "utf-8";
HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.GetEncoding("windows-1250");
htmlOutput = homeServices.ExportHomeData();
HttpContext.Current.Response.Write(htmlOutput);
HttpContext.Current.Response.Flush();
HttpContext.Current.Response.End();
그러나, 나는 위의 코드는 늘 아이 패드를 지원 여부
Unable to Read Document. An error occurred while reading the document.
같은 오류를 얻고있다.
참고 : 필자는 많은 부분을 검색 했으므로이 문제와 관련된 해결책을 찾지 못했습니다. 지난 3 일 동안 나는 찾고 있습니다. 친절하게 도와주세요 전문가.