rcv icon indicating copy to clipboard operation
rcv copied to clipboard

allow missing CVR headers

Open artoonie opened this issue 1 year ago • 4 comments

closes #813

This type of CSV is allowed and I don't see a reason to not support it. Modified a test to account for it.

Because getHeaderNames skips all null/empty columns, I had to move away from using the built-in header parser.

I also put the Generic CSV Writer behind a encounteredSourceProblem flag since it will lead to more exceptions on failure.

artoonie avatar Mar 31 '24 16:03 artoonie

Do we need to then add some basic validation checks to make sure that each candidate column has characters? I created a .csv generic_csv_test_cvr_2.csv that has a blank candidate name and I get the following error.

image

yezr avatar Apr 12 '24 15:04 yezr

Good catch -- yes, will need to fix that.

artoonie avatar Apr 12 '24 16:04 artoonie

Fixed -- it took a bit more work than expected, the built-in header parser really doesn't like null header names, even though it's fairly common practice in CVRs/Spreadsheets to have empty headers...go ahead and give this a whirl?

artoonie avatar Apr 12 '24 19:04 artoonie

image success!

yezr avatar Apr 17 '24 13:04 yezr