Excel Save Problem

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

Excel Save Problem

#1 Post by omni »

Roger,

I have asked this on a prior log, but still having same problem.
We have export to excel with a save as, specific file name. Check for file existing, try to erase, and if failing, we assign a random file name. Users are still getting save errors constantly. We get logs from users daily on this. Test here and it works if we leave the file open and it assigns the random name.

Here is the snippet of code:


if file(newname)
if ferase(newname)=-1
else
//give it a temp file name
store 'XX'+STRZERO(round(dc_random(),0),3)+ STRZERO(round(dc_random(),0),3)+'.xls' to newname
endif
endif

if !empty(newname)
oBook:SaveAs( newname , xlWorkbookNormal )
endif


***end of code

Here is the error message. Always the same, except for the filename, which depends on which program/file/report is being exported.

oError:args :
-> VALTYPE: C VALUE: SaveAs
-> VALTYPE: C VALUE: Z:\oiswin\download\payrev.xls
-> VALTYPE: N VALUE: -4143
oError:description : Cannot access 'payrev.xls'.
oError:filename : NIL
oErro: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(89) Called from PRINTREADY(1013) Called from PRTPAYRV(440) Called from (B)MAIN(1318) WORKAREA STATUS:
***end of error log.

The path is fine. and the next time it works, or maybe the time after that( we may see 2 errors, but rarely more than that)

Any help is appreciated.

Fred
Omni

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

Re: Excel Save Problem

#2 Post by Auge_Ohr »

hi,

Question : what Client OS() ? what Server OS() ?
if Win 7 / Srv W2K8 try "SMB2" Patch
and the next time it works, or maybe the time after that(
use BEGIN SEQUENCE / RECOVER to catch those Errors.

i recommend "saveas" to local Harddisk and than copy to Server UNC Path.
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 Save Problem

#3 Post by rdonnay »

I think that the file is being left open by Excel for some reason.

The next time this happens, click on Task Manager and see if Excel is still running as a process.
If so, then we need to determine why.
The eXpress train is coming - and it has more cars.

Post Reply