- a Excel template editor.
- a Fluent Excel File Writer based on NPOI.
- a enumerator of worksheets, rows and cells.
//Example A from A.xlsx
IExcelEditor excelA = new ExcelEditor("../../A.xlsx");
excelA.Set("name", "Sara");
excelA.Set("age", 123);
excelA.Save("../../A_result.xlsx");
//Example B from B.xlsx
IExcelEditor excelB = new ExcelEditor("../../B.xlsx");
excelB.Set("s",
new[]
{
new
{
Name = "Tommy",
Age = 12 as int?
},
new
{
Name = "Philips",
Age = 13 as int?
},
new
{
Name = "Sara",
Age = null as int?
}
});
excelB.Save("../../B_result.xlsx");
//Example C from C.xlsx
IExcelEditor excelC = new ExcelEditor("../../C.xlsx");
excelC.Set("s",
new[]
{
new
{
Name = "Tommy",
Age = 12
},
new
{
Name = "Philips",
Age = 13
}
},
false);
excelC.UpdateFormula();
excelC.Save("../../C_result.xlsx");