--- title: Sheets in Kiru Sites sidebar_label: Kiru description: Build interactive websites with Kiru. Seamlessly integrate spreadsheets into your app using SheetJS. Bring Excel-powered workflows and data to the modern web. pagination_prev: demos/index pagination_next: demos/grid/index sidebar_position: 1 --- import current from '/version.js'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import CodeBlock from '@theme/CodeBlock'; [Kiru](https://kirujs.dev/) is a JavaScript library for building user interfaces. [SheetJS](https://sheetjs.com) is a JavaScript library for reading and writing data from spreadsheets. This demo uses Kiru and SheetJS to process and generate spreadsheets. We'll explore how to load SheetJS in Kiru components and compare common state models and data flow strategies. :::note pass This demo focuses on Kiru concepts. Other demos cover general deployments: - [Desktop application powered by Tauri](/docs/demos/desktop/tauri) ::: :::caution Kiru support is considered experimental. Great open source software grows with user tests and reports. Any issues should be reported to the Kiru project for further diagnosis. ::: ## Installation [The "Frameworks" section](/docs/getting-started/installation/frameworks) covers installation with Yarn and other package managers. The library can be imported directly from JS or JSX code with: ```js import { read, utils, writeFile } from 'xlsx'; ``` ## Internal State The various SheetJS APIs work with various data shapes. The preferred state depends on the application. ### Array of Objects Typically, some users will create a spreadsheet with source data that should be loaded into the site. This sheet will have known columns. #### State The example [presidents sheet](https://docs.sheetjs.com/pres.xlsx) has one header row with "Name" and "Index" columns. The natural JS representation is an object for each row, using the values in the first rows as keys:
Spreadsheet | State |
---|---|
 | ```js [ { Name: "Bill Clinton", Index: 42 }, { Name: "GeorgeW Bush", Index: 43 }, { Name: "Barack Obama", Index: 44 }, { Name: "Donald Trump", Index: 45 }, { Name: "Joseph Biden", Index: 46 } ] ``` |
Name | Index |
---|---|
{row.Name} | {row.Index} |
Name | Index |
---|---|
{pres.Name} | {pres.Index} |
Loading ... | |
{error.message} |
Name | Index |
---|---|
{pres.Name} | {pres.Index} |