I am creating excel spreadsheet by using Open XML SDK for javascript. used below script to add spreadsheet data.
var table = wsXDoc.descendants(openXml.S.sheetData).firstOrDefault();
var newRow = new Ltxml.XElement(openXml.S.row,
new Ltxml.XAttribute("r", 1));
table.add(newRow);
var cell = new Ltxml.XElement(openXml.S.c,
new Ltxml.XAttribute("r", "A1"),
Ltxml.XElement(openXml.S.v, number));
newRow.add(cell);
The above code works fine when i pass number as value. it throws error when i pass text as value.
How to create string based cell?
Another question:
How to apply cell style through open xml sdk javascript?