No - reviewing the code - the only thing we do is open the spreadsheet, fill data from column 0 to 76, with as many rows as there is data - and then save it out to the client via the Output Stream and using FileFormatType.Excel2003.
Here is the code:
///
/// This is to write data record into a formatted excel from the client. The excel displays different charts in different worksheet base on the data saved in excel.
///
/// reference to the page object
/// DataTable that will supply data to excel
/// the position of the worksheet in excel that will be active when excel is opened
public static void DisplayDebtorExcel(Page page, DataTable dtDebtorCustomReport, int activeWorksheet) {
License license = new License();
license.SetLicense("Aspose.Cells.lic");
Workbook book = new Workbook();
book.Open(".../DebtorDownloadSpreadsheet.xls"), FileFormatType.Excel2003);
FillInvoiceData(book.Worksheets["Debtor Report"],dtDebtorCustomReport);
book.Worksheets.ActiveSheetIndex = activeWorksheet;
string contentDispositionMode = "attachment";
string contentType = "application/vnd.ms-excel";
page.Response.Buffer = false;
page.Response.Clear();
page.Response.ContentType = contentType;
page.Response.AddHeader("Content-Disposition", contentDispositionMode + "; filename=DebtorReport.xls");
book.Save(page.Response.OutputStream, FileFormatType.Excel2003);
page.Response.End();
}
The FillInvoiceData method basically loops through the data rows with code like similar to this:
ws.Cells[1+lup, 0].PutValue(dtDebtorCustomReport.Rows[lup]["clientReference"]);
ws.Cells[1+lup, 1].PutValue(dtDebtorCustomReport.Rows[lup]["debtorName"]);
ws.Cells[1+lup, 2].PutValue(dtDebtorCustomReport.Rows[lup]["assignedDate"]);
ws.Cells[1+lup, 2].Style.Number = 14;
Do you see anything in this code that would cause the width of the bottom horizontal scroll bar to change?