Question

Version: 10.2b

I want to create a .xlsx file with progress but the machine this will run on doesn't have excel.

Can someone point me in the right direction about how to do this.

Is there a library already written that can do something like this?

Thanks for any help!

Was it helpful?

Solution

The project was moved to the Free DocxFactory Project.

It was rewritten in C++ with Progress 4GL/ABL wrappers and tutorial.

It is 300x times faster, alot of new features were added including barcodes, paging features etc.

and it's completely free for private and commercial use without any time or feature limits.

HTH

OTHER TIPS

You might find this to be useful: http://www.oehive.org/project/libooxml although it appears that there is nothing there right now. There might also be an older version of that code here: http://www.oehive.org/project/lib

Also -- in many cases the need to provide data to Excel can be satisfied with a Tab or Comma delimited file.

Another trick is to create an HTML table fragment. Excel imports those quite nicely.

A super simple example of how to export a semi-colon delimited file from a temp-table. In 90% of the cases this is enough Excel-support - at least it has been for me.

DEFINE STREAM strCsv.

DEFINE TEMP-TABLE ttExample NO-UNDO
    FIELD col1 AS CHARACTER
    FIELD col2 AS INTEGER.

CREATE ttExample.
ASSIGN ttExample.col1 = "ABC"
       ttExample.col2 = 123.

CREATE ttExample.
ASSIGN ttExample.col1 = "DEF"
       ttExample.col2 = 456.

OUTPUT STREAM strCsv TO VALUE("c:\test\test.csv").
FOR EACH ttExample NO-LOCK:
    EXPORT DELIMITER ";" ttExample.
END.
OUTPUT STREAM strCsv CLOSE.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top