Hi All,
I wanted to get some help trying to get pyuno to behave. Trying to
automate our stats with pyuno :) The csv file opens with write no matter
what I do to try to get it to open with spreadsheet. Thanks all.
import uno
# get the uno component context from the PyUNO runtime
localContext = uno.getComponentContext()
# create the UnoUrlResolver
resolver = localContext.ServiceManager.createInstanceWithContext(
"com.sun.star.bridge.UnoUrlResolver",
localContext)
# connect to the running office
ctx =
resolver.resolve("uno:pipe,name=pypipe;urp;StarOffice.ComponentContext")
smgr = ctx.ServiceManager
# get the central desktop object
DESKTOP =smgr.createInstanceWithContext("com.sun.star.frame.Desktop", ctx)
#The calling it's not exactly this way, just to simplify the code
DESKTOP.loadComponentFromURL('/data/Joel_Documents/Work/Non-Profit/Libre-Office/FDOBugs/PerDay/2013_01_15.csv',"_blank",0,(),FilterName="Text
- txt - csv
(StarCalc)",DocumentService="com.sun.star.sheet.SpreadsheetDocument")
Best Regards,
Joel
Context
- PyUno - CSV Opening With Writer · Joel Madero
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.