import Head from 'next/head'; import Link from "next/link"; import { read } from 'xlsx'; import base64 from "@/sheetjs.xlsx"; export default function Index({type, snames}) { return ( <> {`SheetJS Next.JS ${type} Demo`}

{`SheetJS Next.JS ${type} Demo`}

This demo reads from /sheetjs.xlsx

Each worksheet maps to a path:

{snames.map((sname, idx) => ())}
Sheet NameURL
{sname} /sheets/{idx}
); } export async function getStaticProps() { const wb = read(base64, {type: "base64"}); return { props: { type: "getStaticPaths", snames: wb.SheetNames, }, } }