...
Description |
---|
Excerpt | ||||
---|---|---|---|---|
Generates an Excel binary file and streams it to the specified
|
...
|
...
|
...
a |
...
class |
...
derived |
...
from |
...
|
...
(for |
...
example, |
...
|
...
|
...
|
...
|
...
If |
...
you |
...
pass |
...
...
a |
...
|
...
, |
...
ExcelWriter |
...
will |
...
save |
...
the |
...
generated |
...
file |
...
on |
...
the |
...
server. |
...
If |
...
you |
...
pass |
...
|
...
|
...
, |
...
ExcelWriter |
...
will |
...
stream |
...
the |
...
the |
...
generated |
...
file |
...
to |
...
the |
...
client. |
...
Signature | ||||
---|---|---|---|---|
| ||||
public virtual void Save(System.IO.Stream stream)
{signature}{signature: |
Signature | ||||||
---|---|---|---|---|---|---|
| }
| |||||
Public Overridable Sub Save(ByVal stream As System.IO.Stream)
{signature}
{parameters}
{param:outputStream}A {{ |
Parameters |
---|
Param | ||||
---|---|---|---|---|
| ||||
A object \(for example, {{
) or, a class derived from {{
(for example, {{
) |
Exceptions |
---|
Exception | ||||
---|---|---|---|---|
| ||||
) is passed to the method. {exception} {exception:ArgumentException}{exception} {remarks}ExcelWriter allows you to save in both the Excel 97\-03 BIFF8 format \(.xls\) or the new Office Open XML \(.xlsx\) format. The template file must be of the expected output format. Hence, if you wish to output .xls files, you must start with a .xls template, and if you wish to output .xlsx files, you must start with a .xlsx template. ExcelWriter does not support the creation or editing of .xlsx files with the [ExcelApplication|ExcelApplication] object. You can call {{Save}} more than once for a single instance of [ExcelTemplate]. This allows you to save more than one copy of a generated file, and/or both save the file on the server and stream it to the client. {remarks} {example} {code:csharp|title=C#} |
Exception | ||||
---|---|---|---|---|
| ||||
Remarks |
---|
ExcelWriter allows you to save in both the Excel 97-03 BIFF8 format (.xls) or the new Office Open XML (.xlsx) format. The template file must be of the expected output format. Hence, if you wish to output .xls files, you must start with a .xls template, and if you wish to output .xlsx files, you must start with a .xlsx template. ExcelWriter does not support the creation or editing of .xlsx files with the ExcelApplication object. You can call |
Example | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|