Lm th? no ? ?nh d?ng m?t b?ng tnh Excel trong khi streaming MIME n?i dung

D?ch tiu ? D?ch tiu ?
ID c?a bi: 271572 - Xem s?n ph?m m bi ny p d?ng vo.
Bung t?t c? | Thu g?n t?t c?


Bi vi?t ny ch?ng t? lm th? no b?n c th? s? d?ng my ch? ang ho?t ?ng Cc trang (ASP) ? t?o ra m?t b?ng tnh ?nh d?ng m c th? ?c xem tr?c ti?p nh MIME n?i dung ? Microsoft Excel.


Excel c th? v?n t?n t?i thng tin lu tr? trong m?t ?nh d?ng m l m?t gi?ng lai HTML/XML. Khi b?n lu m?t b?ng tnh Excel 2000 nh m?t trang Web, Excel t?o ra m?t t?p tin c ch?a m?t s? k?t h?p c?a th? HTML v XML th? c ? ngh?a ?c bi?t ? Excel. M?t b?ng tnh lu trong ?nh d?ng ny c th? i t? Excel ? tr?nh duy?t v quay l?i Excel l?i (m?t "v?ng chuy?n i") m khng b? m?t b?ng tnh ton v?n.

Khi b?n m? m?t workbook lu d?i d?ng m?t trang Web trong Internet Explorer, th? HTML ?c s? d?ng ? render cc ti li?u. Khi b?n m? trong ?nh d?ng ny trong Excel workbook, Excel s? d?ng cc th? XML cho thi?t ?t m c th? lin quan ?n cc b?ng tnh, b?ng, cc hng v c?t. ? bi?t thm thng tin v? cch s? d?ng HTML v XML v?i Excel 2000, xem "Microsoft Office HTML v XML tham kh?o"t?i MSDN Web site sau:
http://msdn2.Microsoft.com/en-US/Library/Aa155477 (office.10) .aspx
S? d?ng ASP, b?n c th? t?o ra ti li?u c?a ring b?n trong Excel c?a HTML/XML ?nh d?ng ? khi ti li?u ?c xem tr?c ti?p vo tr?nh duy?t c?a khch hng, n l hi?n th? trong Excel. B?n c th? ki?m sot v? tr di ?ng d? li?u v ch? ?nh b?t k? thi?t ?t b?ng tnh ho?c b?ng ?c h? tr? b?i Excel ?nh d?ng HTML/XML. ? t?o m?t b?ng tnh Excel trong cc ?nh d?ng HTML/XML v sau d?ng n nh MIME n?i dung ? Excel trn my khch, h?y lm theo cc b?c sau:
  1. Dn o?n m? sau vo Notepad:
    <%@ Language=VBScript %>
      ' Check for a value passed on the address bar.
      if (Request.QueryString("i")) = "" then bFirst = true
      ' If we have a value for "i", we know that we can display the
      ' data in Excel.
      if (bFirst = false) then
        ' Buffer the content and send it to Excel.
        Response.Buffer = true
        Response.ContentType = "application/vnd.ms-excel" 
    <HTML xmlns:x="urn:schemas-microsoft-com:office:excel">
         {mso-header-data:"&CMultiplication Table\000ADate\: &D\000APage &P";
      <!--[if gte mso 9]><xml>
          <x:Name>Sample Workbook</x:Name>
       ' Build a multiplication table from 1,1 to i,j.
       for i = 1 to CInt(Request.QueryString("i"))
         Response.Write "  <TR>" + vbCrLf
         for j = 1 to CInt(Request.QueryString("j"))
           if (j = 1) or (i = 1) then
             Response.Write "    <TD bgcolor=""#FFF8DC"">"
             Response.Write "    <TD bgcolor=""#B0C4DE"">"
           end if
    	   Response.Write CStr(i*j) + "</TD>" + vbCrLf
         Response.Write "  </TR>" + vbCrLf
      ' The user hasn't loaded the page yet. Prompt them for
      ' values for the table.
    Please enter indices for the multiplication table:<BR>
    <FORM action="xlmime.asp" method=GET>  
      i = <INPUT type="text" name=i style="WIDTH: 25px"><BR>
      j = <INPUT type="text" name=j style="WIDTH: 25px"><BR><BR/>
      <INPUT type="submit" value="Submit"><BR/>
      end if
  2. Lu t?p tin nh XLMime.asp trong th m?c ?o g?c c?a my ch? web c?a b?n. (The default ?o g?c l C:\Inetpub\Wwwroot.)
  3. Kh?i ?ng Internet Explorer v duy?t ?n http://YourWebServer/xlmime.asp, ni YourWebServer l tn c?a my ch? Web c?a b?n.
  4. Trong trang Web xu?t hi?n, cung c?p cc gi tr? s? trong m?i cc vn b?n h?p cung c?p v sau nh?p vo Gi. Excel t?i-ch? kch ho?t trong tr?nh duy?t v?i m?t b?ng tnh m?i. Cc b?ng tnh m?i ch?a d? li?u ?nh d?ng trong s? hng (i) v s? c?a cc c?t (j) b?n ? ch? ?nh. Ngoi ra, n?u b?n ki?m tra Page Setup thng tin cho b?ng tnh, b?n s? thng bo r?ng ?nh h?ng ?c thi?t l?p ? c?nh quan v c m?t tiu ? ty ch?nh ny khng.


? bi?t thm chi ti?t v? streaming MIME n?i dung cho cc ?ng d?ng vn ph?ng, nh?p vo s? bi vi?t sau ? xem cc bi vi?t trong c s? ki?n th?c Microsoft:
266263L?I: Word 2000 v Excel 2000 hi?n th? ASP ngu?n khi s? d?ng ki?u MIME stream d? li?u
199841 Lm th? no ? hi?n th? ASP k?t qu? b?ng cch s? d?ng Excel trong IE v?i MIME types
? bi?t thm thng tin v? vn ph?ng t? ?ng ha, gh thm Trang web h? tr? Microsoft vn ph?ng pht tri?n:

Thu?c tnh

ID c?a bi: 271572 - L?n xem xt sau cng: 22 Thang Tam 2011 - Xem xt l?i: 2.0
p d?ng
  • Microsoft Office Excel 2007
  • Microsoft Excel 2000 Standard Edition
  • Microsoft Active Server Pages 4.0
T? kha:
kbhowto kbmt KB271572 KbMtvi
My d?ch
QUAN TRONG: Bi vi?t ny ?c d?ch b?ng ph?n m?m d?ch my c?a Microsoft ch? khng ph?i do con ng?i d?ch. Microsoft cung c?p cc bi vi?t do con ng?i d?ch v c? cc bi vi?t do my d?ch ? b?n c th? truy c?p vo t?t c? cc bi vi?t trong C s? Ki?n th?c c?a chng ti b?ng ngn ng? c?a b?n. Tuy nhin, bi vi?t do my d?ch khng ph?i lc no c?ng hon h?o. Lo?i bi vi?t ny c th? ch?a cc sai st v? t? v?ng, c php ho?c ng? php, gi?ng nh m?t ng?i n?c ngoi c th? m?c sai st khi ni ngn ng? c?a b?n. Microsoft khng ch?u trch nhi?m v? b?t k? s? thi?u chnh xc, sai st ho?c thi?t h?i no do vi?c d?ch sai n?i dung ho?c do ho?t ?ng s? d?ng c?a khch hng gy ra. Microsoft c?ng th?ng xuyn c?p nh?t ph?n m?m d?ch my ny.
Nh?p chu?t vo y ? xem b?n ti?ng Anh c?a bi vi?t ny:271572

Cung cp Phan hi


Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com