|We don't bite newbies here... much|
Carriage returns in Excel filesby Anonymous Monk
|on Feb 02, 2009 at 20:04 UTC||Need Help??|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
I have an Excel file that will have data in 5 rows. Some cells have data in multiple lines (using alt-enter).
When going through this data column by column I have a problem where the carriage returns are automatically being processed by Perl so the processing I am attempting on the data is not being done completely. Is there a way of getting rid of these carriage returns?
Here is an example of the test data:
And here is the output I get when I read in that column of data:
cell 1,cell 2,cell 3
cell 5,Cell 6,cell 7
So as you can see the carriage returns are being processed by Perl and this is messing up the rest of my functionality. I need to somehow get the script to disregard them. I would like to have all cells of data in the column be outputted to a single line so the rest of my script can process correctly. Any thoughts?