1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
'création instance OO
Set oserv = CreateObject("com.sun.star.servicemanager")
Set odesk = oserv.createinstance("com.sun.star.frame.Desktop")
'paramétrage argument pour lancer OOCalc en caché
Set args(1) = setOOoProp("Hidden", True)
'lancement Calc
Set doc = odesk.loadComponentFromURL("private:factory/scalc", "_blank", 0, args)
Set osheet = doc.getsheets().getbyindex(0) '0 : 1ere feuille du classeur
'getCellByPosition(indice COLONNE, indice LIGNE)
For j = 1 To nb_lignes_données
For jj = 1 To nb_colonnes
osheet.getCellByPosition(jj - 1, j - 1).SetString (Val(Tableau(j, jj)))
Next jj
Next j
With osheet.getCellByPosition(2, 2)
.CharWeight = com.sun.star.awt.FontWeight.Bold
End With |
Partager