use strict;
use warnings;
use Spreadsheet::WriteExcel;

# Excel-Datei und Arbeitsblatt erzeugen
my $excel  = Spreadsheet::WriteExcel->new("eins.xls");
my $sheet = $excel->add_worksheet();

# Allgemeine Syntax:  write($row, $column, $token). 
# $row und $column beginnen bei 0 (A1 --> 0,0)

# daemlicher Text
$sheet->write(0, 0,  "Hallo Excel!");
$sheet->write(1, 0,  "Wie gehts?");

# ein paar Zahlen
$sheet->write(2, 0,  3); 
$sheet->write(3, 0,  3.00000);
$sheet->write(4, 0,  3.00001);
$sheet->write(5, 0,  3.14159);

# und Formeln
$sheet->write(7, 0,  '=A3 + A6');
$sheet->write(8, 0,  '=IF(A5>3,"Yes", "No")');

# ein Weblink
$sheet->write(10, 0, 'http://www.perl.com/');

# und schliessen
$excel->close();
