Incompatibility between Excel 11 (2003) and Excel 12 (2007)

P

Peter Savas

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top