Saving Excel in Progress

Terrie Ramirez

New Member
Can someone tell me how to automatically save a spreadsheet that I have created in Progress? This program will be run in a batch queue at night and I would like to have the program save the EXCEL spreadsheet into a directory that the users can access in the morning.
 

Frederic Ognier

New Member
To save a spreadsheet

Hello,

Use that :

create "Excel.Application":U chExcelApplication.
chWorkbook = chExcelApplication:Workbooks:add().

/* Character Var*/
def var c_path_out as char no-undo.
def var c_classeurExcel as char no-undo.

/*
* Where the file is going to be save
*/
c_classeurExcel = c_path_out + 'MyFile.xls'.

/*
* Traitement 1 Vacance
*/
chWorkSheet1 = chExcelApplication:Sheets:item(1).
chWorkSheet1:Name = "My name".

/*
* Save command
*/
chWorkBook:SaveAs(c_classeurExcel,,,,,,,).

/*
* Release object
*/
chWorkBook:close.
release object chExcelApplication.
release object chWorkbook.
release object chWorkSheet1.

You can find informations about SaveAs on :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wrtskhowtosaveworkbooks.asp

I Hope it will help you.

Frédéric.
 
Top