Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PB 11.5 Excel OLE Extension

Status
Not open for further replies.

LunaRoja

Programmer
Sep 21, 2010
34
0
0
US
Hello,

I am creating an Excel application in PB, dropping some data in it and eventually saving. I am not doing a SaveAs because I need to muck with the font settings of certain cells.

The application starts up (lole_excel.ConnectToNewObject("excel.application")) using the currently installed version of Excel. In my case it is Excel 2007.

My issue is that I need to know what the current version of Excel is on any given machine so I can set the extension of the file to be saved correctly. If I could force the ole application to open as Excel 97 - 2003, that would be fine. If not, since I do not know which version might open on a given machine, I need to find out which version is running.

Would anyone happen to know how to find out that information? I have search for quite a while but I cannot seem to locate any information on the subject and the PB object browser does not offer much in this situation. Also, if anyone knows where there is a list of Excel ole functions, that would be wonderful.

Muchas gracias,

LR
 
Hello,

The solution to force the output to Excel 97 was simply to add the enumerated Excel8! variable to the ole saveas method... lole_workbook.saveas(ls_excelpath, excel8!)

LR
 
As far as 'ole functions' are concerned, you can go to Excel and check out the VBA (Visual Basic for Applications) help (I think you need to be in programming mode to be able to get to this help). The methods described there on the various objects can be called via PB - assuming you have the objects instantiated.

Matt

"Nature forges everything on the anvil of time"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top