This commit is contained in:
SheetJS 2023-06-06 23:30:28 -04:00
parent 12ed4e13ad
commit ca1e3ce45c

View File

@ -1,6 +1,12 @@
<script setup lang="ts">
// @ts-ignore
import data from '../../data/pres.xlsx?sheetjs';
import b64 from '../../data/pres.xlsx?b64';
import { read, utils } from "xlsx";
/* parse workbook and convert first sheet to row array */
const wb = read(b64);
const ws = wb.Sheets[wb.SheetNames[0]];
interface IPresident { Name: string; Index: number; };
const data = utils.sheet_to_json<IPresident>(ws);
</script>
<template>