| Server IP : 217.160.0.64 / Your IP : 216.73.216.91 Web Server : Apache System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux User : ws67269618 ( 67269618) PHP Version : 8.4.28 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /kunden/kunden/proc/self/root/usr/share/doc/libspreadsheet-writeexcel-perl/examples/ |
Upload File : |
#!/usr/bin/perl -w
##############################################################################
#
# A simple example using Spreadsheet::WriteExcel to display all available
# Unicode characters in a font.
#
# reverse('�'), May 2004, John McNamara, jmcnamara@cpan.org
#
use strict;
use Spreadsheet::WriteExcel;
my $workbook = Spreadsheet::WriteExcel->new('unicode_list.xls');
my $worksheet = $workbook->add_worksheet();
# Set a Unicode font.
my $uni_font = $workbook->add_format(font => 'Arial Unicode MS');
# Ascii font for labels.
my $courier = $workbook->add_format(font => 'Courier New');
my $char = 0;
# Loop through all 32768 UTF-16BE characters.
#
for my $row (0 .. 2 ** 12 -1) {
for my $col (0 .. 31) {
last if $char == 0xffff;
if ($col % 2 == 0){
$worksheet->write_string($row, $col,
sprintf('0x%04X', $char), $courier);
}
else {
$worksheet->write_utf16be_string($row, $col,
pack('n', $char++), $uni_font);
}
}
}
__END__