Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Excel file format problem Generated by Excel::writer::xlsx moduls

by sarf13 (Beadle)
on Nov 09, 2012 at 06:00 UTC ( #1003070=perlquestion: print w/replies, xml ) Need Help??
sarf13 has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I am using excel:: writer::xlsx module for generating an excel report. When I am using write_string function for writing, if data is number format on a cell then itís showing green mark while open the excel sheet.

My question is there any way through which I can remove this exclamation green color mark after generating a excel report programmatically in Perl.

Thanks in advance

  • Comment on Excel file format problem Generated by Excel::writer::xlsx moduls

Replies are listed 'Best First'.
Re: Excel file format problem Generated by Excel::writer::xlsx moduls
by jmcnamara (Monsignor) on Nov 09, 2012 at 12:03 UTC

    It isn't currently possible to turn off those warnings from Excel::Writer::XLSX. I'll add it in a future version.

    In the meantime, you can try avoid the warning by using write_number() for numbers or write() which tries to distinguish between strings and numbers and use the correct method.



    --
    John.

Re: Excel file format problem Generated by Excel::writer::xlsx moduls
by bitingduck (Chaplain) on Nov 09, 2012 at 09:01 UTC

    If you click on the green mark, Excel will probably give you a message letting you know that the cell contains a number in text format. Try doing "write_number" for those cells, instead of "write_string". Excel can be very annoying about how it deals with text formatted numbers. How it deals with time formatting is even worse...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1003070]
Approved by rovf
help
Chatterbox?
[Discipulus]: i know, i know..
[shmem]: man perlfunc |perl -nle '$ok++ if /Alphabetical Listing of Perl Functions/;if($ok ){$s{$1}++if /^ (\w+)/}}{for(keys %s){$f="prototype \\\&CORE::$_"; eval"$f"||delete $CORE::{$_}}print for sort keys%CORE::'
[shmem]: well, there are some builtins which don't have a prototype...
[Discipulus]: eh eh.. i was looking in toke.c but dunno if is already used
[shmem]: oh the whitespace in the regex got condensed, meh
[shmem]: should be /^ {7}(\w+)/ or such
[shmem]: ...at least for my perldoc on Linux debian 8
[Discipulus]: mmh.. at themomemt i just an old 5.8 and outputs just GLOBAL::

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2017-05-23 10:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?