Sometimes itβs good to reinvent the wheel, you get what you need and what you only need
It seems easy, at first you need csv kinda parser, but it's too simple, you can do something like:
Your task can be divided into:
1.- Import csv: (Create a download form, process the file extension.
2.- Store csv somewhere temporarily (Store the file, possibly with a hash instead of a name, so there are no conflicts
3.- Disassemble the csv. (http://php.net/manual/en/function.fgetcsv.php will be your friend)
4.- Two input fields, one for parsed files and one for your map, use some javascript fancyness sessions to add the correct columns on the fly
5.- Then save the mapped columns with real csv values.
source share