Signature |
---|
|
public virtual Workbook Open(ExcelTemplate excelTemplate)
|
Signature |
---|
|
Public Overridable Function Open(ByVal excelTemplate As ExcelTemplate) As Workbook
|
Param |
---|
| excelTemplate |
---|
| excelTemplate |
---|
|
An ExcelTemplate object representing the workbook to open. |
Returns |
---|
Workbook that is opened. |
{remarks}
If your template file is the new Office Open XML (.xlsx) format, you can pass it into the ExcelApplication.Open method just as you would a BIFF8 (.xls) Excel file. You will need to remember to give the output file a ".xlsx" extension when you call Save as ExcelWriter cannot convert .xlsx files to .xls
Exception |
---|
| System.Exception |
---|
| System.Exception |
---|
|
If there is a problem creating, opening, or writing to the file specified, or reading from the Workbook object. |
Example |
---|
Code Block |
---|
|
ExcelTemplate xlt = new ExcelTemplate();
//--- Do something with template here
ExcelApplication xla = new ExcelApplication();
xla.Open(xlt);
|
Code Block |
---|
|
Dim xlt As New ExcelTemplate()
'--- Do something with template here
Dim xla As New ExcelApplication()
xla.Open(xlt)
|
|