I have following table in asp.net and I want to generate exc
I have following table in asp.net and I want to generate excel with css and
arabic data also show in reoprt.I am using following but not arabic data appear
in my Excel and not arabic data appear in my css.I am using asp.net c#
Response.ContentType = "application/x-msexcel"; Response.AddHeader("Content-Disposition", "attachment; filename=ExcelFile.xls");
Response.ContentEncoding = System.Text.Encoding.UTF8; StringWriter tw = new System.IO.StringWriter(); HtmlTextWriter
hw = new HtmlTextWriter(tw); tblid.RenderControl(hw); Response.Write(tw.ToString()); Response.End(); <style type="text/css" > .repFont { -webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg); width: 53px; } table { border: 1px solid black; border-spacing:0px; } td { border: 1px solid black; border-spacing:0px; font-size:11PX; text-align:center; padding: 0px; } .auto-style1 { height: 27px; } .bgtd1 { background-color:#FFFF99; } .title { color:#CC3333; } .titleMale { color:#3366FF; } .titleTotal { font-weight:bold; font-size:12PX; } .maintitle { font-size:12px; } .maintileArabic { color:#CC3333; padding-left: 187px; } .maintileEng { color:#3366FF; padding-left: 113px; padding-bottom: 11px; } </style> <table id="tblid" runat="server" border="1" > <tr class="bgtd1"> <td colspan="2" rowspan="2" class="title">Region</td> <td colspan="3" class="title"><span id="result_box" lang="ar" xml:lang="ar">??????? ?????</span></td> <td colspan="2" class="title"> ???????????</td> <td colspan="2" class="title">?????</td> <td colspan="2" class="title">?????</td> <td colspan="2" class="title">?????</td> <td colspan="2" class="title">?????</td>
<td colspan="2" class="title">?????</td> <td colspan="2" class="title">?????</td>
<td colspan="2" class="title">?????</td> <td colspan="2" class="title">?????</td> <td colspan="2" class="title">?????</td>
<td colspan="2" class="title">?????</td> <td colspan="2" class="title">?????</td> <td colspan="2" rowspan="2" class="title">
<span id="result_box2" lang="ar" xml:lang="ar">?????</span></td> </tr> <tr class="bgtd1"> <td colspan="3" class="auto-style1">
Grand Total</td> <td colspan="2" class="auto-style1"> </td> <td colspan="2" class="auto-style1"> Musandam </td>
<td colspan="2" class="auto-style1"> Al-wusta </td> <td colspan="2" class="auto-style1"> Alburaimi </td>
<td colspan="2" class="auto-style1"> Al-Dhahira </td> <td colspan="2" class="auto-style1"> Dohfar </td>
<td colspan="2" class="auto-style1"> Al-dhakhila </td> <td colspan="2" class="auto-style1"> Al-sharqiya(n) </td>
<td colspan="2" class="auto-style1"> Al-sharqiyah </td> <td colspan="2" class="auto-style1"> Albatiniah(s) </td> <td
colspan="2" class="auto-style1"> Al-Albatinah </td> <td colspan="2" class="auto-style1"> Muscat </td> </tr> <tr> <td
colspan="2" class="bgtd1">Gender</td> <td class="title"><span id="result_box8" lang="ar" xml:lang="ar"> ????? </span></td> <td >
?</td> <td class="titleMale">?</td> <td >?</td> <td class="titleMale">?</td> <td >?</td> <td class="titleMale">?</td> <td >?</td> <td clas
s="titleMale">?</td> <td>?</td> <td class="titleMale" >?</td> <td >?</td> <td class="titleMale">?</td> <td >?</td> <td class="titleMale">
?</td> <td >?</td> <td class="titleMale">?</td> <td >?</td> <td class="titleMale">?</td> <td>?</td> <td class="titleMale">?</td> <td>?</td
> <td class="titleMale">?</td> <td>?</td> <td class="titleMale">?</td> <td >?</td> <td class="titleMale">?</td> <td colspan="2" class="bgtd1"><span id="result_box3" lang="ar" xml:lang="ar">???</span></td> </tr> <tr> <td colspan="2" class="bgtd1">Specialization</td> <td class="title">Total</td> <td>F</td> <td class="titleMale">M</td> <td>F</td> <td class="titleMale">M</td> <td>F</td> <td class="titleMale">M</td> <td>F</td> <td class="titleMale">M</td> <td>F</td> <td class="titleMale">M</td>
<td>F</td> <td class="titleMale">M</td> <td>F</td> <td class="titleMale">M</td> <td>F</td> <td class="titleMale">M</td> <td>F</td> <td class="titleMale">M</td> <td>F</td> <td class="titleMale">M</td> <td>F</td> <td class="titleMale">M</td> <td>F</td> <td class="titleMale">M</td> <td>F</td> <td class="titleMale">M</td> <td colspan="2" class="bgtd1" >
<span id="result_box4" lang="ar" xml:lang="ar">????</span></td> </tr> <tr> <td rowspan="4" class="bgtd1">
<div class="repFont bgtd1">Foundation</div></td> <td class="bgtd1">Engnieering</td> <td >120</td> <td>48</td>
<td class="titleMale">72</td> <td>0</td> <td class="titleMale">0</td> <td>0</td> <td class="titleMale">0</td> <td>1</td>
<td class="titleMale">1</td> <td>0</td> <td class="titleMale">0</td> <td>1</td> <td class="titleMale">1</td> <td>0</td>
<td>0</td> <td>1</td> <td class="titleMale">1</td> <td>0</td> <td class="titleMale">0</td> <td>1</td> <td class="titleMale">1</td>
<td>0</td> <td class="titleMale">0</td> <td>1</td> <td class="titleMale">1</td> <td>0</td> <td class="titleMale">0</td>
<td class="bgtd1">??????? </td> <td rowspan="4" class="bgtd1"><div class="repFont "> ????? </div></td> </tr>
<tr> <td class="bgtd1">Information Technology</td> <td>213</td> <td>147</td> <td class="titleMale">66</td> <td>1</td> <td clasws="titleMale">2</td> <td>0</td> <td class="titleMale">0</td> <td>1</td> <td class="titleMale">1</td> <td>0</td> <td class="titleMale">0</td> <td>1</td> <td class="titleMale">1</td> <td>0</td> <td>0</td> <td>1</td> <td class="titleMale">1</td> <td>0</td> <td class="titleMale">0</td> <td >1</td> <td class="titleMale">1</td> <td>0</td> <td class="titleMale">0</td> <td>1</td> <td class="titleMale">1</td> <td>0</td> <td class="titleMale">0</td> <td class="bgtd1"> ????????? ????????? </td> </tr> <tr> <td rowspan="2" class="bgtd1"><span class="titleTotal">Total</span></td> <td rowspan="2">313</td> <td >195</td> <td class="titleMale">138</td> <td>1</td> <td class="titleMale">2</td> <td>0</td> <td class="titleMale">0</td> <td>2</td> <td class="titleMale">2</td> <td>0</td> <td class="titleMale">0</td> <td>2</td> <td class="titleMale">2</td> <td>0</td> <td>0</td> <td>2</td> <td class="titleMale">2</td> <td>0</td> <td class="titleMale">0</td> <td>2</td> <td class="titleMale">2</td> <td>0</td> <td class="titleMale">0</td> <td>2</td> <td class="titleMale">2</td> <td>0</td> <td class="titleMale">0</td> <td rowspan="2" class="bgtd1" >??????</td> </tr> <tr> <td colspan="2">313</td> <td colspan="2">3</td> <td colspan="2">0</td> <td colspan="2">4</td> <td colspan="2">0</td> <td colspan="2">4</td> <td colspan="2">0</td> <td colspan="2">4</td> <td colspan="2">0</td> <td colspan="2">4</td> <td colspan="2">0</td> <td colspan="2">4</td> <td colspan="2">0</td> </tr> </table>