[Info-vax] Coding Excel files...
Jan-Erik Soderholm
jan-erik.soderholm at telia.com
Wed Feb 12 12:00:04 EST 2014
VAXman- @SendSpamHere.ORG wrote 2014-02-12 15:45:
> 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?
>
Not at all. The data is usualy in some Rdb table (written by the
Cobol applications) and some batch job runs Python and creates
the XLS files (using the Python Rdb interface and the Excel
tools). Sometimes the Cobol code submittes the batch job or
it can be done using a table trigger.
Another Cobol app writes data to a table and a table trigger
submittes a job that uses the Python PDF ("ReportLab") tools
to create PDF reports (accessed through the web server, WASD).
I'm sure Perl works fine also, but I personaly don't like Perl. :-)
Python feels more "modern" and structured.
Regards,
Jan-Erik.
More information about the Info-vax
mailing list