Open Excel readonly

Hi,



I have a question regarding open file. Is it possible to open file readonly?



thank you


What do you mean readonly? Do you mean that a file is readonly in MS Excel?

You can try to use a readonly template file and use Aspose.Cells to process and save the file.

If you open an Excel file that has already been open by someone else, MS-EXCEL will pop up a message and ask you if you would like to open it readonly. means you can't save back to the same file.

If the aspose cells attempts to open a file that is currently open by someone else, it will crash. I was wondering if there is a way to open the file while it's open somewhere else. I know in MS-Word that you can pass a parameter to openfile function that allows your ms-word object to open the file still.

Thank you

Hi,

Thanks for considering Aspose.

Well you will open the excel file with Read only attribute, Then you may use Aspose.Cells to open and save the results.

Regards

Amjad Sahi

Aspose Nanjing Team

Thank you for quick reply. But how do I open the Excel file with
Readonly attribute? Would it be possible that you can provide me an
example?



Thank you



Alan


Hi Alan,

When Aspose.Cells opens a file, it opens it with readonly mode. So you can use multiply programs to access a single file with Aspose.Cells. However, if you use MS Excel to open a file, it denys other applications to access this file because MS Excel opens a file with exclusive mode.

To access a file with Aspose.Cells when you opening a file with MS Excel, you have to open it with Readonly mode in MS Excel as Amjad suggested. Please check the attached screenshot.

Got it. Thank you