search

Home  >  Q&A  >  body text

java - struts2下载excel

高洛峰高洛峰2801 days ago752

reply all(3)I'll reply

  • P粉073609592

    P粉0736095922023-01-09 18:28:03

    Who can tell me why I can't see the content of these questions: - When struts2 downloads excel and uses struts2 to download files, I find that the fileName cannot be obtained in the download prompt box that opens. The related configuration of downloading excel in struts.xml is as shown in the figure: there is a private fileName variable name in the action, and there are also set and get methods. But download.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 10:47:38

     <param name="contentDisposition">attachment;filename="${fileName}"</param><param name="contentType">application/vnd.ms-excel,charset=ISO8859-1</param>

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-18 10:47:38

    Just add a piece of code and it’s ready

    reply
    0
  • Cancelreply