Thanks, but I'm not sure that does it
The unicode_8859_7.pl scirpt specifies how one opens an ascii file. In my case the file I get the problematic cells is an excel file itself. I should add it displays fine with the Devel:ptkdb debugging/diagnostic module I use.
I use
$cellvalue2=encode("iso08859-7",$cellvalue2);
it makes NO difference.
I even tried
if($Cell->{Code} eq 'ucs2'){$cellvalue2=Encode::decode ('UCS-2BE',$cel
+lvalue2);
which gave again junk(though more chinese-looking junk)
I read these strings by
$oexcel=new Spreadsheet::ParseExcel;#version 0.32 from #activestate
$oBook=$oexcel->Parse($myfile);
for my ($iSheet=0; $iSheet<$oBook->{SheetCount};$iSheet++;}
$oWkS=$oBook->{Worksehhet}[$iSheet];
for (my $iR=$oWkS=>{MinRow};defined $oWkS->{MaxRow|&& $iR <=$oWkS->{Ma
+xRow};$iR++;){
for(my $iC=$oWkS->{MinCol};defined $oWkS->{MaxCol &&$iC <$oWkS->{MaxCo
+l};
$iC++;
my $cellvalue2='';
my $oWkC=$oWkS->{Cells}[$iR][$iC];
if($oWk){$cellvalue2=$oWkC->Value; $cellvalue2=$oWkC->{'Val'} if ($cel
+lvalue2 eq 'GENERAL';}
#and it IS GENERAL
....
Like I said above, it makes no difference if you try to post-process the $cellvalue2 with
encode("iso-8859-7",$cellvalue2);
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.