I was googling this question, but couldn't find any solution to my problem. Sorry, if it is duplicate.
I am building *.xlsx file in my application. I want user after clicking the button at my Web GUI to have the file downloaded. I wrote smth like this:
XSSFWorkbook wb = new XSSFWorkbook();
//then setting values and styles.
ZipOutputStream zout = new ZipOutputStream(getOutputStream());
ZipEntry ze = new ZipEntry(fileName);
zout.putNextEntry(ze);
wb.write(zout);
zout.closeEntry();
zout.close();
After work of code like this I have *.zip archive, but it contains folders, xml files. I know that *.xlsx assembles from *.xml files, but I want to have correct *.xlsx file, not it's inner representation.
Please, tell me what am I doing wrong?