#NEWLINE# def add_sheet( self , worksheet ) : #NEWLINE# #INDENT# for sheet in self . _worksheets : #NEWLINE# #INDENT# if ( sheet . name == worksheet . name ) : #NEWLINE# #INDENT# raise Exception ( ( "There is already a worksheet with the name '%s'. Duplicate worksheet names are not permitted." % worksheet . name ) ) #NEWLINE# #UNINDENT# #UNINDENT# self . _worksheets . append ( worksheet )