Having a CSV error problem? HERE ARE THE ANSWERS!

Having a problem? “The CSV file had an error…” HERE’S THE REASON: You MUST have all the “useless” commas in your file.

— BAD file —
aaa,bbb,ccc
dd
ee
ff

— GOOD file —
aaa,bbb,ccc
dd,
ee,
ff,

And a BONUS: If you want a comma in the field, enclose in double quotes. Indeed, the best way to create is to use Excel and “Save as” CSV.

aaa,bbb,ccc
“Smith, Bob”,
ee,
ff,

It took me HOURS of testing to find the reason. You’re welcome. :wink:

HEY LIGHTBURN; I’ve seen MANY posts & questions about this, but the Topics are all “closed automatically.” Is there a way my answer can be applied to the closed topics? It would be great to share the solution with all the people still having the problem!

Considering CSV means Comma Separated Value

Do you believe useless really applies here? :crazy_face:


Nevertheless, thanks for posting…

I’m sure it will benefit others.

Take care

:smile_cat:

This seems like interesting and helpful advice but I’d like to understand this more completely before acting on the proposed solution.

When testing, are you applying the CSV data to three displayed fields?

Does the Following good file…

Present within your project as:

aaa,bbb,ccc
dd, ee, ff,

or does it apply as

aaa,bbb,ccc
dd, null, null
ee, null, null
ff, null, null

Are you willing to share your test files?

Your second sample is how it works

aaa,bbb,ccc
dd, null, null
ee, null, null
ff, null, null

But without the right number of commas, LB fails to import.

%0, %1, %2… refers to the columns. (zero is the 1st column)

Offset refers to the rows. (zero is the 1st row).

Sorry, I dumped the original files as it’s so simple (just like a trapeze artist after years of practice). I found no problems related to CrLf issues. Just the right number of commas on each line.

Ultimately, I think LB should review their import procedure to “If there are no more commas on a line, use nulls.” This would indeed cure a lot of headaches!

Note; in my picture, assuming you want sequential rows to match the CSV, that the;
1st %0 should be set to Offset=0
2nd %0 should be set to Offset=1
3rd %0 should be set to Offset=2

image

So glad to be able to contribute something!

Yes, I would call the trailing commas useless. Just like showing the number 4.3000000 (unless you’re indicating specific accuracy, which in this case we’re not).

Please refer to my previous answer. I hope the LB developers will see this and augment the input routine!

John, I’ve also noticed a related bug. LB saves the name of the CSV file in the Windows “Recent” list. But when clicking it, the CSV file will, of course, not open in LightBurn.

Please check the [Solution] box. I’d love to get my first credit after hours of debugging!
Thanks, BitSmith.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.