apache jarkarta下面的POI project有

解决方案 »

  1.   

    对,用POI最好了,
    里面有例子,很简单的。
      

  2.   

    http://jakarta.apache.org/builds/jakarta-poi/
      

  3.   

    import org.apache.poi.hssf.usermodel.HSSFWorkbook;import java.io.FileOutputStream;
    import java.io.IOException;/**
     * This example creates a new blank workbook.  This workbook will contain a single blank sheet.
     *
     * @author Glen Stampoultzis (glens at apache.org)
     */
    public class NewWorkbook
    {
        public static void main(String[] args)
            throws IOException
        {
            HSSFWorkbook wb = new HSSFWorkbook();
            FileOutputStream fileOut = new FileOutputStream("workbook.xls");
            wb.write(fileOut);
            fileOut.close();
        }
    }