2018年10月23日火曜日

EPPlus xlsx スタイリング まとめ

幅 Width 高さ Height は Excel のそれと同じ。
Width = 半角フォントの文字数
Height = ポイント単位

最初にこれ
totalSheet.Cells.Style.Font.Name = "游ゴシック";
totalSheet.Cells.Style.Font.Size = 11;
スタイルの適用順序: 全体 → 列 or 行ごと → セルごと

通貨、単位なし、小数点四捨五入
totalSheet.Column(5).Style.Numberformat.Format = "#,##0;[Red]-#,##0";