Calc error on re-saving
Posted: Sun Feb 04, 2018 3:20 pm
Hi,
I've converted one of my VB programs to use Calc in place of Excel, everything works as expected, but I'm getting an error on re-saving the doc.
Run-time error '1001':
Com.sun.star.task.ErrorCodeIOException:
Do I need to 'close' it, or do something else to the file, before resaving?
Regards
Peter
I've converted one of my VB programs to use Calc in place of Excel, everything works as expected, but I'm getting an error on re-saving the doc.
Run-time error '1001':
Com.sun.star.task.ErrorCodeIOException:
Code: Select all
'Create and save Calc, working OK
URL = "file:///" & FileNme
Call ConvertURL 'set '/' and '%20' in spaces
Call oDoc.storeToURL(URL, arg()) 'save OK
'Later, reload doc, working OK
URL = "file:///" & FileNme
Call ConvertURL 'set '/' and '%20' in spaces
Set oDoc = oDesk.loadComponentFromURL(URL, "_blank", 0, arg())
Set oSheets = oDoc.getSheets() 'find all OOo sheets
Set oSheet = oSheets.getByName("Sheet1") 'select sheet in OOo
Set oSheet = oDoc.CurrentController.ActiveSheet 'set sheet in VB
'add some more data into cells, all OK, then
Call oDoc.storeToURL(URL, arg()) 're-save gives the error
'I've also tried adding these, both give me the error:
Set arg(0) = oSM.Bridge_GetStruct("com.sun.star.beans.PropertyValue")
arg(0).Name = "hidden"
arg(0).Value = ""
'or:
arg(0).Name = "Overwrite"
arg(0).Value = True
Regards
Peter