仅作记录，使用 EPPlus 组件，文字、图片、代码均来自参考链接
In most cases you probably have some data that you want to move to an Excel spreadsheet, do some styling, maybe add a formula or a chart.
But before we get started, here’s something to keep in mind when you work with EPPlus:
Cell addresses, number formats and formulas are culture-insensitive, meaning things might look a little bit different when you write your code. This is the way OOXML is stored and is then translated too your culture when the workbook is opened in Excel.
Addresses are separated by a comma (,).
worksheet.Cells["A1:C1,C3"].Style.Font.Bold = true.
Numberformats use dot for decimal (.) and comma (,) for thousand separator.
worksheet.Cells["B2:B3"].Style.NumberFormat.Format = "#,##0.00";.
Formulas use comma (,) to separate parameters.
The first thing you do is to create an instance to the ExcelPackage class. To do that you first need to add a using directive to OfficeOpenXml namespace in the top of your file. This is the top namespace in EPPlus;
You can now reference the Excelpackage class directly for your class. The ExcelPackage class has few different constructors depending on what you want to do…