ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Incompatibility between Excel 11 (2003) and Excel 12 (2007) (https://www.excelbanter.com/excel-programming/414033-incompatibility-between-excel-11-2003-excel-12-2007-a.html)

Peter Savas

Incompatibility between Excel 11 (2003) and Excel 12 (2007)
 
I have a little problem I'm hoping someone can help with:

I have a Web application that creates an XLS file from XML/HTML data using
the following code:

private void doTheReportThing(string html, bool sendXLS) {
//Force this content to be downloaded
//as a excel document with the name of your choice
if (sendXLS) {
//Response.ClearHeaders();
//Response.ClearContent();
Response.AddHeader("Content-Type", "application/msexcel");
Response.AddHeader("Content-disposition", "attachment;
filename=" + this.form.ReportFilter.ToString() + ".xls");
Response.Charset ="utf-7";
Response.ContentEncoding = Encoding.UTF7;
Response.Write(html);
Response.End();
} else {
Response.Write("<html<body" + html + "</body</head");
}
}

The file it creates opens fine in Excel 11 (2003), but when I try to open it
in Excel 12 (2007), I get an error message from Excel which says: "cell data
too large" and the contents of the file are displayed in cell A1 of the
worksheet.

Can anyone give me any ideas as to why the files won't open correctly in
Excel 12 (2007)?

Thanks in advance,
pete


All times are GMT +1. The time now is 10:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com