My code reads an excel sheet and returns me a list of IDs, but when I try to save the output that appears on the console to a txt file it returns me null. Does anyone know what?
while ((output = buffer.readLine()) != null) {
if (output.contentEquals("# rc=0, count=0, message=Success")) {
FileOutputStream f = new FileOutputStream("file2.txt");
System.setOut(new PrintStream(f));
System.out.println(row.getCell(0));
}
}