I have an app that reads data from an Excel workbook. It fails when the workbooks is already opened by someone else. I'm not writing to this workbook at all, so read-only would be just fine for my purposes.
Is there a way to read from an Excel workbook that someone else already has open? This is the beginning of the code that accesses the workbook and where it fails.
foreach (var worksheet in Workbook.Worksheets(excelInput))
{
foreach (var row in worksheet.Rows.Skip(1))
{
DataRow dr = dt.NewRow();
foreach (var cell in row.Cells)