Preview: Real-Time Spreadsheet Collaboration with TX Sheet Control 2.1
Preview the upcoming collaboration packages for ASP.NET Core and Node.js, coming with TX Sheet Control 2.1.0 and free of charge with a TX Sheet Control license. Explore live editing, presence, invitations, access management, durable storage, and the API.

Work on the same spreadsheet with your team, see live selections, and share a workbook with editor or viewer access. The upcoming collaboration package for TX Sheet Control brings these capabilities to applications hosted with ASP.NET Core or Node.js.
Collaboration will be released with TX Sheet Control 2.1.0, coming soon. It will be available as a separate package for each server platform and will be free of charge in combination with a TX Sheet Control license.
A Shared Workbook with Live Presence
The preview opens a project budget. Invite a colleague, change the hours or rates, and watch both editors receive the updated amounts and total. Each participant can navigate independently while working on the same document.
Colored range outlines and initials identify other participants. Animated dots indicate that someone is editing. When a selection moves outside your viewport, its marker docks at the edge; selections on another worksheet show the worksheet name and address. Clicking a marker takes you to that selection.
Collaboration covers cell values and formulas, formatting, comments, rows and columns, worksheets, tables, charts, drawings, and dashboard definitions. Your active worksheet, scroll position, zoom, and selection remain personal. Presence indicators are temporary and are excluded from saved and exported workbooks.
Choose ASP.NET Core or Node.js
Both server packages use the same collaboration protocol and connect to the same browser client. Choose the host that fits your application:
| Component | Package |
|---|---|
| ASP.NET Core host | TXTextControl.TXSheetControl.Collaboration |
| Node.js host | @txtextcontrol/tx-sheet-control-collaboration-server |
| Browser client | @txtextcontrol/tx-sheet-control-collaboration-client |
The ASP.NET Core package hosts collaboration directly in .NET and supplies the browser collaboration script as a static web asset. Both hosts communicate over standard WebSockets. The preview targets .NET 10 and Node.js 22 or later; use matching 2.1.0 editor, processing, and collaboration packages.
Create a New Room
A room represents one shared document. Your application creates its identifier, associates it with a workbook, and provisions its owner from the authenticated account. All participants in that document connect to the same live room.
The following C# fragment creates a file-backed room with a small budget. license contains the server license, and workbookStorageRoot points to a private application data directory:
using TXTextControl.TXSheetControl.Collaboration;
using TXTextControl.TXSheetControl.Server;
// Application-lifetime engine; dispose it after all rooms have closed.
using var engine = new SharedCollaborationEngine();
// Generated on the server when an authenticated user creates a document.
var roomId = Guid.NewGuid().ToString("N");
var control = new ServerSheetControl(new ServerSheetControlOptions
{
License = license
});
var sheet = await control.Workbook.Sheets.AtAsync(0);
await sheet.Cell("A1").SetTextAsync("Shared budget");
await sheet.Cell("A2").SetValueAsync(100);
await sheet.Cell("B2").SetFormulaAsync("=A2*2");
await using var room = await CollaborationRoom.OpenAsync(
engine,
await FileCollaborationStore.OpenAsync(workbookStorageRoot, roomId),
control);
Generate a new ID when creating a new document. To reopen an existing document, reuse its ID: the store restores its accepted workbook. You can also load an existing workbook into the server control before opening a new room.
Keep the room alive while it serves connections. In an application with many documents, CollaborationRoomRegistry reuses active rooms and closes idle rooms; pair each acquisition with its release. Each room owns its supplied .NET control and store, and the shared engine outlives the rooms.
Invite People from the Share Dialog
The collaboration client adds a Share menu to the ribbon. Choose Can view or Can edit, create an invitation link, and copy it to a colleague. Applications can also offer a searchable list of allowed recipients from their own account directory.
Owners control access. Editors can share when the server policy enables it, while viewers follow accepted changes in a read-only editor. The server can allow links, selected users, both channels, or disable sharing. A link can be restricted to the configured recipient group or to a specific account.
Copy Link and Copy Link to This Sheet provide navigation for existing members. Create link creates an invitation that can grant access after authentication and validation.
Create Invitations Through the API
CollaborationSharingService manages ownership, members, sharing policy, and revocable invitation links. The C# example below continues with the room above. ownerProfile and colleagueProfile are CollaborationSharingUser records from your trusted account directory. Each authenticated request supplies its own actor ID:
// Keep access records and the signing key outside public web assets.
await using var accessStore = await FileCollaborationAccessStore.OpenAsync(
accessStorageRoot);
var sharing = new CollaborationSharingService(engine, new()
{
Secret = await accessStore.GetSigningKeyAsync(),
Store = accessStore,
PolicyAsync = (_, _) => Task.FromResult(new CollaborationSharingPolicy
{
Mode = CollaborationSharingMode.Both,
GroupName = "Project team",
LinkAudience = "allowed-users",
Users = [ownerProfile, colleagueProfile]
}),
ResolveUserAsync = (id, _) => Task.FromResult(
id == ownerProfile.Id ? ownerProfile :
id == colleagueProfile.Id ? colleagueProfile :
throw new UnauthorizedAccessException())
});
// Trusted creation: ownerProfile comes from your authenticated account directory.
await sharing.ProvisionAsync(roomId, "Shared budget", ownerProfile);
// In the inviter's authenticated request, create a recipient-bound editor link.
var invitation = await sharing.CreateInvitationAsync(
roomId, authenticatedInviterId, CollaborationInviteRole.Editor,
colleagueProfile.Id);
var invitationUrl = new Uri(applicationOrigin,
"/workbook#invite=" + Uri.EscapeDataString(invitation.Token));
// In the recipient's authenticated redemption request:
await sharing.AcceptInvitationAsync(invitation.Token, authenticatedRecipientId);
// Or grant access directly to an allowed account without an invitation link.
await sharing.ShareUsersAsync(roomId, authenticatedInviterId,
[colleagueProfile.Id], CollaborationInviteRole.Viewer);
The invitation is bound to the colleague and requests editor access. Redeem it in a separate authenticated request from that recipient. ShareUsersAsync is the alternative for granting access directly to allowed accounts; a viewer grant preserves an existing editor membership.
The application returns the link to the inviter and handles any email delivery. Invitation expiry defaults to 24 hours and is controlled by the server policy. Expiring or revoking a link prevents future redemption; remove a member explicitly to end access already granted.
The Node.js package provides equivalent operations:
import {
CollaborationSharingService, FileCollaborationAccessStore
} from '@txtextcontrol/tx-sheet-control-collaboration-server';
// Profiles and actor IDs come from your authenticated application.
const accessStore = await FileCollaborationAccessStore.open(accessStorageRoot);
const users = [ownerProfile, colleagueProfile];
const sharing = new CollaborationSharingService({
store: accessStore,
secret: await accessStore.signingKey(),
policy: async () => ({
mode: 'both', groupName: 'Project team',
linkAudience: 'allowed-users', users
}),
resolveUser: async id => {
const user = users.find(user => user.id === id);
if (!user) throw new Error('Unknown account.');
return user;
}
});
await sharing.provision(roomId, 'Shared budget', ownerProfile);
const invitation = await sharing.createInvitation(
roomId, authenticatedInviterId, 'editor', colleagueProfile.id);
const invitationUrl = new URL('/workbook', applicationOrigin);
invitationUrl.hash = 'invite=' + encodeURIComponent(invitation.token);
// Run in a separate request after authenticating the recipient.
await sharing.acceptInvitation(invitation.token, authenticatedRecipientId);
Keep the access store open for the host lifetime and close it during shutdown. Its signing key remains on the server and is retained with the access records.
Manage Access While People Are Connected
Manage Access lists members and active invitation links. Owners can change an editor to a viewer, remove a participant, revoke links, transfer ownership, or stop sharing. Connected clients receive updated permissions when access changes are wired to the transport.
The API exposes the same actions through UpdateMemberAsync, RevokeInvitationAsync, TransferOwnershipAsync, and StopSharingAsync, with corresponding methods in Node.js. Removing a member also revokes existing invitation links to prevent an old link from restoring access.
Connect Your Existing Editor
Attach CollaborationClient to a ready Spreadsheet instance. Your host provides the authenticated WebSocket endpoint and sharing HTTP routes. The default sharing adapter uses same-origin /api/ routes; applications can supply a custom room API adapter.
import { CollaborationClient }
from '@txtextcontrol/tx-sheet-control-collaboration-client';
// editor is your ready Spreadsheet instance. roomId is authorized by the host.
const collaboration = new CollaborationClient(editor, {
url: location.origin.replace(/^http/, 'ws') +
'/collaboration/' + encodeURIComponent(roomId),
sharing: { roomId }
});
await collaboration.ready;
await collaboration.sharing.ready;
// Open the same dialog available from the ribbon's Share menu.
await collaboration.sharing.openShare();
// Normal workbook API changes are synchronized too.
editor.workbook.sheets.at(0).cell('A2').setValue(125);
await collaboration.flush({ timeout: 30000 });
The server supplies the room workbook when the client connects. Normal workbook API changes then participate in collaboration. flush() commits valid active cell input and waits for durable acknowledgement of pending operations. Dispose the collaboration client with destroy() before disposing the editor.
Persist to Disk or a Database
File persistence is a practical starting point for a single application server. FileCollaborationStore stores workbook checkpoints and a checksummed operation journal. The server persists an accepted edit before acknowledging it, so reopening the room can restore accepted changes after a restart.
Membership, roles, invitation metadata, and the signing key use separate access storage. FileCollaborationAccessStore supplies durable access records. Keep both stores outside public assets and back up the workbook, access data, and signing key together.
| Storage | Use |
|---|---|
| Memory | Temporary rooms and development sessions. |
| Disk | Durable documents with one application server owning each room. |
| PostgreSQL | Transactional shared storage, fenced writer ownership, and automatic takeover between application servers. |
The optional providers are TXTextControl.TXSheetControl.Collaboration.Postgres and @txtextcontrol/tx-sheet-control-collaboration-postgres. They share a database schema. A renewable lease identifies the active application server for each document; fenced writes prevent an old owner from continuing to write after takeover. Authenticated owner discovery lets clients reconnect to the current host.
Custom database integrations can implement the workbook and access store contracts. They must preserve durable acknowledgements, revision ordering, and exclusive writer ownership. Multiple servers sharing a file directory still need explicit document-to-owner routing.
Responsive Editing with Server-Calculated Results
The browser previews edits immediately. The room then validates each submitted change, calculates formulas on the server, persists the accepted operation, and broadcasts a numbered revision. Everyone receives the same accepted results, including results from server-side custom functions.
Ordinary cell edits use a bounded command path; other workbook features use validated document snapshots. Presence travels separately from durable document revisions. Room caching avoids opening a workbook for every connection, and independent rooms can serve different documents. The hosts bound connections and write queues so load can be controlled.
Performance depends on workbook size, formula complexity, storage latency, network conditions, and concurrent editing. Tune connection limits and room retention for your workload, and monitor queue depth, calculation times, persistence latency, and reconnects. PostgreSQL supports distributing document ownership across hosts while retaining one active writer per room.
Recover Pending Work and Resolve Conflicts
The ribbon reports saving, saved, reconnecting, or conflict status. Independent cell and formatting edits can reconcile automatically. Overlapping values or structural changes may need a decision: collaboration.openRecovery() opens the built-in review UI, where users can compare pending cells and recover a workbook copy.
An optional draftKey, scoped to tenant, account, and room, retains completed pending transactions in browser storage across reloads. Per-author undo and redo use accepted server history and protect newer changes from other participants. A row deletion or sort can require explicit recovery so a pending value is not applied to a different record.
Use Your Application Authentication
Your application signs users in and supplies stable account IDs, tenant boundaries, and trusted display names. The server authorizes room access and rechecks edit permission when processing operations. A room URL or a display name alone grants no permission.
This ASP.NET Core endpoint fragment uses the existing authenticated principal and the sharing service above. applicationOrigin is the application's public HTTPS origin:
using System.Security.Claims;
// app already has your authentication and authorization middleware configured.
app.UseWebSockets();
app.MapTXSheetCollaboration("/collaboration/{documentId}", new()
{
Origins = new HashSet<string>(StringComparer.Ordinal)
{
applicationOrigin.GetLeftPart(UriPartial.Authority)
},
AuthorizeAsync = async (context, id) =>
{
var accountId = context.User.FindFirstValue(ClaimTypes.NameIdentifier);
return context.User.Identity?.IsAuthenticated == true && accountId is not null
? await sharing.AuthorizeAsync(id, accountId, context.RequestAborted)
: null;
},
// This example hosts one document. Use a room registry for many documents.
GetRoomAsync = id => id == roomId
? Task.FromResult(room)
: throw new UnauthorizedAccessException()
});
Connect sharing.AccessChanged to CollaborationEndpoint.RefreshPermissionsAsync for the affected live room so role changes reach connected users immediately. Both transports also recheck permissions periodically. In Node.js, pass the sharing service to CollaborationServer through its sharing option.
Sharing HTTP routes must also authenticate the actor and protect state-changing requests. Configure exact allowed origins and HTTPS/WSS, and keep invitation signing keys in private server storage. Your existing identity system remains responsible for sign-in, session revocation, and account lifecycle.
Try the Preview
Open the collaboration demo, create an invitation, and open it in a private window or another browser. Change a budget input, move between cells, and try switching a participant from editor to viewer.
TX Sheet Control 2.1.0 is coming soon. The separate ASP.NET Core and Node.js collaboration packages will be free of charge with a TX Sheet Control license. Explore the TX Sheet Control documentation for the editor and server APIs.
Frequently Asked Questions
Collaboration will be released with TX Sheet Control 2.1.0, coming soon.
The separate collaboration packages for ASP.NET Core and Node.js will be free of charge in combination with a TX Sheet Control license.
No. File storage provides durable persistence with one application server owning each room. The optional PostgreSQL providers add transactional shared storage and automatic takeover between hosts.
Yes. CollaborationSharingService provisions rooms, grants allowed accounts access, creates and redeems invitations, changes roles, and revokes links. Each operation uses an authenticated actor identity supplied by your application.
No. Revocation prevents future redemption. Remove the member to end previously granted access. Member removal also revokes invitation links so an old link cannot restore access.
The collaboration host validates edits and calculates accepted results on the server before persisting and broadcasting the revision. Browser editors display the same accepted results.
TX Sheet Control
Excel-compatible spreadsheet editing, a robust calculation engine, and interactive dashboards for business applications.
Related Post
ASP.NETASP.NET CoreCollaboration
Introducing TX Text Control Web Collaboration Preview for ASP.NET Core
The first preview of TXTextControl.Web.Collaboration adds server-authoritative collaboration rooms, sharing links, presence indicators, and defensive document synchronization to the TX Text…
