This _will_ work!
Success
<% @ codepage=65001 %>
<%
Dim a, r
Response.Write "<HTML><BODY>"
Response.CharSet = "utf-8"
Set a = CreateObject("ADODB.Connection")
a.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Temp\Book1.xls;Extended Properties=Excel 8.0;Persist Security
Info=False"
Set r = a.Execute("SELECT * FROM [Sheet1$]")
Do Until r.EOF
Response.Write r.Collect(0)
Response.Write "<BR>"
r.MoveNext
Loop
a.Close
Response.Write "</BODY></HTML>"
%>
--
compatible web farm Session replacement for Asp and Asp.Net
http://www.nieropwebconsult.nl/asp_session_manager.htm
"Lee See Mun" <see_mun_lee@dell.com> wrote in message
news:Or03%23VGcEHA.2520@TK2MSFTNGP12.phx.gbl...[color=blue]
>I use asp to develop a web page to read an excel file containing Chinese
>Character then display it in the web page. Unfortunately, I cant display
>it!!! it will display (?????????).
>
> <META HTTP-EQUIV="content-type" CONTENT="text/html; charset=utf-8">[/color]
Hi,
meta tags are for backward-compat and for non-dynamic pages.
Response.CharSet = "utf-8"
[color=blue]
>
> ' create and open the connection to the Excel file
> Set conn = CreateObject("ADODB.Connection")
> conn.Open "Provider=Microsoft.Jet.Oledb.4.0;extensions=Micro soft Excel
> Driver (*.xls);" & "DBQ=" & Server.MapPath("uploadfolder/" & NewFileName)
>
> Set RS = conn.Execute("Select * From [Customer_Group]")
>
> 'response.write connection
> con.open connection
> ' Create recordset and retrieve values using the open connection
> Set objRS = server.CreateObject("ADODB.Recordset")
>
>
> <TABLE Border=1 CellPadding=3>
> <TR class=TRAlternate1>
> <% For f = 0 To RS.Fields.Count-1%>
> <TH>
> <%= RS.Fields(f).value%></TH>
>
> when i tried to display it using "RS.Fields(f).value", i only can c ????
> so, I think the problem is i cant even get/read the chinese character from
> the excel file. Pls help me.
>
>
> ************************************************** ********************
> Sent via Fuzzy Software @
http://www.fuzzysoftware.com/
> Comprehensive, categorised, searchable collection of links to ASP &
> ASP.NET resources...[/color]