diff --git a/xlslu.py b/xlslu.py index f8fd423..0b9630c 100755 --- a/xlslu.py +++ b/xlslu.py @@ -11,16 +11,10 @@ PROGNAME = "xlslu.py" PROGENV = "xlslu".upper() VERSION = "1.201" -PROGVER = PROGNAME + " " + VERSION + " - Match Strings In XLS Spreadsheets" +PROGVER = PROGNAME + " " + VERSION + " - Simple Spreadsheet String Search" ##### -# Copyright Information -##### - -COPYRIGHT = "" - -##### # List Of All Legal Options - Update This When You Add More!!!! ##### @@ -298,12 +292,11 @@ for row in range(sheet.nrows): matched = False - nummatched = 0 + matchedstrings = {} content = [] for col in range(sheet.ncols): # Get value - value = str(sheet.cell(row, col).value) # Save, in case we match below and have to report it @@ -314,11 +307,11 @@ for matchstring in MATCHSTRINGS: if value.lower().count(matchstring.lower()): matched = True - nummatched += 1 + matchedstrings[matchstring] = True # Deal with AND Matching - if ALLSTRINGS and (nummatched != len(MATCHSTRINGS)): + if ALLSTRINGS and (len(matchedstrings) != len(MATCHSTRINGS)): matched = False # Report matching entries