in reply to Re^7: Slovenian characters problem
in thread Slovenian characters problem

I've added the following line into script:

use Data::Dumper;

After I read the xls table contents here is the second one:

print "\@Test values are: ", Dumper(\@Test);

I think I'll have to take your advice and give up on Win32::OLE since Data::Dumper reports this:

Test values are: $VAR1 = [ { 'Col1' => '\x{00c8}\x{00e8}\x{008a}\x{009a}\x{008e}\x{009e +}' } ]; "\x{00e8}" does not map to cp1250 at C:\batch\Pisarna\Clouseau\Testira +nje.pl line 31. "\x{008a}" does not map to cp1250 at C:\batch\Pisarna\Clouseau\Testira +nje.pl line 31. "\x{009a}" does not map to cp1250 at C:\batch\Pisarna\Clouseau\Testira +nje.pl line 31. "\x{008e}" does not map to cp1250 at C:\batch\Pisarna\Clouseau\Testira +nje.pl line 31. "\x{009e}" does not map to cp1250 at C:\batch\Pisarna\Clouseau\Testira +nje.pl line 31.

I've started with Win32::OLE and then found that I need to add Spreadsheet::WriteExcel as well because it controls Excel colors and other attributes. I hoped I'll use Tk module - but there are about 150 columns of (wide string) data so Tk is not an option (it's very useful for less data though).

I will deinitely skip Win32::OLE and check how successfull am I with Spreadsheet::ParseExcel. I'll give notice when I make changes - in case some other poor fellow hits the same wall.

Thanks for your help!

P.S.: I forgot to log in earlier...

Replies are listed 'Best First'.
Re^9: Slovenian characters problem
by JackVanRamars (Novice) on Aug 18, 2010 at 11:50 UTC

    As I promised - this is the result of what I've just found out.

    I tried the simplest Spreadsheet::Read to read Excel xls file table:

    @ref = ReadData ("FileToRead.xls");

    I write first line with first three columns into @Test:

    push(@Test,{ A1=>$ref[0]->[1]->{A1}, A2=>$ref[0]->[1]->{A2}, A3=>$ref[0]->[1]->{A3} });

    After I write it into another Excel xls table the Slovenian characters are correct. Hallelujah!

    I'll print the code, back it up and only then I'll smooth the code. Thanks again for your help!