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

Saving a file automatically (without a button) #21

Open
e-ndrus opened this issue Jan 14, 2019 · 1 comment
Open

Saving a file automatically (without a button) #21

e-ndrus opened this issue Jan 14, 2019 · 1 comment

Comments

@e-ndrus
Copy link

e-ndrus commented Jan 14, 2019

Sorry for a noob question. Is it possible for this module to trigger file creation without a user having to click on a button? Looking for a solution to do the work this module does but in the background. Thanks for any tips!

@shuhad
Copy link

shuhad commented Nov 30, 2020

I made it work like this
<Workbook
filename={props.fileName}
element={}
>

and called this on my useeffect (since its a react app) you can do document.ready or anything
useEffect(() => {
document.getElementById("downloadBtn").click();
}, []);

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

No branches or pull requests

2 participants