Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

handling exceptions for error wb.write() #347

Open
Fayris-develop opened this issue Sep 19, 2021 · 0 comments
Open

handling exceptions for error wb.write() #347

Fayris-develop opened this issue Sep 19, 2021 · 0 comments

Comments

@Fayris-develop
Copy link

Fayris-develop commented Sep 19, 2021

Good afternoon. Is there some way to catch errors when writing is not possible?

I'll tell you right away that I'm a beginner. For some time I could not understand why my program crashes, and then I realized that I had an output file open. Is it possible to somehow prevent the program from crashing and let the user know about it?

This construction doesn't work:

try {
wb.write('Result.xlsx');
}
catch (ex) {
console.log("Close result file");
}

Environment (please complete the following information):

  • OS: Windows 7
  • excel4node Version: 1.7.2
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant