#!/bin/sh # # Beispiel für TclUno # \ exec tclsh "$0" "$@" # damit wird die Skriptlösung angefordert # setting the argv to -urtp will require a pure scripted # solution of the network interface set ::argv "-urtp" package require itcluno # Dokument erzeugen # Create empty spreadsheet set spreadsheet [::itcluno::SpreadSheet #auto] # and rename first sheet to "Werte". This will only work # in german version, as the first sheet will not be called # Tabelle1 in an non german version $spreadsheet renameSheet Tabelle1 Werte # Werte Setzen # Set the table headers $spreadsheet setCellValue Werte [list 0 0] {{"" Tag Uhrzeit Wochentag Wasserstand}} # Wasserstand Harburg Schleuese (www.bsh.de) # The values calculated for Harburg (the part of Hamburg were I live) sluice set daten [ list \ [ list HW 01.01.2006 05:05 So 2.4 ] \ [ list NW 01.01.2006 12:38 So -1.5 ] \ [ list HW 01.01.2006 17:40 So 2.3 ] \ [ list HW 02.01.2006 00:53 Mo -1.4 ] \ [ list HW 02.01.2006 05:55 Mo 2.5 ] \ [ list NW 02.01.2006 13:32 Mo -1.5 ] \ [ list HW 02.01.2006 18:33 Mo 2.3 ] \ [ list NW 03.01.2006 01:44 Di -1.4 ] \ [ list HW 03.01.2006 06:44 Di 2.5 ] \ [ list NW 03.01.2006 14:26 Di -1.5 ] \ [ list HW 03.01.2006 19:24 Di 2.2 ] \ [ list NW 04.01.2006 02:30 Mi -1.4 ] \ [ list HW 04.01.2006 07:30 Mi 2.5 ] \ [ list NW 04.01.2006 15:13 Mi -1.6 ] \ [ list HW 04.01.2006 20:09 Mi 2.1 ] \ [ list NW 05.01.2006 03:12 Do -1.5 ] \ [ list HW 05.01.2006 08:14 Do 2.5 ] \ [ list NW 05.01.2006 15:58 Do -1.6 ] \ [ list HW 05.01.2006 20:54 Do 2.0 ] \ [ list NW 06.01.2006 03:55 Fr -1.5 ] \ [ list HW 06.01.2006 09:01 Fr 2.5 ] \ [ list NW 06.01.2006 16:43 Fr -1.5 ] \ [ list HW 06.01.2006 21:42 Fr 2.0 ] \ [ list NW 07.01.2006 04:44 Sa -1.4 ] \ [ list HW 07.01.2006 09:52 Sa 2.4 ] \ [ list NW 07.01.2006 17:32 Sa -1.5 ] \ [ list HW 07.01.2006 22:32 Sa 1.9 ] ] $spreadsheet setCellValue Werte [list 0 1] $daten # Graphik erzeugen # create a chart #set sourceRange $spreadsheet createChart Werte [list 12 1 12 12 cm] \ [list hasRowHeader 1 hasColumnHeader 1 title "Harburg Schleuse" type LineDiagram] \ Werte [list 3 1 4 28] # set the title of OpenOffice tcluno_soffice::windowTitle [$spreadsheet cget -desktop] "Wasserstand: Harburg Schleuse" # and export as PDF $spreadsheet exportToPdf wasserstand.pdf
Category Application Category Example Category Interprocess Communication