Can I replace a csv on a sheet with another csv without importing one and then deleting the other?

This may sound like a weird question so I’ll explain the context. My development team is trying to create a spreadsheet dynamically updated with webscraped data on a csv every 5 minutes using a js scraping library. We are able to successfully import our csv every 5 minutes, but it just stacks on top of the previous csvs within the sheet. This eventually becomes a very large amount of csvs. In other spreadsheet apps, there are options to append to a sheet or replace a sheet while importing a csv, however I cannot find any functionality on coda to replicate this. Im also open to any other suggestions for deleting/getting rid of these older csvs. Thank you so much for your time!

Hi @Ezra_Jeter

Depending on

  • the way you actually import your data every 5 minutes (automation? Make? Zapier?)
  • the global context
  • what you do with your csv table in coda
  • the size of the data
  • etc…

There are several possible ways.

Brut force would be to fully erase the former table and replace it by your new import.
We could also provide a cleaner way to compare both table, remove deleted values, adding new ones, and updating the modified one.

But we need more detail :wink:

Cheers
Q.

Thank you for your quick reply. To address your questions:

  1. We are using the Javascript library Playwright to automate the process of exporting a csv from one website, navigating to coda, opening our spreadsheet/page, clicking the import button, and then importing our new csv. This library uses html to locate buttons to click on and give input to.
  2. Our goal is to be able to share the link to our page with other employees so employees with the link can always have access to this updated data without us having to manually export said csv and email it to them each time they need access to the updated data.
  3. Our csvs usually have anywhere from 20-400 rows.
  4. The reason we can’t brute force this with our automation script is because the xpath for each new table we create is different from the last, so our crawler is unable to locate the proper html to continually delete old tables.

The reason for all of this is the website for the school we work for does not allow you to view parent response forms without exporting the whole csv. So we’re hoping to use coda to create a dynamic spreadsheet of sorts for these response forms.
If you need any more information, please let me know.
I really appreciate you and your help.

@Quentin_Morel sorry, forgot to tag you in my last comment