Thursday, Jan. 18, 2018

Manipulating Excel with Siebel through Escript (COM Objects)

Written By:


June 25, 2012


Posted In:

COM objects allows an external application to connect and communicate with the Siebel Application Object Manager.

If you want to manipulate (Open / Create / Edit / Save) an excel file through Siebel Escript, you are going to need some methods. So here they are:

1)    To create an excel application instance:

var ExcelIns = COMCreateObject(“Excel.Application”);

2)    To create a new file:

ExcelIns.Visible = true;

3)    To Open an existing file:

var file = “D:\\Data.xls”;


4)    To read a column value:

var value1 = ExcelIns.ActiveSheet.Cells(2,3).Value ;

5)    To write in the file:

ExcelIns.ActiveSheet.Cells(4,2).Value = “Enter your data here”;

6)    To insert a row:


7)    To insert a column:


8)    To delete a row:


9)    To delete a column:


10)  To Save the file:

ExcelIns.ActiveWorkbook.SaveAs (<filename>);

11)   To close the instance and release the resources:


ExcelIns = null;

Hope it helps, have a good day !!

Share This Article

About Author


Siebel Technical Consultant

  • Saurav Kumar

    Gr8 help …… but could you please add the command to save the same file … here we have to save the file in different name ExcelIns.ActiveWorkbook.SaveAs ();

  • Rohit

    Hi Saurav….If you are using VB, then the method is
    ExcelIns.ActiveSheet.Save but in escript I am not sure of the method syntax. You can try using
    ExcelIns.ActiveSheet.Save or
    ExcelIns.Workbooks.Save(file); (where file is your opened file object). If you find correct syntax in eScript, please do share…