I'm trying to manipulate an Excel spreadsheet in C# using OpenXML. Specifically, I would like to access the currently active workbook that is open. I've only been able to find examples that open up an Excel document given a filename, such as:
using (SpreadsheetDocument myWorkbook =
SpreadsheetDocument.Open(filename, true))
(Note: Using the 'Microsoft.Office.Interop.Excel' way, the active workbook is accessed like:
Workbook activeWorkBook = (Workbook)Globals.ThisAddIn.Application.ActiveWorkbook;
)
Has anyone done this?