chuanyi/msexcel-builder — pull request #14 by chaocodes (2014-06-25 20:09:30+00:00)
Title: Support for more excel features

Hi, I added support for excel formulas and numbers.

Any string that starts with '*' is treated as a number and any string that starts with '=' is treated as a formula.

Examples:
* sheet.set(1, 1, "*27");
* puts 27 in cell A1 but 27 does not get added to sharedStrings.xml.
* sheet.set(1, 1, "=A2 * A4");
* puts =A2 * A4 in cell A1
* sheet.set(1, 1, "=SUM(A2:C2)");
* puts =SUM(A2:C2) in cell A1, which sums values of cells A2 to C2
* sheet.set(1, 1, "=SUM(A2:C2)~27");
* does the same thing but sets the default value of the cell to 27

You can also add excel number formats

Example:
* sheet.numberFormat(1, 1, {format: '_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)'});
* formats cell A1 to start with '$' and end with .00 if there is no decimal already