Hi All,
I want to create excel file which user can't edit.
Also user not able to copy the contents of generated file.
Is it possible in c#.net windows application
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh KumarPosted Nov 19, 2018, 10:20 PM
Alex SmithPosted Mar 14, 2016, 5:28 AM
using Spire.Xls;
namespace lock_excel_worksheet
{
{
static void Main(string[] args)
{
Workbook workbook = new Workbook();
workbook.LoadFromFile(@"..\lock worksheet.xls");
workbook.Worksheets[0].Range.Style.Locked = true;
workbook.Worksheets[1].Range.Style.Locked = true;
workbook.SaveToFile("result.xls");
}
}
}
Abhay ShankerPosted Feb 6, 2016, 12:33 PM
Rajeesh MenothPosted Feb 6, 2016, 8:23 AM