Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: string TRUE/FALSE getting converted to 1/0

by sundialsvc4 (Abbot)
on Jun 15, 2015 at 00:50 UTC ( [id://1130403]=note: print w/replies, xml ) Need Help??


in reply to string TRUE/FALSE getting converted to 1/0

One question that pops into my mind right now is ... “how does Excel decide that the value should be displayed as True or False,” and, “exactly what underlying value is being interpreted in this way?   Perhaps the actual value within the cell is a numeric 1/0, such that what the CSV is providing to you (namely, “the underlying cell-value, stripped of all formatting”) is, in fact, correct?

Replies are listed 'Best First'.
Re^2: string TRUE/FALSE getting converted to 1/0
by nayakr (Novice) on Jun 15, 2015 at 01:29 UTC
    Thanks Sundialsvc4 for your response. The Spreadsheet module (or one of the other module that I am using) seems to be causing this since it is working fine when I pass in a xls file. Is there some way I can tell the interpreter not to convert these strings when a XLSX file is passed? I tried using
    $str =~ s/TRUE/TRUE/i; $str =~ s/FALSE/FALSE/i;
    but that did not help. Thanks, Raj

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2024-04-26 01:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found