In one of my project, I am using OpenXML SDK for opening Excel files. Recently I got an issue like SpreadsheetDocument.Open() method was throwing an IOException, if the Excel file is opened by MS Excel, even if I set the isEditable parameter false.
I fixed this problem by passing a stream instead of string (file path). And I used the File stream class to open the Excel file. Here is the code snippet.
Happy Coding :)
Did you like this article? Share it with your friends