#NEWLINE# def create_string_table( workbook ) : #NEWLINE# #INDENT# 'Compile the string table for a workbook.' #NEWLINE# strings = set ( ) #NEWLINE# for sheet in workbook . worksheets : #NEWLINE# #INDENT# for cell in sheet . get_cell_collection ( ) : #NEWLINE# #INDENT# if ( ( cell . data_type == cell . TYPE_STRING ) and ( cell . _value is not None ) ) : #NEWLINE# #INDENT# strings . add ( cell . value ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return dict ( ( ( key , i ) for ( i , key ) in enumerate ( strings ) ) )