This morning, I encountered an issue while working on a web app that I am currently developing.
The app is designed to read data from an excel file and import it into a SQL table.
During the basic validation process, I noticed that the column headers in these excel files sometimes have slight variations. Unfortunately, there is no consistency in their naming convention and I do not have the authority to address this problem.
For instance, here is a sample check:
xdata['Meeting ID'] === undefined
Below are different permutations of how the column header may appear:
Meeting ID MeetingID MeetingiD MeetingId
My question is whether there is a method to remove spaces in the column header names and make them case insensitive?
I have searched online for potential solutions, but most of what I found addresses the column values rather than the header itself. It's possible that my search terms are not accurate.
If anyone has an example or suggestion on how to tackle this issue, I would greatly appreciate your input.
Thank you, Erasmo
UPDATE
After trying one of the suggested solutions, I encountered an error: