Nisha Patel
Problem
I have three different (3) Excel files (in .xlsx, .csv format) whose Header containing the Email column is placed in different positions (sometimes in the 2nd place, sometimes in the 5th or even 7th place) on each of the files.
Knowing that the two pieces of code that I am trying to use to delete all the rows whose Email columns are not valid are the following:
Can you help me combine the two codes above which check the validity of Email Server Names in order to clean (by deleting all the rows whose Email columns are not valid) my database (knowing how all Excel databases do not have header level, the Email column at the same position) ???
Solutions
You need to move that logic to a function.
Note, that I didn't inspect any of your actual logic for email validation, I just wrapped it.
Answered by: >Chris Haas
Credit: >StackOverflow
Blog Link:
>How to extract tags from TMX (XML) content using PHP?
>Php Error Solved- Instance deployment failed to install Composer dependencies
>How to do PHP gd Installation on Ubuntu?
>How to Create an array based on two other arrays in Php?
>What are common syntax errors and exceptions in Python?
>Python: Export "fat" Cocoa Touch Framework (for Device and Simulator)
>Python Import Error Solved: Cannot Import Name X
>Python ValueError Solved: ‘Shape must be rank 1 but is rank 0’