Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Formatting Excel blocks from query load

by cocl04 (Sexton)
on Apr 02, 2009 at 19:53 UTC ( [id://755090]=note: print w/replies, xml ) Need Help??


in reply to Re: Formatting Excel blocks from query load
in thread Formatting Excel blocks from query load

I really appreciate your help. I figured it out. I did not use the cell by cell method. The data in a column can be handled the same. The most helpful thing was the write_string function. Instead of dumping the data into excel and formating all the data generally...I used the below method. It works great. Sometimes I just need a nug or idea...Again Thanks!!!

this works...I set the formats by column...

############################### # # insert Data into spreadsheet # ############################### my $row = 1; my $col = 0; while ( my ( $TOTAL, $type, $calendar_date, $location, $rto_store, $change, $remodel_date, $LYTD_START_DATE) = $query->fetchrow_ +array() ) { $row++; $col=0; $worksheet->write_string( $row, $col++, $TOTAL,$text_format ); $worksheet->write_string( $row, $col++, $type,$text_format ); $worksheet->write_date_time( $row, $col++, $calendar_date, $date +_format ); $worksheet->write_string( $row, $col++, $location,$text_format ) +; $worksheet->write_string( $row, $col++, $rto_store,$store_format +); $worksheet->write_string( $row, $col++, $change,$text_format ); $worksheet->write_date_time( $row, $col++, $remodel_date, $date_ +format ); $worksheet->write_date_time( $row, $col++, $LYTD_START_DATE, $da +te_format ); $row++;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://755090]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-19 04:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found