Hallo,
ich befasse mich nun zum ersten Mal ernsthaft mit der Version 2.
Das musste ich festellen, dass u.a. folgendes Makro wirkungslos bleibt.
Es wird zwar ausgeführt, aber Debugging Output ergab, dass aus den
Tabellenzellen stets 0 gelesen wird. Ferner bleiben alle Schreibzugriffe
auf die Tabellenzellen wirkungslos - egal, ob Daten oder Formatierungen.
Exceptions treten nicht auf.
Danke für Tipps,
Michael
Sub Main
myDoc = ThisComponent
myTextTables = myDoc.getTextTables
myListingTable = myTextTables.getByName("ListingTable")
mySummaryTable = myTextTables.getByName("SummaryTable")
print myListingTable.getCellByPosition(2,2).getValue
FOR myRow = 1 to myListingTable.getRows.getCount - 1
myNumberFormat = myListingTable.getCellByPosition(0,myRow).NumberFormat
myListingTable.getCellByPosition(0,myRow).setValue(myRow)
myListingTable.getCellByPosition(0,myRow).NumberFormat = myNumberFormat
myCount = myListingTable.getCellByPosition(3,myRow).getValue
myValue = myListingTable.getCellByPosition(4,myRow).getValue
mySum = myCount * myValue
myTotal = myTotal + mySum
myNumberFormat = myListingTable.getCellByPosition(5,myRow).NumberFormat
myListingTable.getCellByPosition(5,myRow).setValue(mySum)
myListingTable.getCellByPosition(5,myRow).NumberFormat = myNumberFormat
NEXT
myNumberFormat = mySummaryTable.getCellByPosition(1,0).NumberFormat
mySummaryTable.getCellByPosition(1,0).setValue(myTotal)
mySummaryTable.getCellByPosition(1,0).NumberFormat = myNumberFormat
myNumberFormat = mySummaryTable.getCellByPosition(1,1).NumberFormat
mySummaryTable.getCellByPosition(1,1).setValue(myTotal * 0.16)
mySummaryTable.getCellByPosition(1,1).NumberFormat = myNumberFormat
myNumberFormat = mySummaryTable.getCellByPosition(1,2).NumberFormat
mySummaryTable.getCellByPosition(1,2).setValue(myTotal * 1.16)
mySummaryTable.getCellByPosition(1,2).NumberFormat = myNumberFormat
FOR myRow = 0 to myListingTable.getRows.getCount - 1
FOR myColumn = 0 to myListingTable.getColumns.getCount - 1
myListingTable.getCellByPosition(myColumn,myRow).setPropertyValue("VertOrient",
0)
NEXT
NEXT
FOR myRow = 0 to mySummaryTable.getRows.getCount - 1
FOR myColumn = 0 to mySummaryTable.getColumns.getCount - 1
mySummaryTable.getCellByPosition(myColumn,myRow).setPropertyValue("VertOrient",
0)
NEXT
NEXT
End Sub
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]