Hi there,
VERSION: Syncfusion Essential Studio User Interface 2009 Vol 4 (V7.4.0.20)
I am trying to make an excel file using ExcelEngine.
In my computer (Win XP), it works FINE.
However, I got an exception error as attached through the WEB SERVER(WIN 2003 Server).
I copied the following files in the bin directory of WEB SERVER:
Syncfusion.Core.dll
Syncfusion.Compression.Base.dll
Syncfusion.xlsio.base.dll
Syncfusion.xlsio.Web.dll
Again, Syncfusion and MS Excel are not installed in the WEB SERVER. (Is it OK??)
The following is a sample code I tried.
============== source code =======
private void ExportExcel()
{
//A new instance of Excel Application is created
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
//A new workbook object is created
IWorkbook myWorkbook = excelEngine.Excel.Workbooks.Add();
IWorksheet mySheet = myWorkbook.Worksheets[0];
mySheet.Name = "Weekly";
int i, j;
for (i = 1; i <= 20; i++)
{
for (j = 1; j <= 20; j++)
{
IRange xlRange = mySheet.Range[i, j];
xlRange.Value = string.Format("({0}, {1})", i, j);
}
}
string sXlFileName = "test.xls";
myWorkbook.SaveAs(sXlFileName, ExcelSaveType.SaveAsXLS, Response, ExcelDownloadType.PromptDialog);
}
===================================
Thanks in advance.
Hong
Result_60cbd4f6.zip