如何删除通过POI生成Excel中警告? [英] how to remove warnings in excel generated by POI ?

查看:144
本文介绍了如何删除通过POI生成Excel中警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Apache POI书写内容转换成Excel工作表。在所有这些曾经细胞具有数字细胞产生的Excel后,它包含了一个蓝色的标记(左上角的每个细胞)。它像一个警告。我怎么能在写出类拔萃的内容删除? PFA屏幕截图。

I am using Apache POI for writing content into excel sheet. after generating an excel in all the cells which ever cell has numbers, it contains one blue mark(each cells left top corner). its like a warning. how can i remove them while writing the content to excel? PFA screen shot.

谢谢!

推荐答案

您可以尝试设置单元格类型:

You can try to set the cell type:

HSSFCell cell = row1.createCell(i);
cell.setCellType(Cell.CELL_TYPE_STRING); // =0, or Cell.CELL_TYPE_NUMERIC = 1
cell.setCellValue(value);

查看<一个href=\"http://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFCell.html#setCellType%28int%29\"相对=nofollow> API文档以获取更多信息。

这篇关于如何删除通过POI生成Excel中警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆