Workbook constructor
init
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
Initializes a new instance of the Workbook
class.
def __init__(self, file_format_type):
...
Parameter | Type | Description |
---|---|---|
file_format_type | 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
Initializes a new instance of the Workbook
class and open a file.
def __init__(self, file):
...
Parameter | Type | Description |
---|---|---|
file | str | The file name. |
init
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
Initializes a new instance of the Workbook
class and open a file.
def __init__(self, file, load_options):
...
Parameter | Type | Description |
---|---|---|
file | str | The file name. |
load_options | LoadOptions | The load options |
init
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 | LoadOptions | The load options |
See Also
- module
aspose.cells
- class
Workbook