[Info-vax] Coding Excel files...

VAXman- at SendSpamHere.ORG VAXman- at SendSpamHere.ORG
Wed Feb 12 09:45:50 EST 2014


In article <ldftaf$4ll$1 at news.albasani.net>, Jan-Erik Soderholm <jan-erik.soderholm at telia.com> writes:
>VAXman- @SendSpamHere.ORG wrote 2014-02-12 13:39:
>> In article <52fafbba$0$8113$c3e8da3$3304c218 at news.astraweb.com>, JF Mezei <jfmezei.spamnot at vaxination.ca> writes:
>>> On 14-02-11 18:54, VAXman- @SendSpamHere.ORG wrote:
>>>> I'm not so certain I'd want to be jumping into kernel
>>>> mode with BASIC.
>>>
>>> But isn't kernel mode the default for you, and you only have to worry
>>> about things breaking on those rare occasions when you jump to user mode
>>> ? :-)
>>
>> Pretty much so. :)
>>
>> I've been at SUPERVISOR mode in a lot of my time working on a DCL debugger
>> I've mentioned here a few times.  I'd been called away from that in recent
>> weeks to work on RMS CDC (EXEC mode), coded an Excel spreadsheet generator
>> (USER mode) for a client that writes their app in COBOL (on OpenVMS),..
>
>That is, coding COBOL to create files in Excel/XLS format?

COBOL is not a programming language! ;)

It was all done in C, so that it is callable from their COBOL code (is that
the correct term for all that verbosity?), employing the class libraries of
Perl that handle Data::Table, Spreadsheet::WriteExcel, Excel::Writer::XLSX.
I had looked at the Python libs but my gray matter began to boil trying to 
figure out how to exploit/call its classes from C.  Also, they wanted logos
displayed on the Excel spreadsheet, so I also took advantage of its Image::*
class.  The most annoying part was having to install PERL so that I could
build all of the classes.

Anyway, the customer now only needs to pass a descriptor to the data to be
put in the spreadsheet, a filename for the spreadsheet and the file name of
the logo (optional parameter) if desired.  



>I have done the same at my client, but I used the builtin
>Excel tools (xlrd, xlwt) in the Python kit. Makes handling
>of Excel files a breeze. Yes, you need some data transfer
>from the Cobol apps to the Python Excel generator.

How do you invoke Python in/via COBOL?

-- 
VAXman- A Bored Certified VMS Kernel Mode Hacker    VAXman(at)TMESIS(dot)ORG

Well I speak to machines with the voice of humanity.



More information about the Info-vax mailing list