ByteArrayOutputStream byteArrayOSForTransactions = new ByteArrayOutputStream();
StringBuilder errors = new StringBuilder();
SheetData[] reports = buildReport(errors);
SpreadsheetBuilder spreadsheetBuilderForDebts = new SpreadsheetBuilder();
SpreadsheetBuilder spreadsheetBuilderForExemptions = new SpreadsheetBuilder();
SpreadsheetBuilder spreadsheetBuilderForTransactions = new SpreadsheetBuilder();
spreadsheetBuilderForDebts.addSheet("dividas", reports[0]);
spreadsheetBuilderForExemptions.addSheet("isencoes", reports[1]);
spreadsheetBuilderForTransactions.addSheet("transaccoes", reports[2]);
spreadsheetBuilderForDebts.build(WorkbookExportFormat.TSV, byteArrayOSForDebts);
spreadsheetBuilderForExemptions.build(WorkbookExportFormat.TSV, byteArrayOSForExemptions);
spreadsheetBuilderForTransactions.build(WorkbookExportFormat.TSV, byteArrayOSForTransactions);
byteArrayOSForDebts.close();
byteArrayOSForExemptions.close();
byteArrayOSForTransactions.close();