NPOI excel导入导出

https://blog.csdn.net/weixin_44548643/article/details/89960446  -----参考

 https://my.oschina.net/u/1778848/blog/542250 -----------设置宽高

文字竖向 ---已测试----net

var workbook = new XSSFWorkbook();
var cellStyle = workbook.CreateCellStyle();
cellStyle.Rotation = (short)255;
var sheet = workbook.CreateSheet();
var row = sheet.CreateRow(0);
var cell = row.CreateCell(0);
cell.SetCellValue("test");
cell.CellStyle = cellStyle;

-----------------------------------------------------------------------------

---------------java-------------

Workbook workbook = new XSSFWorkbook();

CellStyle cellStyle = workbook.createCellStyle();
cellStyle.setRotation((short)255);

Sheet sheet = workbook.createSheet();
Row row = sheet.createRow(0);
Cell cell = row.createCell(0);
cell.setCellValue("test");
cell.setCellStyle(cellStyle);

 

 

posted @ 2021-03-10 11:09  南方卖菜  阅读(92)  评论(0)    收藏  举报