Google Spreadsheet removes underscores from field names

I am currently using Aggregate 1.6.1 to publish form submissions to a Google Spreadsheet. However, I am noticing that when this data is published, underscores in the field names are being removed in the google sheet. In the JSON export I can see participant_id, but in Google Sheets, I am seeing participantid. Is there a way to keep this consistent when I publish to Google Sheets?

Odd. My guess is that the Sheets API probably didn't allow underscores at some point? @Grzesiek2010, I know this is a problem with Aggregate, but in your experience with that API, does it allow underscores?

Yes it's allowed. here is one test I filled like a week ago and I have underscores there.

Currently Aggregate has a list of unsafe characters that will be remove from column names in Google Spreadsheets, including: *, :, -, and _.

Thanks for sharing your thoughts here - I really appreciate your support. @Grzesiek2010 I am really curious how you have managed to get the underscores in your document. Perhaps I need to update to the most recent version of ODK Aggregate. It seems like my issue might be related to what @ggalmazor is mentioning. Any insights on how I can get the underscores to show up? I would hate to rename all my variables! :slight_smile:

I didn't use Aggregate I just sent a form form ODK Collect to GS to check if it's possible at all.

Is this something that the ODK community would want to address? Pretty much all of my organization's surveys have underscores in the field names.

Hi, @anideepa!

I believe there must be a good reason to avoid underscores, but I haven't studied this. Maybe there's some hard limitation on the API Aggregate uses to push data to Google Spreadsheets, although common sense dictates that if Collect can, Aggregate should be able to use them too.

I've filed an issue to document this issue and track it down. Maybe someone can spend some time to confirm whether we need to continue replacing underscores or not.


Thanks so much @ggalmazor!