I am importing a data from a lot of Excel files with similar structure. When I use PowerQuery or Pandas, I can easily add the file name and sheet name as 2 extra columns - I use these 2 columns to do validation after the data is imported. As of now, I could not figure out a way to add these to Grist. I am manually typing them in for each file.
Hi there!
You can use a formula to add data to columns during the import. It’s still a bit of a manual process but only involves typing the data once per import.
Next to the column name, click to expand the dropdown box and select ‘Apply Formula’.
Enter the text with quotes. This is the python format for string values. The File Name in this example is Class Enrollment
. The Sheet Name is Classes
. You can see this information at the top of the dialogue (highlighted in green). After entering the formula, you can see this data populated within the column in the import preview.
Thanks,
Natalie