public void write2File(String filePath) throws Excel4JException {

        try (FileOutputStream fos = new FileOutputStream(filePath)) {
            this.workbook.write(fos);
        } catch (IOException e) {
            throw new Excel4JException(e);
        }
    }
public void write2File ( String filePath ) throws Excel4JException { try ( FileOutputStream fos = new FileOutputStream ( filePath ) ) { this . workbook . write ( fos ) ; } catch ( IOException e ) { throw new Excel4JException ( e ) ; } }
将文件写到相应的路径下

@param filePath 输出文件路径