1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
use strict; use warnings; use Spreadsheet::XLSX; use Excel::Writer::XLSX; my $workbook = Spreadsheet::XLSX->new("mappe1.xlsx"); my $worksheet = $workbook->worksheet("Tabelle1"); my $cell = $worksheet->get_cell( 2, 1 ); print $cell->value()."\n"; print $cell->encoding()."\n"; my $fuer = $cell->value(); my $workbook_write = Excel::Writer::XLSX->new( "mappe2.xlsx" ); my $new_sheet = $workbook_write->add_worksheet( "Tabelle1" ); $new_sheet->write_string( 1, 1, $fuer);
2013-10-22T10:37:07 pqmach mal folgendes:
QuoteNoch eins:
für was benutze ich denn dann im Script das:
use utf8;
?
perldoc utf8DESCRIPTION
The use utf8 pragma tells the Perl parser to allow UTF-8 in the program text in the current lexical scope (allow UTF-EBCDIC on EBCDIC based platforms). The no utf8 pragma tells Perl to switch back to treating the source text as literal bytes in the current lexical scope.
Do not use this pragma for anything else than telling Perl that your script is written in UTF-8. The utility functions described below are directly usable without use utf8; .