HMG AND EXCEL

Moderator: Rathinagiri

Post Reply
sunningdale
Posts: 12
Joined: Thu Jan 03, 2013 11:46 am
Location: Etloe, UK

HMG AND EXCEL

Post 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
User avatar
dhaine_adp
Posts: 457
Joined: Wed Aug 06, 2008 12:22 pm
Location: Manila, Philippines

Re: HMG AND EXCEL

Post 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
Regards,

Danny
Manila, Philippines
sunningdale
Posts: 12
Joined: Thu Jan 03, 2013 11:46 am
Location: Etloe, UK

Re: HMG AND EXCEL

Post 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.
Post Reply