I'm trying to send data from json to the Excel File.
Unfortunately to work in IE I use ActiveXObject.
The problem is that my json contain the whole html tags example
<a href="www.localhost.com/index">Home</a>
or
<p><b>Welcome</b><br/>How are you today</p>
Extraction is working almost perfect. Unfortunately in my Excel are available all html tags. And cells are looking exactly like I wrote.
I want to convert them somehow to look like this
and
Welcome
How are you today
Is it possible to send them already formatted to the Excel or somehow to format the cell into the Excel?
Here is my JS code:
function extractExcel() {
var excApp = new ActiveXObject("Excel.Application");
var excBook = excApp.Workbooks.open("www.localhost/media/excel_template.xlsx");
excApp.visible = true;
excBook.Add
var i = 1;
var j = 0;
$.each($scope.filteredItems, function (index, item) {
$.each(item, function (key, value) {
excApp.Cells(i + 1, j + 1).Value = value;
j++;
});
j = 0;
i++;
});
}