OpenOffice ods格式转换为xls
sub SaveAs
Dim URLStr as String
Dim FileName as String
‘ Dim dispatcher as object
Dim document as object
Dim oProp(1) As New com.sun.star.beans.PropertyValue
‘ document = ThisComponent.CurrentController.Frame
‘ dispatcher = createUnoService(“com.sun.star.frame.DispatchHelper”)
document = ThisComponent
GlobalScope.BasicLibraries.LoadLibrary(“Tools”)
‘ dim args1(1) as new com.sun.star.beans.PropertyValue
URLStr = ThisComponent.getURL()
FileName = FileNameOutOfPath(URLStr)
print URLStr
‘print FileName
‘ args1(0).Name = “URL”
‘ args1(0).Value = URLStr
‘ args1(1).Name = “FilterName”
‘ args1(1).Value = “calc8”
oProp(0).Name = “overWrite”
oProp(0).value= true
oProp(1).Name = “FilterName”
oProp(1).Value = “calc8”
document.storeasurl(URLStr, oProp())
‘ dispatcher.executeDispatch(document, “.uno:SaveAs”, “”, 0, args1())
end sub
关注公众号『长空雪』
搬孕工 分享孕妇写真 关注我微信公众号 长空雪 “情而不色”是我公众号的风格