如何插入换行符作为单元格的数据? [英] How to insert a linebreak as the data of a cell?

查看:94
本文介绍了如何插入换行符作为单元格的数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Apache POI 3.16创建一个Excel文件.我想将特定单元格内的数据设置为换行符:

I use Apache POI 3.16 to create an Excel file. I want to set the data inside a particular cell to have a linebreak :

rowConsommationEtRealisation.createCell(0).setCellValue("Consommation (crédits)\r\nRéalisation (produits)");

当我打开文件时,单元格值没有换行符!那么如何创建换行符?

When I open the file then the cell value does not have linebreak ! So how to create linebreak ?

推荐答案

请尝试以下操作:

这篇关于如何插入换行符作为单元格的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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