2016-10-07 5 views
0

enter image description hereOpenXMLのは、私はそれをExcelで書いているが、データがテキストボックスの長さを超えている場合、それはアップラップ、2行目に来ていないC# をuisngエクセルに書き込むOpenxmlto使用しています

テキストボックスの値をラップではない優れて書き込みます。同じスクリーンショットを添付しています。 同じものをラップするには?

ExcelOxml.SetCellValue(document, worksheet1, 5, 89, pricingmodel.PricingDetailExtended.PricingProductDetail.OpportunityId, false); 

答えて

0

エクセル

//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(); 
でテキストを折り返すために以下のコードを使用してください
関連する問題