Thanks for the helpful links to MRI.
I figured out a little how it works and I managed to generate the code provided by
JeJe.
But the code is generated naturally on an already running instance of the OOo document.
How to get an open document about which my program knows nothing, I still do not understand.
As
ms777 says, getting control of the OOo document open before running my C# program is not that easy.
That was the way it was planned.
Similar actions were implemented by me on MS Excel:
Code: Select all
app = System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Application") as Excel.Application;
Excel.Worksheetsheet = app.ActiveSheet;
varactivRow = app.ActiveCell.Row;
I am ready to accept that my program will start earlier and I will open a document from it by reference (this is acceptable).
After that, getting the address of the active cell is much easier, as I understand it.
My program code is simple - there are some buttons to upload information from another application and save the data in a OOo file.
After that, the user manipulates the file, then, if necessary, launches my program and, according to the data from the cells, contacts the program with the data source in the table.
Now I will add a button to open the file from my application and work with it afterwards.