Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Description

...

Wiki Markup
{description}
{excerpt}Sets or returns the generated spreadsheet's MIME content type.

...



{remarks}
{example}{code:csharp|title=C#}

          xlt.ContentType = "application/unknown";
        
{code}
{code:vb.net
|title=vb.net
}

          xlt.ContentType = "application/unknown"
        {code}

{example}
Signature
C#C#
  
{excerpt}
{signature:C#}
 public System.String ContentType{ get; set; }
Signature
{signature}{signature:vb.net
vb.net
}
Public Property ContentType() As String
Remarks
In most
{signature}
{remarks}
In most browsers, Microsoft Excel files are mapped to the MIME type "application/vnd.ms\-excel" and [ContentType|ExcelTemplate.ContentType] is set to this value by default.  However, some browsers map Excel files to a different MIME content type, and the browser will not open a file of type "application/vnd.ms\-Excel." In this case, set {{ContentType}} to the appropriate MIME content type.


In Internet Explorer, to find out what MIME content type maps to Excel files:

  # Open the Start menu and select Run.
  • Entire regedit to open the Registry Editor.
  • Open HKEY_CLASSES
    
      # Entire _regedit_ to open the Registry Editor.
      # Open HKEY\_CLASSES\_ROOT\MIME\Database\Content Type.  This folder contains a list of MIME content type folders.  If you select a folder, you will see the extensions to which the type maps in the right frame.
    
    
    
    In Netscape Navigator, to find out what MIME content type maps to Excel files:
    
      # In the browser window, open the Edit menu and select Preferences...
    
      # In the Category window select Applications.
    
      # In the Description window, select an application to display its MIME content type.
    ContentType is a
    
    
    
    {{ContentType}} is a *Read/Write* property.
    Example
    Code Block
    csharpcsharp
    titleC#
    Code Block
    vb.nettitle