Actually I can set up some event handlers in DBIx::Dump, which will allow
you to assign an even handler to handle transformations.

Give me until tomorrow noon.

Ilya

-----Original Message-----
From: NIPP, SCOTT V (SBCSI)
To: 'Jeff Zucker'; Sterin, Ilya; dbi-users
Sent: 10/2/02 2:45 PM
Subject: RE: Database to Excel script...

        OK...  I am stuck once again.  I am to pull the data from the
database and export it directly to an Excel file.  Now, I am trying to
figure out the formatting...  The first problem I am running into is
reformatting dates from the output of MySQL to the desired Excel format.
Here is a same of what I am attempting:

        MySQL date:  2002-09-02 13:13:00

        Desired Excel date:  9/2/2002 13:13

        I know that there is a set_num_format function in the WriteExcel
module, but this works with epoch numbers.  I am not sure about
transforming
one date format to another date format.  Any help would be greatly
appreciated.

-----Original Message-----
From: Jeff Zucker [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 6:51 PM
To: Sterin, Ilya; dbi-users
Subject: Re: Database to Excel script...


Sterin, Ilya wrote:

> Jeff, that's helpful:-)
> 
> but that does not pupulat the excel spreadsheet with data from a
select
> query, rather you have to select and loop while do()ing it.
> 
> There is lot of overhead for certain things, I just though a simple
mod
> would help to just dump data, and nothing else.


How much simpler can you get than this (requires only AnyData, not 
DBD::AnyData or any of the SQL* modules):

   use DBI;
   use AnyData;
   my $dbh = DBI->connect($mysql_or_other_dsn);
   my $sth = $dbh->prepare($query);
   for my $new_format(qw(CSV XML Ini Tab Pipe Fixed HTMLTable)) {
     adConvert( 'DBI', $sth, $new_format, "newfile.$new_format");
   }
   __END__

-- 
Jeff

Reply via email to