Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Description

Excerpt

Sets or returns the generated spreadsheet's

...

MIME

...

content

...

type.

...

Signature
C#
C#
 public System.String ContentType{ get; set; }
{signature}{signature:
}
Signature
vb.net
vb.net
Public Property ContentType() As String
{signature}
{remarks}
In most 
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:

#

  1. Open
  1. the
  1. Start
  1. menu
  1. and
  1. select
  1. Run.
# Entire _regedit_ to open the Registry Editor. # Open HKEY\_CLASSES\
  1. Entire regedit to open the Registry Editor.
  2. Open HKEY_CLASSES_ROOT\MIME\Database\Content
  1. Type.
  1. This
  1. folder
  1. contains
  1. a
  1. list
  1. of
  1. MIME
  1. content
  1. type
  1. folders.
  1. If
  1. you
  1. select
  1. a
  1. folder,
  1. you
  1. will
  1. see
  1. the
  1. extensions
  1. to
  1. which
  1. the
  1. type
  1. maps
  1. in
  1. the
  1. right
  1. frame.

In

Netscape

Navigator,

to

find

out

what

MIME

content

type

maps

to

Excel

files:

#

  1. In
  1. the
  1. browser
  1. window,
  1. open
  1. the
  1. Edit
  1. menu
  1. and
  1. select
  1. Preferences...
#
  1. In
  1. the
  1. Category
  1. window
  1. select
  1. Applications.
#
  1. In
  1. the
  1. Description
  1. window,
  1. select
  1. an
  1. application
  1. to
  1. display
  1. its
  1. MIME
  1. content
  1. type.
{{ContentType}} is a *

ContentType is a Read/Write

*

property.

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

Example
Code Block
csharp
csharp
titleC#


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


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