Created
August 7, 2018 09:06
-
-
Save donma/729fd373dc053159630aee8b7fe11fbf to your computer and use it in GitHub Desktop.
NPOI Font Color Part Code 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //綠色的Style | |
| NPOI.SS.UserModel.IFont fontG = workbook.CreateFont(); | |
| fontG.Color = NPOI.SS.UserModel.IndexedColors.Green.Index; | |
| var styleG = workbook.CreateCellStyle(); | |
| styleG.SetFont(fontG); | |
| //紅色的Style | |
| NPOI.SS.UserModel.IFont fontR = workbook.CreateFont(); | |
| fontR.Color = NPOI.SS.UserModel.IndexedColors.Red.Index; | |
| var styleR = workbook.CreateCellStyle(); | |
| styleR.SetFont(fontR); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment