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

Why doesn't writing to a file work? #10

Open
iamakimmer opened this issue Dec 17, 2013 · 4 comments
Open

Why doesn't writing to a file work? #10

iamakimmer opened this issue Dec 17, 2013 · 4 comments

Comments

@iamakimmer
Copy link

If I took the example, and just tried to write to a file instead of writing to the response:

 var result = nodeExcel.execute(conf);
  fs.writeFileSync("./write_file.xlsx", result);

The file is corrupted..why wouldn't this work?

@thnick
Copy link

thnick commented Dec 17, 2013

I been struggling with the same issue for 2 days.

@functionscope
Copy link
Owner

try

fs.writeFileSync("./write_file.xlsx", result, 'binary');

On Tue, Dec 17, 2013 at 2:50 PM, thnick [email protected] wrote:

I been struggling with the same issue for 2 days.


Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-30784322
.

@iamakimmer
Copy link
Author

Same issue for me, how about you @thnick?

@thnick
Copy link

thnick commented Dec 18, 2013

Hey @iamakimmer, I ended up using 'node-xlsx' to produce a stream I could save as a file / do other stuff with, I was able to get it to work with little issue.

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

3 participants