实现功能:

  1、Excel模板下载

  2、导入excel

一、jsp效果和代码

java实现导入excel功能

 1 <form id="uploadForm" target="frameFile" class="bs-docs-example form-horizontal" method="post" action="<%=path %>/webCenter.do" enctype="multipart/form-data">
 2                 <input type="hidden" id="conId" name="conId" value="<%=conId%>">
 3                 <input type="hidden" id="code" name="code" value="<%=code%>">
 4                 <input type="hidden" name="method" value="insertUserInfo">
 5                 <table cellpadding="0" cellspacing="0" border="0" style="width:600px;margin:20px auto;text-algin:left;">
 6                 <tr><td colspan="4"><input id="dyId" type="hidden"/></td></tr>
 7                 <tr><td colspan="3"><a href="/center/file/userInfoModel.xlsx" id="downloadModel" name="downloadModel" style="margin-left:7px;"><u>点击下载人员模板</u></a></td></tr>
 8                 <tr><td colspan="4"><br/></td></tr>
 9                 <tr><td colspan="3"><input id="files" name="files" type="file" style="width:200px;"/></td></tr><!-- background:url('/center/images/uploadImg.png') no-repeat 0px 10px; -->
10                 <tr><td colspan="4"><br/></td></tr>
11                 <tr>
12                     <td colspan="4" style="text-align: center;">
13                     <hr style="width:720px;border-width: 0.3px;margin-left:-10px;">
14                         <button id="tiJiao" type="button" class="czbtn" style="width:100px;font-size: 16px;">导入</button>
15                     </td>
16                 </tr>
17                 </table>
18             </form>
View Code

相关文章:

  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2021-10-26
  • 2022-12-23
  • 2021-12-22
  • 2021-12-15
猜你喜欢
  • 2021-12-12
  • 2022-12-23
  • 2021-11-08
  • 2022-12-23
  • 2021-07-25
  • 2021-12-13
  • 2021-07-04
相关资源
相似解决方案