This project is read-only.
1
Vote

read file that is opened in Excel

description

If CSV file is opened in Excel then CsvContext.Read is not able to read the file content. Possible fix is replace the code (CsvContext.cs, line 113):
stream = new StreamReader(
fileName,
fileDescription.TextEncoding,
fileDescription.DetectEncodingFromByteOrderMarks);
by smth like
stream = new StreamReader(
new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite),
fileDescription.TextEncoding,
fileDescription.DetectEncodingFromByteOrderMarks);

comments