Apache POI Servlet Sheet Already Exists

I’m using Apache POI to download a “.xls” from my servlet, the name of the file is “Download.xls” as it is the name of my servlet plus the extension.

When I try to download the file the first time it works fine, but the second time it shows the error.

java.lang.IllegalArgumentException: The workbook already contains a sheet named 'General Results'

Again, I’m not trying to re-write a previously existing file, and I’m closing my outputstream after I use it.

The code goes like this.

public class DownloadReports extends HttpServlet {// is maped as Download is xml

        Workbook wb = new XSSFWorkbook();
<... more vars ...>
public DownloadReports(){
<... initialize vars for styles ...>
}

protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        processRequest(request, response);
        String report = request.getParameter("report");

if (report== null) {
            report = "";
        }

switch (report) {
            case "Full":
                generalReport(request, response);
                break;
default:
<... Log attempt...>
}
}

protected void reporteGeneral(HttpServletRequest request, HttpServletResponse response) {
        ServletOutputStream fileOut = null;
        try {
....
Sheet fullReport = wb.createSheet("Full Report");
....
response.setContentType("application/vnd.ms-excel");
            fileOut = response.getOutputStream();
            //fileOut.
            wb.write(fileOut);
            wb.close();
            fileOut.close();
            fileOut.flush();
        } catch (Exception e) {
<... log attempt ...>
}
}}

Some code ommited.

Id like to know why it tries to over-write an existing file or if there is a way to create a new name for the workbook each time.

I suspect it might have something to do with me declaring the workbook outside a method.

Any help to understand what is going on will be greatly apreciated.