We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to create excel file in read-only mode

Thread ID:

Created:

Updated:

Platform:

Replies:

98441 Feb 28,2011 11:03 AM Mar 1,2011 02:34 AM ASP.NET Web Forms (Classic) 1
loading
Tags: XlsIO
Ram Thatikonda
Asked On February 28, 2011 11:03 AM

Hi Syncfusion,

What settings should be overridden for the excel file to save in read-only mode?

Thanks!


Sridhar [Syncfusion]
Replied On March 1, 2011 02:34 AM

Hi Ram,

Thank you for using syncfusion products.

We can create an excel file in read - only mode. i have given below the code.

Iworkbook workbook=application.workbooks.OpenReadOnly(filename);

and it does not override any setting of an worksheet.

To save an readonly i have attached here with the sample, where we have to change the FileAttributes and write it to the file, then only we can save it.

Please try the sample and let us know if this helps you.

Pleae let us know if you require any further clarifications.
Thanks,
Sridhar.S







OpenReadonlyfile_6a4d2ee1.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;