Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Help! I need to generate excel files from PL/ SQLm Java api
This also allows you to do things that SYLK does not support,
such as tabbed worksheet creation.
Jared
Mladen Gogala <mladen_at_wangtrading.com>
Sent by: oracle-l-bounce_at_freelists.org
02/11/2004 02:11 PM
Please respond to oracle-l
To: oracle-l_at_freelists.org cc: Subject: Re: Help! I need to generate excel files from PL/ SQLm Java api
Delphi??? You can get Spreadsheet::WriteExcel from CPAN and do something like this:
#!/usr/bin/perl -w
use strict;
use Spreadsheet::WriteExcel;
# Create a new Excel workbook
my $workbook = Spreadsheet::WriteExcel->new("perl.xls");
# Add a worksheet
$worksheet = $workbook->add_worksheet();
# Add and define a format
$format = $workbook->add_format(); # Add a format $format->set_bold(); $format->set_color('red'); $format->set_align('center');
# Write a formatted and unformatted string, row and column notation.
$col = $row = 0; $worksheet->write($row, $col, "Hi Excel!", $format); $worksheet->write(1, $col, "Hi Excel!");
# Write a number and a formula using A1 notation
$worksheet->write('A3', 1.2345);
$worksheet->write('A4', '=SIN(PI()/4)');
Combined with DBI, I can write any spreadsheet I want and have crontab
execute and email that for me. The other thing to do to a person who
wants
excel spreadsheets would be this:
$PHB=recipient\@company.com
dd if=/dev/zero bs=64k count=65536k|gzip|dd of=/tmp/report.xls.gz
uuencode /tmp/report.xls.gz report.xls.gz|mailx -s "My Report" $PHB
This would create a 40GB file (consisting of binary nulls) compressed
into < 10kb. There is no excel spreadsheet produced by Ms which will not
crash
while attemting to open it. If the workstation is NT 4.0, it will get
BSOD,
the only application that hasn't changed since the advent of Windows.
On 02/11/2004 04:45:11 PM, Juan Cachito Reyes Pacheco wrote:
> To solve the problem we did another program in delphi who monitors a
> folder
> and based on the information it founds there, he sends the email with
> the at
> tachment.
>
> As I remember you can attach a archive with oracle package.
>
> but you can use java apì
> as usual tom kyte site has the answer
> http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:255615160805
>
>
> ----------------------------------------------------------------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> ----------------------------------------------------------------
> To unsubscribe send email to: oracle-l-request_at_freelists.org
> put 'unsubscribe' in the subject line.
> --
> Archives are at http://www.freelists.org/archives/oracle-l/
> FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> -----------------------------------------------------------------
>
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html ----------------------------------------------------------------- ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Wed Feb 11 2004 - 18:08:09 CST
![]() |
![]() |