Force refresh cloud files

I’ve noticed that using a FileAttachment with a Google Drive csv doesn’t get updated when the source csv changes or when I refresh the page.

Is there a way to manually force a refresh (other than making a change in the cell so it re-evaluates and then undoing it)?

I just tested this by replacing the csv on Google drive with an updated csv and when I refreshed my notebook, I saw the new values. How are you changing the source csv, btw?

I tried it with the Google sheet directly (so not a csv):
workbook = FileAttachment("google://Google drive test").xlsx()
and also with a csv that I modified and re-uploaded:
FileAttachment("google://Google drive test - Sheet1.csv").csv()

And both updated when I refreshed the notebook.

1 Like

You’re right. I just tried again and refreshing the page worked.

I don’t know why I didn’t see it the first time. :thinking: Maybe it’s because I was using a local folder and my Google Drive Desktop app hadn’t synced it properly. :man_shrugging:

1 Like