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



_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to