Export to Excel error


04-19-2009, 10:15 PM
I am experiencing an intermittent error when exporting the contents from a Sharpgrid screen.  The error being logged is:

"OLE IDispatch exception code 0 from DDSharpGridOLEDB2.Grid: ActiveReports Excel Export Error:File could not be opened.
Extended Info : Access is denied. Filename may not be correct or File may be open."

The export is being done to overwrite an existing file.  When the error is received, the original file is deleted (must happen as part of the process I guess).

Subsequent attempts to export the data will work.

How can I determine the actual cause of this error?


thanks,

pete

Re: Export to Excel error


04-20-2009, 12:38 AM

pete,

Please ensure you are using the latest exclexpt.dll version. You can find more information here:
http://www.datadynamics.com/forums/111941/ShowPost.aspx.

Also, this error typically means the file you are exporting to is currently locked by another process (if you have this file open by Excel it won't let you do this) you need to shut down anything that is referencing that file before it will release the lock and allow you to export.

Thank you,
Andrey T.

Re: Export to Excel error


04-20-2009, 5:10 PM

Actually we are using that version of the excel export dll but I will make doubly sure.

I have been assured by the user that the file is not open in Excel


pete