[ASP.NET] EEPLUS 操作紀錄

如提

參考網址

對一個sheet foreach取資料

https://stackoverflow.com/questions/21742038/how-do-i-iterate-through-rows-in-an-excel-table-using-epplus

var package = new ExcelPackage(new FileInfo("sample.xlsx"));

ExcelWorksheet workSheet = package.Workbook.Worksheets[0];
var start = workSheet.Dimension.Start;
var end = workSheet.Dimension.End;
for (int row = start.Row; row <= end.Row; row++)
{ // Row by row...
    for (int col = start.Column; col <= end.Column; col++)
    { // ... Cell by cell...
        object cellValue = workSheet.Cells[row, col].Text; // This got me the actual value I needed.
    }
}

對一個cell染色

https://stackoverflow.com/questions/38907164/how-can-i-assign-a-color-to-a-font-in-epplus

 

 

 

以上文章僅用紀錄資料使用.....