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

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

问题描述

我正在使用Apache POI将内容写入Excel表单。在所有具有单元格编号的单元格中生成excel之后,它包含一个蓝色标记(每个单元格左上角)。它像一个警告。如何在将内容写入excel时将其删除? PFA屏幕截图



谢谢

解决方案

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

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

请参阅 API文档了解更多信息。


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.

Thanks!

解决方案

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);

See the API docs for more information.

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

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