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

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

by ww (Archbishop)
on Jun 14, 2015 at 12:43 UTC ( [id://1130366]=note: print w/replies, xml ) Need Help??


in reply to Re^2: string TRUE/FALSE getting converted to 1/0
in thread string TRUE/FALSE getting converted to 1/0

One could ask "Is there some part of '20-30 lines' you don't understand?"

Immediate apologies included: preceding is for emphasis (despite its regretable hint of rudeness). But perhaps that will also emphasize that boiling down your code to a snippet of 20-30 lines in length (which snippet still displays your problem) will not only make it easier for us to help you (and since you're asking for free help, that's a very good idea) but may also help you directly because confining the error to such a short snippet may make the cause obvious to you!.

  • Comment on Re^3: string TRUE/FALSE getting converted to 1/0

Replies are listed 'Best First'.
Re^4: string TRUE/FALSE getting converted to 1/0
by nayakr (Novice) on Jun 14, 2015 at 14:12 UTC

    My sincere apologies and I understand your point. The conversion from xls to csv is working fine meaning input data matches output data. The issue is with second part of this code which is converting XLSX data to csv (line 114 to 190). Here in the output data the TRUE/FALSE strings are getting converted to 1/0 and this is the part I need some help - how to skip or avoid this conversion of TRUE/FALSE strings - leave them as is in the output - same as input. Appreciate your help and time.

      I see two possibilities:
      • Excel might store the information differently. If can open the XLSX file with your Excel and then "save as" XLS, how do these "TRUE/FALSE" fields look like, when freshly opening the (new) XLS file in Excel?
      • According to the doc, Spreadsheet::XLSX wants to be compatible with Spreadsheet::ParseExcel, but perhaps it isn't. Another module is Spreadsheet::ParseXLSX, which also tries to be a drop-in replacement.
        Thanks for your response Soonix. I have tried converting the XLSX to XLS and then to csv using this script and that is converting as intended. As for Spreadsheet::ParseExcel, it is compatible only for excel 95-2003 binary formats. Spreadsheet::XLSX is compatible for excel 2007 Raj

Log In?
Username:
Password:

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

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

    No recent polls found