• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Create Excel File

Cringer

ProgressTalk.com Moderator
Staff member
#3
You could always use an API such as Docxfactory then there's no requirement to have Excel installed on the machine that makes the files.
 
#6
That you can only find in the documentation of the 3rd party com object. In the case of Excel, Word and other MS Office stuff Google is your best friend. A search for "excel com interface" comes up with a lot of stuff that might help you.
The com object viewer from Progress is just a first start IMHO.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
#7
Anyway where can i find other methods and properties of excel application and other applications eventually??
Progress has a COM object viewer (%DLC%\bin\proobjvw.exe). Run that and then open the COM library (in this case, excel.exe). It will show you the OE view of the objects, properties, methods, and events. This is useful because OE and Excel don't always agree on signatures, e.g. which parameters are mandatory or optional.

Other applications may implement things differently. For example, the Word library is in a separate file (can't remember the name offhand), not in winword.exe.

There is also an Excel object model reference guide in the Excel documentation, both in the product and online.

Also, get to know the VBE (Visual Basic Editor) in Excel (alt-F11). One good way to learn how to automate things in Excel is to use the macro recorder. Start recording a macro in Excel, then open the editor and find the macro you're recording. As you make changes in your workbook, you'll see the VBA code showing up in the editor in real time. You'll then be able to translate that code from VBA syntax to OE syntax. Mostly, the differences are colons instead of periods as separators, and the way that some parameters are passed.
 

Cecil

17+ years progress programming and still learning.
#8
How good is your Python Programming?

If you need to create an Excel Document from scratch, you can you the XlsxWriterLibrary for Python. It's quite simple to use and very fully rich in features, also "FREE".

So from your OpenEdge session, shell out to the OS and execute python code to generate the Excel Document. It works on both Linux & Windows and does not require dependency like Microsoft Office installed.

Since you said "it's not needed for exporting", I'm not sure what data you want to include in the Excel Document. Could you elaborate more on what you are trying to achieve?

In fact, XlsxWriterwas the library I was using to port to the ABL to write my own XLSXWriter Library.
 
Last edited: