EasyXLS™ Excel Writer Demo

This example formats a HTML table with borders, font color, background color for the column F and set a formula on a cell. The formatted table is exported to Excel using EasyXLS library. The EasyXLS source code that formats the Excel cells is simulated.
  A B C D E F  
1 80 90 10 20 30 100  ‹- Border  No Border Outside Borders Bottom Border Left Border Right Border Right Border
2 40 50 60 70 80 90  
3 10 20 30 40 50 60  ‹- Font Color
4 60 70 80 90 10 20 Background Color
5 30 40 50 60 70 =SUM(...  ‹-
     (enter a formula)
 

C# source code

// Code for the "F1" cell
ExcelCell xlsCell = xlsTable.easy_getCell("F1");
xlsCell.setValue("100")
xlsCell.setBorderStyles(Border.BORDER_NONE, Border.BORDER_NONE, Border.BORDER_NONE, Border.BORDER_NONE)

// Code for the "F3" cell
ExcelCell xlsCell = xlsTable.easy_getCell("F3");
xlsCell.setValue("60")

// Code for the "F5" cell
ExcelCell xlsCell = xlsTable.easy_getCell("F5");
xlsCell.setValue("=SUM(A1:E4)");