qwik-excel-renderer
v0.1.0
Published
A Qwik library to render and display excel sheets on webpage
Downloads
1
Readme
qwik-excel-renderer
A Qwik library to render and display excel sheets on webpage.
Installation
npm i qwik-excel-renderer
pnpm add qwik-excel-renderer
yarn add qwik-excel-renderer
bun add qwik-excel-renderer
import {
NoSerialize,
component$,
noSerialize,
useSignal,
} from "@builder.io/qwik";
import { useXLSXRenderer,XLSXTable } from "qwik-excel-renderer";
export default component$(() => {
const { xlsxRenderer, data } = useXLSXRenderer();
const file = useSignal<NoSerialize<File>>();
return (
<div>
<input
type="file"
onChange$={(e) => {
file.value = noSerialize((e.target as HTMLInputElement).files?.[0]);
}}
/>
<button
onClick$={async () => {
await xlsxRenderer(file.value);
}}
>
Render XLSX data
</button>
{data && (
<div>
<XLSXTable data={data} />
</div>
)}
</div>
);
});