BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/retab-ui/xlsx-workbook

XLSX workbook model

retab-ui/xlsx-workbook
FreeUtility

Sparse compact workbook helpers for the XLSX viewer: cell lookup, metadata projection, column labels, and bounded source caching.

Install it

npx shadcn@latest add https://ui.retab.com/r/xlsx-workbook.json

Source

registry/new-york-v4/lib/xlsx-workbook.tsui.retab.com/r/xlsx-workbook.json · first 6 KB
1export interface CompactSheet {
2 name: string;
3 rowCount: number;
4 columnCount: number;
5 /** Sorted row-major indexes for non-empty cells only. */
6 cellIndexes: Uint32Array;
7 /** Length cellIndexes.length + 1; cell i's text is text.slice(textOffsets[i], textOffsets[i + 1]). */
8 textOffsets: Uint32Array;
9 /** Length cellIndexes.length; 1 = numeric/date. */
10 numericFlags: Uint8Array;
11 /** All non-empty display texts concatenated in row-major order. */
12 text: string;
13}
14
15export interface XlsxCell {
16 /** Display text: the workbook's formatted value when available. */
17 text: string;
18 /** Right-align numbers and dates. */
19 numeric: boolean;
20}
21
22export interface XlsxSheetMeta {
23 name: string;
24 rowCount: number;
25 columnCount: number;
26 nonEmptyCellCount: number;
27}
28
29export interface XlsxSource {
30 sheets: XlsxSheetMeta[];
31 getCell(sheetIndex: number, rowIndex: number, columnIndex: number): XlsxCell;
32 dispose?: () => void;
33 estimatedByteSize?: number;
34}
35
36export interface XlsxCacheOptions {
37 maxEntries?: number;
38 maxBytes?: number;
39}
40
41export interface XlsxSheetChangeResult {
42 accepted: boolean;
43 changed: boolean;
44 sheetIndex: number;
45}
46
47interface CacheEntry {
48 promise: Promise<XlsxSource>;
49 source?: XlsxSource;
50 bytes: number;
51}
52
53export const EMPTY_XLSX_CELL: XlsxCell = { text: "", numeric: false };
54const MAX_COMPACT_CELL_INDEX = 0xffffffff;
55
56export function resolveXlsxSheetChange({
57 activeSheet,
58 requestedSheet,
59 sheetCount,
60}: {
61 activeSheet: number;
62 requestedSheet: number;
63 sheetCount?: number | null;
64}): XlsxSheetChangeResult {
65 if (!Number.isSafeInteger(requestedSheet) || requestedSheet < 0) {
66 return { accepted: false, changed: false, sheetIndex: activeSheet };
67 }
68 if (
69 sheetCount != null &&
70 (!Number.isSafeInteger(sheetCount) ||
71 sheetCount < 0 ||
72 requestedSheet >= sheetCount)
73 ) {
74 return { accepted: false, changed: false, sheetIndex: activeSheet };
75 }
76 return {
77 accepted: true,
78 changed: requestedSheet !== activeSheet,
79 sheetIndex: requestedSheet,
80 };
81}
82
83/** Spreadsheet column label: 0 -> A, 25 -> Z, 26 -> AA. */
84export function xlsxColumnLabel(index: number): string {
85 if (!Number.isSafeInteger(index) || index < 0) return "";
86 let i = Math.floor(index) + 1;
87 let label = "";
88 while (i > 0) {
89 const m = (i - 1) % 26;
90 label = String.fromCharCode(65 + m) + label;
91 i = Math.floor((i - 1) / 26);
92 }
93 return label;
94}
95
96// … truncated

Files it writes

  • registry/new-york-v4/lib/xlsx-workbook.ts

Facts

Registry
retab-ui
Type
registry:lib
Access
Free
Files written
1
Licence
NOASSERTION
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

ui.retab.com retab-dev/retab-ui on GitHub Raw registry item This item as JSON

More from retab-ui

All 130 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
CSV parsercsvretab-uiUtilitiesFreeno deps · 4 files
Document source modeldocument-sourceretab-uiUtilitiesFreeno deps
DOCX Document Resourcedocx-document-resourceretab-uiUtilitiesFreeno deps · 5 files
Effect Keyeffect-keyretab-uiUtilitiesFreeno deps
PDF Document Resourcepdf-document-resourceretab-uiUtilitiesFree1 dep · 6 files
Segment Interactionsegment-interactionretab-uiUtilitiesFreeno deps
Segments modelsegmentsretab-uiUtilitiesFreeno deps
Utilsutilsretab-uiUtilitiesFree2 deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex