很简单  告诉你  例子就免了你的文件格式如下 execl就能打开
string1,string2,string3;

解决方案 »

  1.   

    要是想在java里导入就麻烦了
    需要第三方的支持包
      

  2.   

    看看apache的poi,专门处理ms office与java的转化的
      

  3.   

    <servlet与jsp权威指南>上有个例子 ,但我没试成功! 我也在找这方面的资料!
      

  4.   

    http://expert.csdn.net/Expert/topic/2228/2228695.xml?temp=.8008386刚看到的!
      

  5.   

    使用poi,挺easy的,
    import org.apache.poi.hssf.usermodel.*;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.util.*;public class CreateCells{
    public static void main(String[] args) throws IOException{
    HSSFWorkbook wb = new HSSFWorkbook();//建立新HSSFWorkbook对象
    HSSFSheet sheet = wb.createSheet("new sheet");//建立新的sheet对象
    HSSFRow row = sheet.createRow((short)0);//建立新行
    HSSFCell cell = row.createCell((short)0);//建立新cell
    cell.setCellValue(1);//设置cell的整数类型的值
    row.createCell((short)0).setCellValue(1.2);//设置cell浮点类型的值
    row.createCell((short)1).setCellValue(1.2);//设置cell浮点类型的值
    row.createCell((short)2).setCellValue("test");//设置cell字符类型的值
    row.createCell((short)3).setCellValue(true);//设置cell布尔类型的值 
    HSSFCell csCell =row.createCell((short)5);
    csCell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断
    csCell.setCellValue("中文测试_Chinese Words Test");//设置中西文结合字符串
    row.createCell((short)6).setCellType(HSSFCell.CELL_TYPE_ERROR);//建立错误cell
    // Write the output to a file
    FileOutputStream fileOut = new FileOutputStream("workbook.xls");
    wb.write(fileOut);
    fileOut.close();
    }
    }