Ok...
Using the Excel.Web version 2005 12 19 and inside the browser the Generated Excel spreadsheet looks nice. Very nice actually. Everthing seems to format as expected. The data in columns start when expected and all data is there as expected. When I export to .xls and look at the exported document inside Excel ... the formating is all messed up.
The spreadsheet when viewed inside Excel does not start till Column H where in the browser using the ExcelWeb1 component it started in Column A (0) .
None of the color background formating is coming over.
There also seems to be a loss of data in the middle of the exported version.
The following is the export code I'm using:
private void ExcelWeb1_OnAfterSaveCommand(object sender, System.Web.UI.WebControls.CommandEventArgs args)
{
// Generates a temporary file name.
string filename = System.IO.Path.GetTempFileName() + ".xls";
System.IO.FileInfo file = new System.IO.FileInfo(filename);
// save data to a file, using original file as a template.
this.ExcelWeb1.WebWorksheets.SaveToExcelFile(filename);
Response.ContentType = "application/vnd.ms-excel";
//Add header
Response.AddHeader( "content-disposition","attachment; filename=" + file.Name);
// write file to the reponse stream, so you can receive the excel file with your browser directly.
Response.WriteFile(filename);
Response.End();
}