Created
August 7, 2018 09:07
-
-
Save donma/5a9e5508e08319e5f4cd26dd590961df to your computer and use it in GitHub Desktop.
NPOI Font Color Part Code 2
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
for (var i = 1; i <= 20; i++) | |
{ | |
sheetReportResult.CreateRow(i).CreateCell(0).SetCellValue("用戶" + i); | |
if (i== 5) | |
{ | |
var cell = sheetReportResult.GetRow(i).CreateCell(1); | |
cell.CellStyle = styleR; | |
cell.SetCellValue("091234567" + i); | |
} | |
else if (i == 10) | |
{ | |
var cell = sheetReportResult.GetRow(i).CreateCell(1); | |
cell.CellStyle = styleG; | |
cell.SetCellValue("091234567" + i); | |
} | |
else { | |
var cell = sheetReportResult.GetRow(i).CreateCell(1); | |
cell.SetCellValue("091234567" + i); | |
} | |
sheetReportResult.GetRow(i).CreateCell(2).SetCellValue("我是備註" + i); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment