API or utility to generate PRN files?

William D Ricker wdr at TheWorld.com
Tue Oct 25 20:01:17 EDT 2005


> From: Robert La Ferla <robert at laferla.net>

> I need to generate a ".prn" printer file from a Excel spreadsheet (.xls) 
> via Java or PERL.  Is there an API or utility that I can use to do this 
> either under Linux or Windows?

Under Windows, you can use the Perl Win32::* modules to activate
Excel via the COM/OLE API; I expect you could use that to script Excel
Print functions.
 http://search.cpan.org/~nwclark/perl-5.8.7/win32/ext/Win32/Win32.pm
 http://search.cpan.org/search?m=all&q=win32
 http://search.cpan.org/~jdb/libwin32-0.26/OLE/lib/Win32/OLE.pm
OLE is sadly easier to program and explore via Perl than via VBA.


Under Linux, Perl has Excel modules which will allow reading files
"natively" without Windows.  
 http://search.cpan.org/search?query=Excel&mode=all
 http://search.cpan.org/search?query=spreadsheet&mode=all
but then you'll probably have to decide what to format in your print file
yourself.


-- 
/"\     Bill Ricker  N1VUX  wdr at world.std.com
\ /     http://world.std.com/~wdr/           
 X      Member of the ASCII Ribbon Campaign Against HTML Mail
/ \



More information about the Discuss mailing list