I receive Excel files that I need to compare against a MySQL database and where there is a match on specific fields pull out data. What I do with the data will depend on how the original data is handled. Not dealing with a lot of rows in the Excel file, maybe 10,000 max. Not sure the best way to do this.
Plan A - convert the data to csv with header row. Read the file and create a new table in MySQL. Do a search or join of somekind, get the necessary data, and add it into new columns on the newly created table.
Plan B - convert the data to csv with header row. Read the file into a variable of somekind, dictionary maybe? Loop through the records in the variable, get the data, add it into the variable, and save it out to a new text file.
Plan C - convert the data to csv with header row. Do all the work in text files. Open the original, work through the records, get the data, and create a new text file with the new data adding new rows as necessary.
Hmmm…I think plan C is looking rather simple but I’ll take suggestions.