I have what is maybe a peculiar use case which I’ve been doing some research on and I’m hoping you geniuses can provide some pointers here.
In my use case, the user will upload an Excel file that is a template with column headers. I’m getting data from an external API that I want to input into that template under the correct headers, and enable to download the Excel with the data. To do this, I need to read the column headers of the uploaded Excel and match them to the data from the API.
The issue is that these templates from the users often don’t have the column headers in row 1, organized nicely. They have a couple rows of categories, merged cells, etc and finally the actual headers in say row 3 or 4. This will vary by user as well, so we don’t know the exact format beforehand. This makes it difficult both to find the headers, and then to know what cells to put the data in after getting it from the API.
On top of that, it’s difficult to find a plugin or library that allows Excel files to be edited this way. Most are creating files from scratch, but that won’t work in this case.
Any ideas for solutions here, in the form of plugins, libraries, or otherwise?
Thanks!