React implementation for JS-XLSX In-Browser HTML Table Edit Demo #1960
Comments
The modify demo is fairly simplistic. When the file is read, the first worksheet is rendered to an HTML TABLE. On export, the table data is scraped and the resulting file is exported. You can do this in react by using a ref on the container element. On read, you would set the innerHTML directly. On write, the ref gives you easy access to the live dom element. |
I tried the demo, and noticed that when I dropped my own Excel file and changed around the contents, the resulting downloaded file will contain the unchanged data instead. |
I'm down to do this, but I just wanted some feedback on what I think are the expectations. Would it be to recreate the existing demo, but fully functioning with modern React code, such as using hooks (v16.8+)? Is there an existing code style? I would use Also, is the React demo on the deployed docs? I can't find a way to navigate to it. |
@tarikhamilton the demos are not "deployed" anywhere. for react, you can spin up a local web server (with Instead of working through HTML, it's probably better to demo an editable grid component that is built specifically for react. Instead of pulling from the rendered grid, it would be better to use the underlying state. The "read" part of the demo would update the state based on the data in the file while the "write" part would extract the state and generate a workbook. One open question is whether to create an external demo or contribute code to the projects directly. For example, |
I want to know if there is any implementation of the demo https://sheetjs.com/demo/modify.html in react. I am new to React and want to implement the similar functionality.
The text was updated successfully, but these errors were encountered: