Excel error
Posted: Tue Aug 16, 2011 2:37 pm
Roger,
Do you have any idea what this error message means, other than the excel export failed. Users get this all the time, but eventually after retrying and retrying, it eventually saves. Is it timing..ie, is the file not completely open and ready to save yet? I added delays but it did not appear to impact anything.
I know I can not save it and just leave it open for them, which would resolve it, but not be very efficient.
Here is that part of the code and the error on the save part. I use inkey, but know there are other ways to add delays.
keyin=inkey(2)
oBook := oExcel:workbooks:Open(filename)
keyin=inkey(2)
if !empty(newname)
oBook:SaveAs( newname , xlWorkbookNormal )
endif
oError:args :
-> VALTYPE: C VALUE: SaveAs
-> VALTYPE: C VALUE: \OISWIN\DOWNLOAD\BILL201108101412.XLS
-> VALTYPE: N VALUE: -4143
oError:description : SaveAs method of Workbook class failed
oError:filename : NIL
oError:genCode : NIL
oError:operation : SaveAs
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------
Called from AUTOMATIONOBJECT:ONERROR(1037) Called from ASCOMERROR:RAISE(308) Called from ASCOMERROR:RAISEERROR(505) Called from ASCOMERROR:RAISEONERROR(530) Called from AUTOMATIONOBJECT:NOMETHOD(957) Called from EXCEL1(74) Called from BILLDWN2(280) Called from (B)MAIN(0)
Fred
Omni
Do you have any idea what this error message means, other than the excel export failed. Users get this all the time, but eventually after retrying and retrying, it eventually saves. Is it timing..ie, is the file not completely open and ready to save yet? I added delays but it did not appear to impact anything.
I know I can not save it and just leave it open for them, which would resolve it, but not be very efficient.
Here is that part of the code and the error on the save part. I use inkey, but know there are other ways to add delays.
keyin=inkey(2)
oBook := oExcel:workbooks:Open(filename)
keyin=inkey(2)
if !empty(newname)
oBook:SaveAs( newname , xlWorkbookNormal )
endif
oError:args :
-> VALTYPE: C VALUE: SaveAs
-> VALTYPE: C VALUE: \OISWIN\DOWNLOAD\BILL201108101412.XLS
-> VALTYPE: N VALUE: -4143
oError:description : SaveAs method of Workbook class failed
oError:filename : NIL
oError:genCode : NIL
oError:operation : SaveAs
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------
Called from AUTOMATIONOBJECT:ONERROR(1037) Called from ASCOMERROR:RAISE(308) Called from ASCOMERROR:RAISEERROR(505) Called from ASCOMERROR:RAISEONERROR(530) Called from AUTOMATIONOBJECT:NOMETHOD(957) Called from EXCEL1(74) Called from BILLDWN2(280) Called from (B)MAIN(0)
Fred
Omni