Making a ticker dashboard for all venuesNext we'll create a dashboard - most recent ticker data for each venue on one page that looks like this. The dashboard is described in this piece of the manifest "dashboards": [ { "type": "ticker", "name": "tickerDashboard", "timeFormat": "dd-mmm-yyy hh:mm:ss" } ], and the venues to be included "work": [ { "type": "ticker", "venues": [ "btc_usd", "btc_eur", "btc_rur", "ltc_btc", "ltc_usd", "ltc_rur", "nmc_btc", "usd_rur", "eur_usd", "nvc_btc", "trc_btc", "ppc_btc", "ftc_btc" ] WalkthroughConverting timesAs covered in Creating a workbook from JSON manifest, it's possible that there are some times that need converted from Unix timestamps. In order to display correctly, we can apply a given time format to the receiving columns,For Each joc In jobSetup.child("options.columns").children Generating formulas Instead of copying the data over from the worksheets that make up the dashboard, we instead want to create a formula that references them. That way, if the worksheets get updated in some way other than this automated process, they will still display the current values of the contributing sheets. Essentially we want a formula like this example to appear in each cell of the dashboard. =INDIRECT("ticker_"&$A2&"!"&CHAR(CODE("A")+COLUMN()-2)&2) here's how ' now add the rows For more on this see. Data driven VBA apps with JSON You can get me on Google plus, Twitter or this forum. |
Services > Desktop Liberation - the definitive resource for Google Apps Script and Microsoft Office automation > excel to json and back > Data driven VBA apps with JSON >