Explore the API
Protect worksheet input
Unlock the order's input cells, protect calculated cells, and verify that a protected formula cannot be overwritten.
Try this workflowExplore and compare
Change the inputs, run an action, and inspect the live result below.
ResultLive API output
B2:B3 remain editable. Attempts to overwrite B5 while protected are rejected and the formula is retained.
Preparing sample...
Keep exploringReset or save
Reset restores this sample's starting document. TXWB retains its spreadsheet, dashboard, and reporting definitions.
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Protect worksheet input
Cell locked flags and sheet protection work together. Protection restricts spreadsheet editing; it does not encrypt downloaded data. This example uses no password so protection can be removed from the panel.
APIs used
Range.format()
sheet.protection.protect()
sheet.protection.unprotect()
How to explore
Unlock the order's input cells, protect calculated cells, and verify that a protected formula cannot be overwritten.
B2:B3 remain editable. Attempts to overwrite B5 while protected are rejected and the formula is retained.
Document ownership
The ready event supplies the initialized editor. Each action resolves document objects from the current workbook. Reset loads a clean TXWB snapshot; worksheet, range, chart, and dashboard handles must be acquired again after loading.
The Code panel shows this sample's actual implementation and the shared hosting code. Downloads contain the current document; changes are not stored on the server.
NuGet packages
TXTextControl.TXSheetControl.AspNetCore
2.0.0-beta.1
Provides the Razor spreadsheet editor, browser APIs, and packaged fonts.
dotnet add package TXTextControl.TXSheetControl.AspNetCore --version 2.0.0-beta.1