Click here to get back home

Way to Parse HTML fields to Excel Spreadsheet

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Way to Parse HTML fields to Excel Spreadsheet ghadley_00@yahoo.com 01-14-2008
Get Chitika Premium
Posted by ghadley_00@yahoo.com on January 14, 2008, 4:59 pm
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Posted by J. Gleixner on January 14, 2008, 5:17 pm
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Similar ThreadsPosted
Spreadsheet::Parse & Write Excel October 30, 2007, 11:30 am
Spreadsheet::[Parse|Write]Excel - accessing the contents of a cell July 6, 2006, 4:51 pm
Writing to an Excel Spreadsheet February 18, 2005, 9:03 pm
Problem using Spreadsheet::Excel October 31, 2006, 12:49 pm
Writing to a Parsed Excel Spreadsheet September 29, 2006, 1:45 pm
Create Excel chart from spreadsheet on Un*x? December 28, 2006, 11:28 pm
Creating Excel spreadsheet - Advanced question July 21, 2004, 11:43 am
Checking for empty cell in Excel Spreadsheet September 24, 2006, 3:39 pm
how to force spreadsheet:parseexcel to parse data in local encoding? December 12, 2006, 4:45 am
how to force spreadsheet:parseexcel to parse data in local encoding? December 12, 2006, 4:46 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap