Page 1 of 1

HMG AND EXCEL

Posted: Wed Aug 28, 2013 6:58 am
by sunningdale
OEXCEL:WorkBooks:ADD("name of file.xls")

opens EXCEL and adds a new workbook

OEXCEL:WorkBooks:OPEN("name of file.xls")

opens an existing workbook

How does one

a) close and save
b) close and not save

Thanks

Re: HMG AND EXCEL

Posted: Wed Aug 28, 2013 9:24 am
by dhaine_adp
Hi Sunningdale,

Try:

oExcel:ActiveWorkbook:SaveAs( ( cFileName ) ) -- its working with Office 2007/2010

Commands that I didn't try yet:
oExcel:ActiveWorkbook:Close()

Regards,

Danny

Re: HMG AND EXCEL

Posted: Wed Aug 28, 2013 1:28 pm
by sunningdale
THANKS VERY MUCH

OEXCEL:ACTIVEWORKBOOK:SAVEAS("C:\RJOD\HMGWORK\OLE\XYZ.XLS")
OEXCEL:ACTIVEWORKBOOK:CLOSE()
OEXCEL:QUIT()

all three work.

Your help is much appreciated.