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

handling exceptions for error wb.write() #347

@Fayris-develop

Description

@Fayris-develop

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions