mellin has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I have a problem with the Perl module Excel::Writer::XLSX and certain characters such as Ä and Ö in the finnish Alphabet. They seem to become gibberish in the resulting file. I'm running the Perl script in Centos 6.3 and I've viewed the Excel file both in Windows 7 with Office 2010 and in Centos using LibreOffice Calc. Same problem in both. Any ideas what I might be doing wrong?
I have included a short code example below which produces the same issue in my system.
#!/usr/bin/perl -w use strict; use Excel::Writer::XLSX; my $path = '/tmp'; my $time = time(); my $stamp = $time . '-' . $$; my $filename = "$path/$stamp.xlsx"; # Create a new Excel workbook my $workbook = Excel::Writer::XLSX->new($filename); # Add a worksheet my $worksheet = $workbook->add_worksheet(); # set header format my $format = $workbook->add_format( bold => 1, color => 'black'); $worksheet->write(0, 0, 'Name', $format); $worksheet->write(1, 0, 'Mister Mister'); $worksheet->write(2, 0, 'Mäster Mäster'); $worksheet->autofilter(0, 0, 2, 0); $worksheet->freeze_panes(1, 0);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Finnish alphabet and Excel::Writer::XLSX
by Anonymous Monk on Dec 07, 2012 at 18:07 UTC | |
Re: Finnish alphabet and Excel::Writer::XLSX
by rpnoble419 (Pilgrim) on Dec 08, 2012 at 00:02 UTC |
Back to
Seekers of Perl Wisdom