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/excel-splitting-viewer-block

Excel Splitting

retab-ui/excel-splitting-viewer-block
FreeBlock

One Excel workbook fanned out into several clean CSVs — each reconstructed table rendered in the viewer, with a sidebar listing every CSV the splitter emitted, the sheet it was carved from, and how it was reconstructed. Selecting one opens that CSV.

Install it

npx shadcn@latest add https://ui.retab.com/r/excel-splitting-viewer-block.json

Source

registry/new-york-v4/blocks/excel-splitting-viewer-block.tsxui.retab.com/r/excel-splitting-viewer-block.json · first 6 KB
1"use client";
2
3import * as React from "react";
4import { FileSpreadsheet, TableProperties } from "lucide-react";
5
6import { cn } from "@/lib/utils";
7import { CsvViewerDocument } from "@/components/ui/csv-viewer";
8import {
9 FileViewer,
10 FileViewerContent,
11 FileViewerControls,
12 FileViewerHeader,
13 FileViewerInset,
14 FileViewerProvider,
15 FileViewerSidebar,
16 FileViewerSidebarContent,
17 FileViewerSidebarTrigger,
18 FileViewerTitle,
19 FileViewerViewport,
20} from "@/components/ui/file-viewer";
21import { XlsxViewer } from "@/components/ui/xlsx-viewer";
22import { SEGMENT_PALETTE } from "@/lib/segments";
23import csvOutputs from "@/components/viewers/sample-data/excel-splitting.json";
24
25const WORKBOOK_ID = "workbook";
26const WORKBOOK_NAME = "nvidia-financials-fy2024.xlsx";
27const XLSX_URL = "/samples/nvidia-financials-fy2024.xlsx";
28
29const WORKBOOK_SOURCE = {
30 kind: "url" as const,
31 url: XLSX_URL,
32 fileName: WORKBOOK_NAME,
33};
34
35type CsvId = keyof typeof csvOutputs;
36
37/**
38 * One CSV the Excel splitter emitted. `sheetLabel` is the workbook sheet it was
39 * carved from; `enrichment` is the reconstruction step that turned that raw
40 * sheet into a clean, partition-ready table. The CSV text itself lives in the
41 * sample-data JSON, keyed by `id`.
42 */
43type CsvOutput = {
44 id: CsvId;
45 fileName: string;
46 sheetLabel: string;
47 enrichment: string;
48};
49
50const CSV_OUTPUTS: CsvOutput[] = [
51 {
52 id: "income-statement",
53 fileName: "income-statement.csv",
54 sheetLabel: "Consolidated Statements of Income",
55 enrichment: "Period columns flattened to one header",
56 },
57 {
58 id: "comprehensive-income",
59 fileName: "comprehensive-income.csv",
60 sheetLabel: "Consolidated Statements of Comprehensive Income",
61 enrichment: "Section banners kept as label rows",
62 },
63 {
64 id: "balance-sheet",
65 fileName: "balance-sheet.csv",
66 sheetLabel: "Consolidated Balance Sheets",
67 enrichment: "Merged title cell dropped",
68 },
69 {
70 id: "shareholders-equity",
71 fileName: "shareholders-equity.csv",
72 sheetLabel: "Consolidated Statements of Shareholders' Equity",
73 enrichment: "Equity-component matrix melted to columns",
74 },
75 {
76 id: "cash-flows",
77 fileName: "cash-flows.csv",
78 sheetLabel: "Consolidated Statements of Cash Flows",
79 enrichment: "Blank filler cells cleared",
80 },
81];
82
83// Stable {kind:"text"} source per CSV so selecting one swaps the document
84// without re-creating the viewer resource on every render.
85const CSV_SOURCE_BY_ID = new Map(
86// … truncated

What it pulls in

npm packages

  • lucide-react

Other registry items

  • @retab/file-viewer
  • @retab/csv-viewer
  • @retab/xlsx-viewer
  • @retab/segments

Files it writes

  • registry/new-york-v4/blocks/excel-splitting-viewer-block.tsx
  • components/viewers/sample-data/excel-splitting.json

Facts

Registry
retab-ui
Type
registry:block
Access
Free
Files written
2
Licence
NOASSERTION
First indexed
2026-08-04
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
Classify Consensusclassify-consensus-viewer-blockretab-uiBlocksFree1 dep · 4 files
CSV Sourcescsv-sources-blockretab-uiBlocksFreeno deps · 2 files
DOCX Sourcesdocx-sources-blockretab-uiBlocksFreeno deps · 2 files
Avatar Image Slotdropzone-avatar-image-slotretab-uiBlocksFree1 dep · 2 files
Dropzonedropzone-blockretab-uiBlocksFree1 dep · 26 files
Comparison Pairdropzone-comparison-pair-uploadretab-uiBlocksFree1 dep · 2 files
Controlled Queuedropzone-controlled-queueretab-uiBlocksFree1 dep · 2 files
Custom Thumbnail Griddropzone-custom-thumbnail-gridretab-uiBlocksFree1 dep · 2 files
BlockDex

Built by

Kynth Studio

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

BlockDex

BlockDex

Built by

Kynth Studio

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

BlockDex

BlockDex

Built by

Kynth Studio

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

BlockDex