'Constructor.'

def __init__(self, filename=None, options=None):

    if (options is None):
        options = {}
    super(Workbook, self).__init__()
    self.filename = filename
    self.tmpdir = options.get('tmpdir', None)
    self.date_1904 = options.get('date_1904', False)
    self.strings_to_numbers = options.get('strings_to_numbers', False)
    self.strings_to_formulas = options.get('strings_to_formulas', True)
    self.strings_to_urls = options.get('strings_to_urls', True)
    self.nan_inf_to_errors = options.get('nan_inf_to_errors', False)
    self.default_date_format = options.get('default_date_format', None)
    self.constant_memory = options.get('constant_memory', False)
    self.in_memory = options.get('in_memory', False)
    self.excel2003_style = options.get('excel2003_style', False)
    self.remove_timezone = options.get('remove_timezone', False)
    self.default_format_properties = options.get('default_format_properties', {})
    self.worksheet_meta = WorksheetMeta()
    self.selected = 0
    self.fileclosed = 0
    self.filehandle = None
    self.internal_fh = 0
    self.sheet_name = 'Sheet'
    self.chart_name = 'Chart'
    self.sheetname_count = 0
    self.chartname_count = 0
    self.worksheets_objs = []
    self.charts = []
    self.drawings = []
    self.sheetnames = {}
    self.formats = []
    self.xf_formats = []
    self.xf_format_indices = {}
    self.dxf_formats = []
    self.dxf_format_indices = {}
    self.palette = []
    self.font_count = 0
    self.num_format_count = 0
    self.defined_names = []
    self.named_ranges = []
    self.custom_colors = []
    self.doc_properties = {}
    self.custom_properties = []
    self.createtime = datetime.utcnow()
    self.num_vml_files = 0
    self.num_comment_files = 0
    self.x_window = 240
    self.y_window = 15
    self.window_width = 16095
    self.window_height = 9660
    self.tab_ratio = 500
    self.str_table = SharedStringTable()
    self.vba_project = None
    self.vba_is_stream = False
    self.vba_codename = None
    self.image_types = {}
    self.images = []
    self.border_count = 0
    self.fill_count = 0
    self.drawing_count = 0
    self.calc_mode = 'auto'
    self.calc_on_load = True
    self.allow_zip64 = False
    self.calc_id = 124519
    if self.in_memory:
        self.constant_memory = False
    if self.excel2003_style:
        self.add_format({'xf_index': 0, 'font_family': 0})
    else:
        self.add_format({'xf_index': 0})
    self.default_url_format = self.add_format({'color': 'blue', 'underline': 1})
    if (self.default_date_format is not None):
        self.default_date_format = self.add_format({'num_format': self.default_date_format})
