`
ntwjf
  • 浏览: 1862 次
  • 性别: Icon_minigender_1
  • 来自: 南京
文章分类
社区版块
存档分类
最新评论
文章列表

java poi导出excel

    博客分类:
  • java
<body> <a href="servlet/DownLoadExcelServlet">下载表格</a> <br> </body> public class DownLoadExcelServlet extends HttpServlet { private static final long serialVersionUID = 1L; public void doGet(HttpServletRequest request, HttpServletResp ...

java poi读写excel

    博客分类:
  • java
1、读取excel2003 @Test //读取excel2003 public void testCreateXLS(){ try { String path = "f:\\app\\iotest\\n.xls.doc"; String postfix = (path.trim().lastIndexOf(".") == -1)?"":path.substring(path.trim().lastIndexOf(".") + 1); if("xls". ...

IO操作

    博客分类:
  • java
1、文件读取 @Test public void testFileInputStream(){ InputStream in = null; try { in = new FileInputStream("f:/a/hello.txt"); int readCount = 0; byte[] buffer = new byte[1024]; while((readCount = in.read(buffer, 0, 1024)) != -1){ String str = new String(buffer,0, ...

递归应用

    博客分类:
  • java
1、求阶乘 public int f1(int n){ if(n == 1){ return 1; }else{ return n * f1(n-1); } }   2、求Fibonacci数列的第n个数是多少 public int f2(int n){ if(n == 1 || n == 2){ return 1; }else{ return f2(n - 2) + f2(n - 1); } }    3、递归删除文件夹下所有文件 public void deleteFiles(File fil ...
Global site tag (gtag.js) - Google Analytics