Nick Thissen wrote:What would a script like this look like? This would be an easy workaround, I could just add times to the spreadsheet then update it when I'm done for each attempt. Tedious, but it'd get the job done.
you could consider turning Cache Data back on and using a script to reload the data at the click of a button.
using System;
using ATVO.ThemesSDK;
using ATVO.ThemeEditor.ThemeModels;
using ATVO.ThemeEditor.Scripting.DotNET;
namespace Scripts
{
public class RefreshCsv : IScript
{
public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
var spreadsheet = item.Theme.Spreadsheets.Find("my_sheet.csv");
if (spreadsheet != null)
spreadsheet.Parse();
return null;
}
}
}
Emmanuel Suter wrote:Sorry for the late response, but yes, I tried this and it didn't help. Note that it's in a widget that uses the spreadsheet as a data set, I haven't tested if it works for other widgets.
Try to disable CACHE DATA save and then enabale CACHE DATA and save again.
Nick Thissen wrote:
There is no support for live Google sheets but the existing Spreadsheet functionality could already work for you with a local spreadsheet. There is a setting on the Spreadsheet called 'Cache Data'. If you turn that off, the Spreadsheet will refresh every time data is requested from it. Meaning you can update the underlying csv and it should update live. This could have a performance impact if the csv is large though, if that is the case you could consider turning Cache Data back on and using a script to reload the data at the click of a button.
Further you can set the External Filepath property of the spreadsheet to point to a local on your PC so it is not embedded in the theme but reads from a normal csv file.
Nick Thissen wrote:
I'll look into it. It used to be very easy to update a complete spreadsheet every once in a while (meaning not completely live), not sure if that is still possible. Having it completely live may be considerably more difficult indeed (unless I just go the route of "update the whole thing every second").
Zack R Johnson wrote:Quick update on this: so this works for most things flawlessly, but this does not work for widgets that specifically use spreadsheets as a data set.
This doesn't seem to work on my end. In the event log it says that the CSV was reloaded correctly but no data actually changes in the widget.