Princeton-CDH / pemm-scripts

scripts & tools for the Princeton Ethiopian Miracles of Mary project
Apache License 2.0
1 stars 0 forks source link

test csv export into google sheets #10

Closed rlskoeser closed 4 years ago

rlskoeser commented 4 years ago

check that import doesn't disrupt headers, formatting, validation

rlskoeser commented 4 years ago

Successfully tested with one of our test pemm spreadsheets and preliminary data from parsing macomber.

With the google sheets document open:

You need to have the correct sheet open for the CSV you want to import.

The CSV files will need to be generated without header rows for this to work properly, but I think that's fine.

rlskoeser commented 4 years ago

Interestingly, when I try to import preliminary output into the Manuscripts sheet this does not work - it silently fails. (No error, no data added to the sheet). I think this may be related to our lookup field for the manuscript collection; import still fails even when I have values that should be valid.

However, when I instead position my cursor at the first empty data field and choose "Replace data at selected cell" it does work. It successfully imports, even if the manuscript collections are not valid (and it flags them as invalid, so validation is still working).

rlskoeser commented 4 years ago

This may actually be a problem for fields with custom formulas (e.g. canonical story title on story instance sheet). Importing from CSV using replace data replaces the formula; putting the formula into the csv as is means that every field references the first row.

rlskoeser commented 4 years ago

We know the issues with this now, and have a plan for addressing, so I think the chore for testing export can be considered complete.