首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

poi操作word没教程吗

2013-04-26 
poi操作word没有教程吗网上文章代码弄来报错 也没有教程 官网的例子不知道怎么用就从最简单的开始 新建一

poi操作word没有教程吗
网上文章代码弄来报错 也没有教程 官网的例子不知道怎么用

就从最简单的开始 新建一个word文档、写上一行hello world
[解决办法]

引用:
网上文章代码弄来报错 也没有教程 官网的例子不知道怎么用

就从最简单的开始 新建一个word文档、写上一行hello world

http://apachepoi.com/
楼主可以看看
我也是菜鸟一枚,不过实现了word文档的读取
[解决办法]
Simple Demo -->

public static void write() throws Exception
    {
        ByteArrayInputStream bs = new ByteArrayInputStream(new String("hello world 你好 中国").getBytes());
        
        POIFSFileSystem fs = new POIFSFileSystem();
        
        fs.getRoot().createDocument("WordDocument", bs);
        
        FileOutputStream fos = new FileOutputStream("e:\\Will.doc"); 
        
        fs.writeFilesystem(fos);
        
        fos.flush();
        fos.close();
        bs.close();
        
    }

[解决办法]
该回复于2013-04-25 17:00:16被管理员删除

热点排行
Bad Request.