CSV problems

We’ve been doing dumps of MB Counselor data from SB and the national system (via my.scouting) to find discrepancies. The dumps are csv format. The problem occurs when the data itself has entrained commas.
Ex. District field often includes several districts separated by commas.
Ex. The MB name Signs, Signals, and Codes.includes 2 commas.
Ex. Address fields often include a comma
This means that for those records, all the columns right of the entrained comma are skewed from where they should be when opened by any of the spreadsheet programs.
Can this data be dumped in other than .csv format? Or is there another way around this, other than manually correcting the data. We have several thousand records in each dump so this would be labor intensive.
Pete Townsend, Chippewa Dist Adv. MCC

I’ll ask, no guarantees anything will be done differently. And if we make changes I know other councils have scripts based on what we currently have, so it would be a disturbance to them.

1 Like

Bill, Thanks for quick reply and at least asking.
If you (or anyone reading this) know of a script developed to handle these entrained commas. please give me a contact name. Or if anyone knows a way to get an .xls dump rather than .csv please also share. Sharing code like this is a great reason for having a discussion group.
Pete

I just exported csv’s from both and have no issue. If you look using a text editor, you should be able to see the fields are wrapped with quotation marks. This is a standard CSV mechanism used so entrained commas are ignored and should not cause column breaks.

I suspect whatever tool you are using to read the CSV is managing the csv as a straight text input.

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