Version 0.03 now allows an event driven interface to transformations.
You can define an event handler, and transform values as you'd like if
custom formating is needed.
Here is an example...
#############################
use DBI;
use DBI::Dump;
my $dbh = DBI->connect(...);
my $sth = $dbh->prepare("select * from users");
$sth->execute();
my $exceldb = DBIx::Dump->new();
$exceldb->dump('format' => 'excel', 'output' => 'db2.xls', 'sth' => $sth,
'eventHandler' => \&handler);
my $count = 0;
sub handler
{
my ($self, $data, $colName, $row) = @_;
my $format;
if ($count == 0)
{
$format = $self->{Generator}->addformat(); # Add a format
$format->set_bold();
$format->set_color('red');
$format->set_align('center');
$self->{excelFormat} = $format;
}
$count++;
if ($row == 2)
{
$self->{excelFormat} = undef;
$format = $self->{Generator}->addformat(); # Add a format
$format->set_num_format(0x0f);
}
if ($row > 1 && $colName == 'ACQUISITION DATE')
{
$self->{excelFormat} = $format;
}
elsif ($row > 1)
{
$self->{excelFormat} = undef;
}
}
#########################################
-----Original Message-----
From: PAUSE
To: Ilya Sterin; [EMAIL PROTECTED]
Sent: 10/3/02 3:40 PM
Subject: CPAN Upload: I/IS/ISTERIN/DBIx-Dump-0.03.tar.gz
The uploaded file
DBIx-Dump-0.03.tar.gz
has entered CPAN as
file: $CPAN/authors/id/I/IS/ISTERIN/DBIx-Dump-0.03.tar.gz
size: 3145 bytes
md5: 2a080fb4a0bddb0ecf95f0c9c0665ca7
No action is required on your part
Request entered by: ISTERIN (Ilya Sterin)
Request entered on: Thu, 03 Oct 2002 21:39:36 GMT
Request completed: Thu, 03 Oct 2002 21:40:17 GMT
Virtually Yours,
Id: paused,v 1.81 2002/08/02 11:34:24 k Exp k