Excel error

This forum is for eXpress++ general support.
Post Reply
Message
Author
omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Excel error

#1 Post by omni »

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

Wolfgang Ciriack
Posts: 479
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: Excel error

#2 Post by Wolfgang Ciriack »

Is that right, that the drive letter is missing in newname ?
_______________________
Best Regards
Wolfgang

omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Re: Excel error

#3 Post by omni »

The default drive letter varies, but OUR drive is showing on the error log as the current default drive, which is usually "O" or "G".

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Excel error

#4 Post by Auge_Ohr »

omni wrote:The default drive letter varies, but OUR drive is showing on the error log as the current default drive, which is usually "O" or "G".
as i know you have to include "full" Path ( UNC or Driveletter )
greetings by OHR
Jimmy

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Excel error

#5 Post by rdonnay »

I agree. I think the problem is the missing drive letter.
The eXpress train is coming - and it has more cars.

omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Re: Excel error

#6 Post by omni »

I just pasted in what I thought was relevant. This is part of the code for the file name just before what you see.
This is for the file being opened initially.

if substr(filename,2,1)<>":"
filename=curdrive()+":"+alltrim(filename)
endif

The file always opened right, but the save (the new filename) was the problem, which did not have that drive letter added. What you are saying sounds right and I made the change and will send to all the users. Not sure why we did one right and the other one wrong....

Thanks


Fred

Post Reply