 |
|
(ASP.NET) หนูอยากทราบว่าจะมีการแก้อย่างไรค่ะ เมื่อ Export ข้อมูลปที่ Excel แล้วไม่แสดงภาษาไทย
มันแสดงเป็นภาษาต่างดาวค่ะ หนูลองเอาโค๊ดนี้
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ไปใส่แล้วมันก้อไม่หายค่ะ
หนูได้เขียนโค๊ดการ Export to Excel อย่างนี้ค่ะ
Private Sub ExportToCSV()
Dim strPath As String = "Upload/"
Dim strFileName As String = "EMI.XLS"
Dim strsql As String
strsql = " Select No_Repair, Records_Date, Repair_Name,Section_Re, tel, Serial, Inven_ID, Sending_Date, Plan_Date, Recive_Date, total, Status, Commnts, Supplier,Admin_Name,Quotation from M_send_Repair "
Dim cx As New ConnDB
Dim DT As New DataTable
DT = cx.GetDataTable(strsql)
cx.ExportToText(DT.DefaultView, Server.MapPath("Upload\EMI.XLS"), Chr(9))
Me.lblmsg.Text = "Export Successfully <a href=" & strPath & strFileName & ">Click here</a> "
End Sub
ขอหั้ยผู้รู้ช่วยแนะนำ วิธีแก้ไขให้เป็นภาษาไทย หน่อยค่ะ
ขอบคุณค่ะ
Tag : .NET, Ms SQL Server 2005, Web (ASP.NET)
|
|
 |
 |
 |
 |
Date :
2011-01-20 16:29:50 |
By :
puy |
View :
1507 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |