tabellenkalkulation:einfuehrung_in_die_makroprogrammierung_ii
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
tabellenkalkulation:einfuehrung_in_die_makroprogrammierung_ii [2024/01/26 18:36] – angelegt torsten.roehl | tabellenkalkulation:einfuehrung_in_die_makroprogrammierung_ii [2024/01/26 18:37] (aktuell) – torsten.roehl | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
====== Tabellenkalkulation: | ====== Tabellenkalkulation: | ||
+ | |||
+ | <Code Basic linenums:1 | Listing 1:Lesen und Schreiben in eine Tabelle > | ||
+ | ' | ||
+ | ' utility functions | ||
+ | ' | ||
+ | |||
+ | ' writeCell writes a number to the table cell. | ||
+ | ' @param xPos zero based table position | ||
+ | ' @param yPos zero based table position | ||
+ | ' @param value | ||
+ | |||
+ | Function writeCell( xPos as Integer, yPos as Integer, value as Double) | ||
+ | Dim myDoc | ||
+ | Dim mySheet | ||
+ | Dim myCell | ||
+ | |||
+ | myDoc = thisComponent | ||
+ | mySheet = myDoc.sheets( 0 ) | ||
+ | myCell | ||
+ | myCell.setValue( value ) | ||
+ | End Function | ||
+ | |||
+ | ' readCell reads a number from the given cell position. | ||
+ | ' @param xPos zero based table position | ||
+ | ' @param yPos zero based table position | ||
+ | ' @return a double (integer) value representing the given position | ||
+ | |||
+ | |||
+ | Function readCell( xPos as Integer, yPos as Integer) as Double | ||
+ | Dim myDoc | ||
+ | Dim mySheet | ||
+ | myDoc = thisComponent | ||
+ | mySheet | ||
+ | readCell = mySheet.getCellByPosition( xPos, yPos ).getValue() | ||
+ | End Function | ||
+ | </ | ||
tabellenkalkulation/einfuehrung_in_die_makroprogrammierung_ii.txt · Zuletzt geändert: 2024/01/26 18:37 von torsten.roehl