c# - Read already opened file -
is there way read binary data read-only file? have excel worksheet, might opened in excel want open read purposes only.
i tried way:
using (filestream filestream = file.open(filepath, filemode.open, fileaccess.read, fileshare.read)) and getting
the process cannot access file 'something.xlsx' because being used process.
is there way achieve that?
change argument:
fileshare.read to this:
fileshare.readwrite you attempting deny write access file, causing issue excel has open writing.
Comments
Post a Comment