Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React implementation for JS-XLSX In-Browser HTML Table Edit Demo #1960

Open
parulcoer opened this issue May 21, 2020 · 3 comments
Open

React implementation for JS-XLSX In-Browser HTML Table Edit Demo #1960

parulcoer opened this issue May 21, 2020 · 3 comments

Comments

@parulcoer
Copy link

@parulcoer parulcoer commented May 21, 2020

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.

@SheetJSDev
Copy link
Contributor

@SheetJSDev SheetJSDev commented Jun 3, 2020

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.

@leemerlas
Copy link

@leemerlas leemerlas commented Aug 3, 2020

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.

@tarikhamilton
Copy link

@tarikhamilton tarikhamilton commented Oct 27, 2020

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 prettier, if none is specified.

Also, is the React demo on the deployed docs? I can't find a way to navigate to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.