tags:

views:

71

answers:

2

When importing data from excel to vb.net desktop application, Im having "file is open" error.

Excel file is at the remote pc. Excel file must open and I have to reach anytime.

How can I handle this problem?

A: 

how about making a local copy and opening that one ?

Iulian
same error occured
Jack
that can't be right, can you post some code ?
Iulian
@PeaceKeeper you can't copy a file if something else has exclusive access to it.
msarchet
A: 

When Excel opens a file, it requests exclusive access. You should be able to access the same file if, when you open it, you open it in read-only mode and you allow both read sharing and write sharing.

Tim Robinson