C# Excel file can't be opened normally

J

Jason Huang

Hi,

My C# Windows Form application has a form frmExcel which will write data to
an Excel 2000 file MyExcel.xls.
But if the application is still runnig then the MyExcel.xls can not be
opened normally.
The MS Excel 2000 will be opened, but there's no WorkBook(or WorkSheet)
inside the Excel,
if I stop running the application, the the MyExcel.xls can open normally.
What do I need to fix this problem?
Also, if the MS Excel is running the MyExcel.xls, then the frmExcel can't
write data to MyExcel.xls, it will result in errors.
What do I need to fix this problem?
Any help will be appreciated.

Jason
 
?

=?ISO-8859-1?Q?Lasse_V=E5gs=E6ther_Karlsen?=

Jason said:
Hi,

My C# Windows Form application has a form frmExcel which will write data to
an Excel 2000 file MyExcel.xls.
But if the application is still runnig then the MyExcel.xls can not be
opened normally.
<snip>

Several questions:
- are you using a third party library or have you written the code yourself?
- are you making sure to close any open files in your program?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top