aggregate icon indicating copy to clipboard operation
aggregate copied to clipboard

Support underscores on column names in Google Spreadsheets

Open ggalmazor opened this issue 6 years ago • 5 comments

As per conversation on the forums, it looks like we're replacing allegedly unsafe characters, including: *, :, -, and _ in column names when publishing to Google Spreadsheets.

We should try to understand why this is being currently done and whether we need to continue doing it or not.

ggalmazor avatar Mar 17 '19 09:03 ggalmazor

@ggalmazor Where in the code is this done? Maybe git blame would help figure this out. If not, I'm hoping this is an easy thing for you to test. Not a big priority though...

@wbrunette Do you know off the top of your head?

yanokwa avatar Mar 17 '19 18:03 yanokwa

I see a Dylan Price on the git blame. Does that ring a bell?

This came in 4c8abfcc0cbdde206c5cc72cb345d73d275304e0: "Fixed GoogleSpreadsheet trouble with special characters in headers and added parent-uid to repeat spreadsheets." Diff: https://github.com/opendatakit/aggregate/commit/4c8abfcc0cbdde206c5cc72cb345d73d275304e0?diff=unified&w=1

ggalmazor avatar Mar 26 '19 10:03 ggalmazor

Yeah, I know Dylan, but I think it's too much work to track him down. We should just try underscores and special characters and update the code accordingly.

yanokwa avatar Mar 26 '19 18:03 yanokwa

OK, I'm tagging this issue for v2.1.0 so that we don't forget to give it a go before dismissing or fixing it.

ggalmazor avatar Mar 27 '19 19:03 ggalmazor

Apologies for the delayed response. Old history from memory, not sure what is in the code now and haven't looked.

Column headings were originally the variable names in the xform (similar to how database columns operate). A feature request that got added was to change to the question vs the variable names in the spreadsheet.

Back to dashes and underscores ... 8-9 years ago Google spreadsheets did not support either dashes or underscores (can't remember which way it was) being in the column name and to make things complicated Google fusion tables did not accept the other, so we converted the dashes to underscores and underscores to dashes depending on which service we were exporting to based on the naming requirements of the Google service.

Statements in this comment are from memory recollection and have not been verified.

wbrunette avatar Mar 29 '19 20:03 wbrunette