
我正在使用Openxmlto来写C#,它是写在excel中的,但是如果数据超过了文本框长度,它就不会自动换行并到达第二行。附件屏幕截图相同。怎样包装同样的东西?
ExcelOxml.SetCellValue(document, worksheet1, 5, 89, pricingmodel.PricingDetailExtended.PricingProductDetail.OpportunityId, false);发布于 2016-10-07 14:06:15
请使用以下代码在excel中对文本进行换行
//Create a cell format
CellFormat cellformat1 = new CellFormat(new Alignment() { WrapText=true});
CellFormats cellformats = new CellFormats();
cellformats.Append(cellformat1);
workbookstylesheet.Append(cellformats);
stylesheet.Stylesheet = workbookstylesheet;
stylesheet.Stylesheet.Save();https://stackoverflow.com/questions/39910359
复制相似问题