Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

convert excel cell into "Text" format with Excel:: Write::xlsx modul

by sarf13 (Beadle)
on Oct 19, 2012 at 11:50 UTC ( #999911=perlquestion: print w/ replies, xml ) Need Help??
sarf13 has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I have to generate a report in Excel file. I am using Excel:: Write::xlsx module generating excels report. How can I set all cell in “Text” format. Whatever the data I am going to write should be on text format only. I don’t have much working experience on this module. Could you guys help me out please…

Comment on convert excel cell into "Text" format with Excel:: Write::xlsx modul
Re: convert excel cell into "Text" format with Excel:: Write::xlsx modul
by Anonymous Monk on Oct 19, 2012 at 11:52 UTC
    When you open the .... module documentation and search for "cell" and for "text", what do you find?
        thanks for your reply. i had try to write data with "write_string" subroutine, but the problem is the logic i had made for writing on excel need to change which i have written for "write" subroutine. an itis bit tough for me. because of that i am thinking if there would any way trough which we can initally set all cell should be "Text". if u want i can post that piece of code.
Re: convert excel cell into "Text" format with Excel:: Write::xlsx modul
by roboticus (Canon) on Oct 19, 2012 at 14:39 UTC

    sarf13:

    In the Excel::Writer::XLSX documentation, under write, it mentions that you can use the add_write_handler() method to make write do something differently. So if you have too many write() methods in your project, you might just add a write handler to treat everything as a string, so you'd only need to add a bit of code at the beginning.

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

      Hi roboticus. i have gone through your feedback.when i am writing data into Excel with "write_string()" in given way
      @val $worksheet->write_string($row,$col,$val[$col]);

      its giving me some error. i don't know how to fix it.i would probably have to do some more R&D on this. if you could suggest some way that would be gr8. Thanks

        sarf13:

        You'll have to be a bit more specific. What error message are you getting?

        ...roboticus

        When your only tool is a hammer, all problems look like your thumb.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://999911]
Approved by sundialsvc4
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2014-11-28 12:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (196 votes), past polls