Run time error during creation of excel file

Hi All,

A program is developed to create an excel file. In live server they are using Excel 2003 version.

I have added following code to save a particular column as ‘Text’ format. The live server is facing run time error on the following code. But the same code is running fine with excel 2010 version.

//Create Excel WorkBook and WorkSheet

xlsWorkBookCollection = xlsApplication.workbooks();

xlsWorkBook = xlsWorkBookCollection.add();

xlsWorkSheetCollection = xlsWorkBook.worksheets();

xlsWorkSheet = xlsWorkSheetCollection.itemFromNum(1);;

cells = xlsWorkSheet.cells();

// numberFormat ‘@’ is to insert data as Text


The error is 'Error executing code: Wrong argument types in variable assignment.'

Is the issue with the excel version or my piece of code ? Please help.



Does SysExcelApplication class work for excel 2003 version ?