在带有阿拉伯语内容的aspx页面中将HTML表格导出到Excel中

我使用Ajax / C#编写代码,将用jQuery将数据附加到HTML表中,这是表头:

table id='tblUsers' class='table table-striped table-condensed table-hover table-bordered table-responsive' > <tr> <th>Customer ID</th> <th>Customer Name</th> <th>File #</th> <th>Territory</th> <th>Start Date</th> <th>Goods Desc</th> <th>Custom Declaration</th> <th>Quantity</th> <th>Weight</th> <th>Volumetric Weight</th> <th>Mortage Amount</th> <th>Invoice#</th> <th>Invoice Amount</th> </tr> </table> 

这就是Ajax Call:

  $.ajax({ url: "WebService.asmx/showResult", type: "post", data: JSON.stringify({ "dateFrom": $('#txtDateFrom').val(), "dateTo": $('#txtDateTo').val(), "ddlType": $("#ddlType").children("option").filter(":selected").val(), "ddlTer": $("#ddlTer").children("option").filter(":selected").val(), "ddlFilter": $("#filter").children("option").filter(":selected").val() }), // parameters beforeSend: function () { $('#loader').html('<img src="Images/loading.gif" />'); }, contentType: "application/json; charset=utf-8", success: function (result) { $('#loader').html(''); document.getElementById('filter').style.display = 'inherit'; document.getElementById('logo').style.display = 'none'; document.getElementById('exp').style.display = 'inherit'; //To delete the whole tr except the first one. $("#tblUsers").find("tr:gt(0)").remove(); $('#tblUsers').append(JSON.stringify(result)); if ($("#ddlType").val() != 0) { document.getElementById('filter').style.display = 'none'; } }, error: function () { alert('error'); } }); 

WebMethod:

  var sp = db.divideTypes(dateFrom, dateTo, ddlFilter).ToList(); foreach (var u in sp) { result += "<tr>"; result += "<td>" + u.custid + "</td>"; result += "<td>" + u.custname + "</td>"; result += "<td>" + u.depno + "</td>"; result += "<td>" + u.Terr + "</td>"; result += "<td>" + u.deidate + "</td>"; result += "<td>" + u.gooddesc+ "</td>"; result += "<td>" + u.custdec + "</td>"; result += "<td>" + u.pkg + "</td>"; result += "<td>" + u.wt + "</td>"; result += "<td>" + u.vwt + "</td>"; result += "<td>" + u.lcamt+ "</td>"; result += "<td>" + u.invno + "</td>"; result += "<td>" + u.invamt + "</td>"; result += "<td></td>"; result += "</tr>"; } 

我试图通过networking上的文章,以excel文件作为Excel文件导出 ,但使用JQuery, 如何导出HTML表格数据Excel表格使用JQuery的

标题

有很多像这样的文章都失败了,因为我想呈现阿拉伯文字母,所以这些字母看起来很奇怪。

我注意到有一篇文章在stackoverflow: 导出数据表与阿拉伯数据到Excel

那个跟我说的情况差不多,但是我真的不知道如何去实现它。