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