如果你在Windows下面的话,方法很多了。ExcelAccessor (http://www.alphaworks.ibm.com/alphabeans)Bridge2Java (http://alphaworks.ibm.com/)SWT (http://www.eclipse.org/)... ... ... ...

解决方案 »

  1.   

    http://www.andykhan.com/jexcelapi/index.html
      

  2.   

    输出:
    public void CSVOUT(ClientRowSet rsQuery)
        {
            try
            {
                BufferedWriter bufout;
                File FilePath = new File(strCSVOUT_PATH+"\\"+
                  this.getSessionParam().getValueAsString(CMN_APP_ColConstant.MANNO)
                  +"_nof.csv");
                bufout = new BufferedWriter(new FileWriter(FilePath));
                bufout.write(",休暇届出設定,,");
                bufout.newLine();
                bufout.write("届出コード,届出内容,対象MHシート,日数");
                String outRow ="";
                rsQuery.moveFirst();
                for (int i=0;i<rsQuery.getRowCount();i++)
                {
                    outRow = rsQuery.getValueAsString(CMN_APP_ColConstant.NOTIF_CD);
                    outRow += ",";
                    outRow += rsQuery.getValueAsString(CMN_APP_ColConstant.NOTIF_NAME);
                    outRow += ",";
                    outRow += rsQuery.getValueAsString(CMN_APP_ColConstant.MHSHEET);
                    outRow += ",";
                    outRow += rsQuery.getValueAsString(CMN_APP_ColConstant.ABS_DAY);
                    rsQuery.moveNext();
                    bufout.newLine();
                    bufout.write(outRow);
                }
                bufout.close();        }
            catch (Exception e)
            {
                System.out.println(e);
            }
        }
    需要说明一下:
    这里的方法一般在JAVA里是可用的,但是我这些程序是用框架做的,所以呢?如果有什么问题,你只要修改一下就OK了!
    祝你好运...........
      

  3.   

    不能產生csv的excel,我需要的是*.xls的,因為我還要再裡面劃線等操作