Workbook constructor
__init__(self)
Initializes a new instance of the Workbook
class.
def __init__(self):
...
Remarks
The default file format type is Xlsx. If you want to create other types of files, please use Workbook(FileFormatType).
Example
The following code shows how to use the Workbook constructor to create and initialize a new instance of the class.
from aspose.cells import Workbook
workbook = Workbook()
__init__(self, file_format_type)
Initializes a new instance of the Workbook
class.
def __init__(self, file_format_type):
...
Parameter | Type | Description |
---|---|---|
file_format_type | aspose.cells.FileFormatType | The new file format. |
Remarks
The default file format type is Excel97To2003.
Example
The following code shows how to use the Workbook constructor to create and initialize a new instance of the class with various file format type.
from aspose.cells import FileFormatType, Workbook
workbook = Workbook(FileFormatType.XLSX)
__init__(self, file)
Initializes a new instance of the Workbook
class and open a file.
def __init__(self, file):
...
Parameter | Type | Description |
---|---|---|
file | System.String | The file name. |
__init__(self, stream)
Initializes a new instance of the Workbook
class and open a stream.
def __init__(self, stream):
...
Parameter | Type | Description |
---|---|---|
stream | io.RawIOBase | The stream. |
__init__(self, file, load_options)
Initializes a new instance of the Workbook
class and open a file.
def __init__(self, file, load_options):
...
Parameter | Type | Description |
---|---|---|
file | System.String | The file name. |
load_options | aspose.cells.LoadOptions | The load options |
__init__(self, stream, load_options)
Initializes a new instance of the Workbook
class and open stream.
def __init__(self, stream, load_options):
...
Parameter | Type | Description |
---|---|---|
stream | io.RawIOBase | The stream. |
load_options | aspose.cells.LoadOptions | The load options |
See Also
- module
aspose.cells
- class
Workbook