My program uses office interop by starting an Excel application (process) and opening an existing workbook. I must be absolutely certain that all changes written to the workbook by the program can be saved, i.e. something similar to opening a System.IO.File with FileShare.Read or FileShare.None If file is already opened for writing, my program must be able to detect that. Anyone knows how to do?
You may check readonly
or isDirty
.
With a sample program this may be checked quickly by opening the same workbook in Excel at the same time.