cybas.blogg.se

Openoffice calc save as xlsx
Openoffice calc save as xlsx













Set objDesktop = objServiceManager.createInstance(".Desktop")įor each File in objFSO.GetFolder(".").Files Set objServiceManager = WScript.CreateObject("") If objFSO.GetFolder(".").Files.Count>0 then If instr(1, wscript.fullname, "cscript.exe")=0 then Set objFSO = CreateObject("Scripting.FileSystemObject")

openoffice calc save as xlsx

Set wshshell = CreateObject("Wscript.Shell") ' Runcommand, if script does not run with Cscript ' OpenOffice / LibreOffice Service Manager It seems that it works with pdf when I only use the FilterName property but somehow it doesn't work anymore. Problem: Everytime it saves the file(s) it saves them as ODS, no matter which filter or filter options I use. So I searched a lot in OpenOffice and LibreOffice forums, here at stackoverflow, etc. I tried to get this to work in my vbs but it absolutely did not.

openoffice calc save as xlsx

This macro (in LibreOffice) writes a CSV of the current sheet (after LO telling me that only the current sheet will be saved), encoding UTF-8, field separator Tab, no text separator. So, first step was to use the macro recorder in order to get the right filter settings.ĭocument = ĭispatcher = createUnoService(".DispatchHelper")ĭim args1(2) as new .PropertyValueĪrgs1(0).Value = "file:///C:/Users/lutz/Desktop/test.csv"Īrgs1(1).Value = "Text - txt - csv (StarCalc)"Īrgs1(2).Value = "9,0,76,1,0,false,true,true"ĭispatcher.executeDispatch(document, ".uno:SaveAs", "", 0, args1()) No macro installed, everything controlled externally by vbscript. It has to be VBS and LibreOffice in this case. Situation: I need a VB script that can use any LibreOffice (/ OpenOffice) Calc (3.5.4 in my case) installation on any Windows XP or 7 system for export of xls to csv (as many csv files as there are sheets in the xls). I'm trying to write a script for a while now but it seems that one part of it just does not work.















Openoffice calc save as xlsx