I have an HTML table that contains 2 columns of latitudes and longitudes. I can easily export this table to excel using the following JavaScript function:
function downloadExcel() {
var tab_text = '<html xmlns:x="urn:schemas-microsoft-com:office:excel"> <meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8">';
tab_text = tab_text + '<head><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet>';
tab_text = tab_text + '<x:Name>Results</x:Name>';
tab_text = tab_text + '<x:WorksheetOptions><x:Panes></x:Panes></x:WorksheetOptions></x:ExcelWorksheet>';
tab_text = tab_text + '</x:ExcelWorksheets></x:ExcelWorkbook></xml></head><body>';
tab_text = tab_text + "<table border='1px'>";
tab_text = tab_text + $('#gcResults_table').html();
tab_text = tab_text + '</table></body></html>';
var data_type = 'data:application/vnd.ms-excel; charset=UTF-8;base64,';
var ua = window.navigator.userAgent;
var msie = ua.indexOf("MSIE ");
if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) {
if (window.navigator.msSaveBlob) {
var blob = new Blob([tab_text], {
type: "application/csv;charset=utf-8;"
});
navigator.msSaveBlob(blob, 'Results.xls');
}
} else {
$('#test').attr('href', data_type + ', ' + encodeURIComponent(tab_text));
$('#test').attr('download', 'Results.xls');
}
}
It works great. But when the excel file exported the table, latitudes and longitudes are not displayed in the correct format. An example excel file line can be seen below:

Therefore, my question is: how can I correctly record these coordinates in order to succeed? I searched for highlighting on several blogs, but couldn't find a solution. Thanks for your time and support.
UPDATE:
Using the above excel export method, whenever the xls file is exported, I get the following notification when I open the file in MS Excel:

"", excel, / , .