POI生成excel文件的问题! 不会吧,你分别对不同的cell设定格式就可以了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我用过POI,但只是简单的用一下,也许POI还没有领会OLE2的全部? yuechun(加密狗),你用好使么?我的代码:row = sheet.createRow(0);cell_0 = row.createCell((short)6);cell_0.setEncoding((short)HSSFCell.ENCODING_UTF_16);cell_0.setCellValue("我是我是");font.setFontHeightInPoints((short)24);style.setFont( font );cell_0.setCellStyle(style);row = sheet.createRow(1);cell_1 = row.createCell((short)0);cell_1.setEncoding((short)HSSFCell.ENCODING_UTF_16);cell_1.setCellValue("难道你现在");font.setFontHeightInPoints((short)12);style.setFont( font );cell_1.setCellStyle(style);然后,字体就都变成12了!不知道为什么? 这说明你对java还不是很了解//此处你new 一个Stylerow = sheet.createRow(0);cell_0 = row.createCell((short)6);cell_0.setEncoding((short)HSSFCell.ENCODING_UTF_16);cell_0.setCellValue("我是我是");font.setFontHeightInPoints((short)24);style.setFont( font );cell_0.setCellStyle(style);//这个地方你再new stylerow = sheet.createRow(1);cell_1 = row.createCell((short)0);cell_1.setEncoding((short)HSSFCell.ENCODING_UTF_16);cell_1.setCellValue("难道你现在");font.setFontHeightInPoints((short)12);style.setFont( font );cell_1.setCellStyle(style);你原来的两个单元格的style其实是指向了同一个内存地址,所以他们的格式都是一样的 如何判断是哪个组件触发的事件 public和default应用到class上的区别,不是指类成员哦 JAVA基础问题 请高手指点 实在没分了! java聊天室代码 qq突然上不去了。。。。 有问题请教高手,在线等~关于文件读写 类/变量动态访问的问题 哪里有 java程序设计百事通 电子书下载 请问,如何从一幅大的图片生成一个小的缩略图(就是thumb)? 如何配置(tomcat)才能让我的asp运行起来 JAVA可以做什么? 学习JAVA有什么用? 请教在这个程序里的变量类型为什么用float而不用short
我的代码:
row = sheet.createRow(0);
cell_0 = row.createCell((short)6);
cell_0.setEncoding((short)HSSFCell.ENCODING_UTF_16);
cell_0.setCellValue("我是我是");
font.setFontHeightInPoints((short)24);
style.setFont( font );
cell_0.setCellStyle(style);row = sheet.createRow(1);
cell_1 = row.createCell((short)0);
cell_1.setEncoding((short)HSSFCell.ENCODING_UTF_16);
cell_1.setCellValue("难道你现在");
font.setFontHeightInPoints((short)12);
style.setFont( font );
cell_1.setCellStyle(style);然后,字体就都变成12了!不知道为什么?
//此处你new 一个Style
row = sheet.createRow(0);
cell_0 = row.createCell((short)6);
cell_0.setEncoding((short)HSSFCell.ENCODING_UTF_16);
cell_0.setCellValue("我是我是");
font.setFontHeightInPoints((short)24);
style.setFont( font );
cell_0.setCellStyle(style);//这个地方你再new style
row = sheet.createRow(1);
cell_1 = row.createCell((short)0);
cell_1.setEncoding((short)HSSFCell.ENCODING_UTF_16);
cell_1.setCellValue("难道你现在");
font.setFontHeightInPoints((short)12);
style.setFont( font );
cell_1.setCellStyle(style);你原来的两个单元格的style其实是指向了同一个内存地址,所以他们的格式都是一样的