I have a relatively complicated excel sheet in which columns start at A and end at BB and rows start at 5 and end at 203.
What I would like to do is tell MySQL that each column of data (with a header that I do not specify in the sheet) should start at row 5 and end at row 203 and specific exactly which columns I would like transferred. How might I do that?
Thanks for the help!
Edit: There is unrelated data below row 203 and I don’t want that to be taken. There are also blank columns, so I need to avoid those.
First off, save your excel sheet as CSV.
Next. Create a blackhole table to read the data into:
Create a simple counter table with just one row.
Create a trigger on the blackhole table
Finally import lines 5 to 203 into the
import_exceltable.The first 4 lines will be ignored by the
LOAD DATA INFILEthe last lines will be stripped out by the trigger.