Visual spreadsheet validation powered by Zod. Upload, define schemas, and catch errors before they reach production.
A complete toolkit to validate spreadsheet data with type safety, performance, and full control over the experience.
Define your data shape with Zod schemas. Every row is validated against your schema, with detailed per-cell error reporting and type-safe callbacks.
import { z } from "zod"
import { TableReader } from "spreadsheet-validator"
const schema = z.object({
name: z.string().min(1),
email: z.string().email(),
age: z.number().min(18),
})
<TableReader file={file} schema={schema} />Drop in any Excel or CSV file. The component handles parsing, date code conversion, and encoding. Get callbacks for both errors and parsed data.
<TableReader
file={selectedFile}
schema={schema}
errorIssuesLog={(errors) => {
console.log("Validation errors:", errors)
}}
onTableData={(data) => {
console.log("Parsed rows:", data.length)
}}
/>Full control over table appearance. Match your app's design system with the styleTable prop — colors, borders, fonts, and border radius.
<TableReader
file={file}
schema={schema}
styleTable={{
backgroundColor: "#0a0a0a",
headerColor: "#10b981",
textColor: "#fafafa",
borderColor: "#1a1a1a",
tableBorderRadius: "12px",
fontFamilyHeader: "Inter",
paddingCell: "0.5rem",
paddingHeader: "0.5rem",
}}
/>Renders only visible rows using virtual scrolling with configurable overscan. Handle 100k+ rows without breaking a sweat.
<TableReader
file={file}
schema={schema}
rowHeight={36}
overscan={5}
containerHeight={600}
/>Add contextual tooltips to any column header. Guide users through expected data formats and validation rules.
<TableReader
file={file}
schema={schema}
columnInfo={[
{ name: "email", message: "Valid email required" },
{ name: "age", message: "Must be 18 or older" },
{ name: "role", message: "admin | editor | viewer" },
]}
/>Heavy validation runs off the main thread. Your UI never freezes, even with 100k+ rows.
User drops an XLSX or CSV file into the component
File is read and parsed using the XLSX library
Spreadsheet data is converted to JSON and rendered in the table
Data + Zod schema sent to a Web Worker for background validation
Validation results return, errors are highlighted per cell