.csv device upload failing with"unexpected header" for the first column #8044
-
Netbox 3.0.4 I've generated a .csv file through excel in osx- I save a sheet as a .csv I get the error "!CSV file - Unexpected column header "name" found" The example starts with "device_role", so I moved the name column, but now the problem is "unexpected column header "device_role" found" If I look at the .csv, the first line is exactly this: If I take the contents of the .csv and copy and paste them into the CSV Data window, the bulk upload works. Does the .csv file header line need a different format for the headers? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Since it's the first column that has the problem, I suspect that Excel has put some hidden magic character at the start of the file. Perhaps it's a unicode BOM. If this turns out to be the case, then you can open a feature request for the CSV upload to process (or ignore) the BOM. Try printing the first few bytes of the file like this:
and you can paste it here if it doesn't make sense. |
Beta Was this translation helpful? Give feedback.
Since it's the first column that has the problem, I suspect that Excel has put some hidden magic character at the start of the file. Perhaps it's a unicode BOM. If this turns out to be the case, then you can open a feature request for the CSV upload to process (or ignore) the BOM.
Try printing the first few bytes of the file like this:
and you can paste it here if it doesn't make sense.