Salut,
J'essaye de piloter un classeur Open Office afin de entre autre récuperer le nombre de feuille mais je patoge un peu donc si quelqu'un avais quelques renseignements.
En fait j'essaye d'adapter du code qui fonctionne pour excel mais je n'arrive pas a trouver les correspondances des propriété tel que Workbooks ou WorkSheet (merci a Superstivix au passage):
merci d'avance.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 Variant xlApp; Variant xlBooks; Variant xlBook ; Variant xlSheets ; Variant xlSheet ; xlApp = CreateOleObject("Excel.Application"); //CreateOleObject("com.sun.star.ServiceManager"); pour open office xlBooks = xlApp.Exec(PropertyGet("Workbooks")); xlBooks.Exec(Procedure("Open") << NomFichier); xlBook = xlBooks.Exec(PropertyGet("Item") << 1); xlSheets = xlBook.Exec(PropertyGet("Worksheets")); int MaxSheets = xlSheets.Exec(PropertyGet("Count"));
Partager