I need create xls-file with own data. But file may already be created, and opened by user.
(1) If file not exist:
new ApplicationClass()
Workbooks.Add()
SaveAs()…
(2) If file exist and not opened: not problem – goto (1)
(3) if the file exists and is opened by the user: need find it workbook and reform data of worksheet.
With (3) I have problem. Marshal.GetActiveObject(“Excel.Application”) finded only active workbook.
I know is late to answer you, but may be useful to someone else.