J
jkristia
StreamReader throws an exception if I attempt to open a .csv file which
is also opened by Excel.
I checked this list and found what I though was the solution, first
open the file stream in read only,
But unfortunately that doesn't work either
Stream s = File.OpenRead(filename);
using (StreamReader sr = new StreamReader(s))
{
}
File.OpenRead still throws the "can not access file" exception,
however I can open the file in Notepad at the same time as it is opened
in Excel.
Is this another bug in .NET, and is there any workaround ?
Thanks
Jesper
is also opened by Excel.
I checked this list and found what I though was the solution, first
open the file stream in read only,
But unfortunately that doesn't work either
Stream s = File.OpenRead(filename);
using (StreamReader sr = new StreamReader(s))
{
}
File.OpenRead still throws the "can not access file" exception,
however I can open the file in Notepad at the same time as it is opened
in Excel.
Is this another bug in .NET, and is there any workaround ?
Thanks
Jesper