Dynamic Spreadsheets

Posts: 27
For our broadcast this past weekend, we had another company involved as well, and the software they were using (VMix), allowed them to pull data from a google spreadsheet that was being updated on the fly. Does ATVO have this capability at all?

For context each car qualifies over 4 laps, and since iRacing has the measurements of the track wrong, the speeds don't align with the times, so we have a spreadsheet that does the proper calculation for us. Vmix was taking the data that was being input on the fly as each car completed a lap and was entered in, and pulling that data and putting it on the overlay.
Posts: 81
p l e a s e add this functionality. Especially as we get close to speedweeks for the NASCAR world, having a way to import data from Google Sheets would be a huge help. It wouldn't even necessarily have to be live, just have an "import spreadsheet" button on the control panel or something that we can press after inputting laptimes, for example.
Posts: 785
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.
Posts: 81
Nick Thissen wrote:
you could consider turning Cache Data back on and using a script to reload the data at the click of a button.
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.
Posts: 785
Just grab the spreadsheet and call Parse on it. You can execute this script under a Button action for example.
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;
}
}
}
Posts: 81
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.
Posts: 287
Try to disable CACHE DATA save and then enabale CACHE DATA and save again.
Posts: 81
Emmanuel Suter wrote:
Try to disable CACHE DATA save and then enabale CACHE DATA and save again.
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.
Posts: 100
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.


I might just be speaking for myself here, but adding support for live Google sheet updating would be an *insanely* useful feature. I'm sure there's some significant climbs to get that working though.
Posts: 785
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").
Posts: 81
Would it be possible to monitor the sheet just to see if the file has been modified and update it then instead of just reloading the entire sheet at specific intervals?
Posts: 100
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").

Even if there was a route to use buttons, timers, or storyboards that could pull an update from a Google sheet online, we could control how often we need the data updated instead of committing to never updating or always updating.
Posts: 81
Zack R Johnson wrote:
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.
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.
Posts: 27
Any update from the dev team about something from google docs? the work around would be fine generally, but the timing and scoring is done by a different person on a different machine in a different state so using the workaround wouldn't work in this instance.