Home > Back-end >  Poi generate excel how to output a file
Poi generate excel how to output a file

Time:12-08

Such as topic, how to output a file after the excel is generated by poi, no output to a local, as long as the input into a file
I think only workbook first. The write () writes local, then read access to the file from the local
Are there any other better way

CodePudding user response:

No one know, top

CodePudding user response:

Didn't understand...

CodePudding user response:

https://www.cnblogs.com/mengyi/p/8426645.html

CodePudding user response:

Where you can run the program to build a temporary folder and write the file, return to the address of a file, there can be used casually

CodePudding user response:

Using the file stream -

CodePudding user response:

With the flow line, why want to save the local
 
.

Workbook wb=null;

OutputStream OS=response. GetOutputStream ();
The response. The reset ();
The response. SetHeader (" the Content - disposition, "
"The attachment; Filename="+ new String (filename. GetBytes (" utf-8"), "ISO - 8859-1) + type);
Response. SetContentType (file. The getContentType ());
Wb. Write (OS);
.
  • Related