In this blog post, we want to show you how you can access any CSV file from the VINIS app to track a key figure in an automated way. We describe two different ways, each leading to the same goal.


A concrete example

A common use case might look like the following:
You have created an Excel or Numbers document where you manage all your financial data. I.e. here you find all important numbers and values for existing accounts, deposits, dividend receipts etc., which you update regularly. You now decide to set yourself a new goal. Every month you want to receive 200 $ in dividends. Next, you create the goal in the VINIS app and define a key figure to show you how much of the 200 $ you already receive each month. Now, of course, you could always enter new values in the app. But since the current data is already available in your document, it makes sense to use it. This saves you work and you can not accidentally forget to update in the app.


Excel or Numbers document

In order to export only the data you need, you should first customize your Excel or Numbers document. It makes sense to create an extra sheet to collect the data you want to export. In the app, individual values can be accessed via the column and line positions. This sheet could now be saved as a CSV file via “File – Save” to get an export. Since this procedure always means extra work, an automatic export when closing the document would be advantageous.


Data export from Excel (Microsoft)

Excel allows us to do this via the macro functionality. There is an event when closing the document in which we can do the export. Here you can find an Excel template in which this functionality is already integrated. Feel free to use this as a base for your documents, or copy the macro code. In the document there is a table where you can place your values accordingly. Only this table will be exported. In addition, the storage path can be stored directly in a defined cell of the document. The save path must be adapted to the chosen synchronization method (iCloud or Dropbox) (see below in the instructions).


Data export from Numbers (Apple)

Apple offers us the possibility to create an export in Numbers via quick action. These can be found in the top menu under Numbers -> Services and can be executed with one click. It is also recommended to have an extra sheet where all values are collected. Here you can find an Automator workflow that you can easily install. After the download you have to adjust the necessary paths in the workflow. To do this, right-click on the file “VINIS-Export.workflow” and select “Open with” -> Automator.app. You will now see an AppleScript in the right area of the automator that performs the export. In the upper area there are 3 variables defined:

exportFolder:
Local folder to which all tables of the Numbers document will be exported as CSV files. It is best to create a new local folder for this purpose. (e.g. “Macintosh HD:Users:Tobi:Documents:Export:“)

cloudFolder:
Folder that is available in the cloud (e.g. iCloud or Dropbox). This is where the CSV file of the data export table is copied to and then used by the VINIS app. Depending on whether you use iCloud or Dropbox for synchronization, it will look different. It is worth to finish reading the instructions beforehand and then set the paths (e.g. “Macintosh HD:Users:Tobi:Library:Mobile Documents:iCloud~com~vinisapp~vinis:Documents” for the iCloud variant).

exportFileName:
File name of the CSV file containing the exported data. This consists of (sheet name + “-” + table name + “.csv”. (e.g. VINIS-dataexport.csv).

These variables must be adjusted accordingly and then saved by clicking on File and Save in the menu. Now the Automator app can be closed and with a double click on the workflow file the quick action is installed. The action can now be triggered in Numbers via the menu under Numbers -> Services -> VINIS Export.

With both variants we now get a CSV file that always contains our current data. To access this now from the VINIS app, there are also several ways. I would now like to explain the synchronization via iCloud and Dropbox.


Synchronization via iCloud

Apple allows us to share data across our own devices with the free basic iCloud package. If iCloud is already active, you will find an iCloud Drive via your Finder or Explorer. On your iPhone, you’ll also need to enable iCloud if you haven’t already. Once you have already launched the VINIS app, you will see a folder named “Documents” in iCloud Drive that has the VINIS icon.

Important:
If your iCloud is active and the empty “Documents” folder does not automatically appear in your iCloud folder after the first app launch, please follow these steps:
1. launch the VINIS app
2. go to the “Settings” in the bottom menu
3. click on “Create backup” and confirm the backup

You will create a backup of your app data in the “Documents” folder. The folder is no longer empty and should now be displayed.

Now we just need to adjust the path for our CSV export so that the file is saved here (e.g. if you use Numbers on Mac: “Macintosh HD:Users:Tobi:Library:Mobile Documents:iCloud~com~vinisapp~vinis:Documents“, Excel on Mac: “/Users/Tobi/Library/Mobile Documents/iCloud~com~vinisapp~vinis/Documents/VINIS-Data-Export.csv“).

You can then access it in the VINIS app. If you already use iCloud on your devices, this variant is recommended.


Synchronization via Dropbox

Another possibility would be the access via Dropbox. If Dropbox is already installed, you will also see a Dropbox folder in the Finder or Explorer. Here you can create a subfolder of your choice or place your CSV file in the main folder. Adjust your export path accordingly (e.g. when using Numbers under MacOS: “Macintosh HD:Users:Tobi:Dropbox:Documents“, Excel under MacOS: “/Users/xSTrEaM/Dropbox/Documents/VINIS-Export.csv“, Excel under Windows: “C:\Users\Tobi\Dropbox\Documents\VINIS-Export.csv“). Now create a first export and navigate to the export folder via your Finder or Explorer.

To access the file from the app, we need to create a Dropbox link. To do this, right-click on the CSV file and select “Copy Dropbox link”. A link similar to this one is now stored in the clipboard:
https://www.dropbox.com/s/vnakiet2ztwizwe/export.csv?dl=0

However, we cannot download the file directly via this link, but only open it via the Dropbox page. Therefore we still have to adapt the link.
To do this, please replace “https://www.dropbox.com” with “https://dl.dropboxusercontent.com” and remove the trailing part of the link from the file name. (“?dl=0“)
As a result, the link should now look like this:
https://dl.dropboxusercontent.com/s/vnakiet2ztwizwe/export.csv

With this URL you can now access your data from the VINIS app again.
You only have to make this adjustment once. The link will not change in the future after updating the file.


Access from the VINIS app

Finally, we need to configure the key figures in the app. To do this, open the corresponding key figure and click on the edit button. You can now change the source of the data to “CSV file (iCloud)” for iCloud or to “CSV file (web service)” for the Dropbox variant. If the iCloud setting is used, the file name of the export (e.g. VINIS-dataexport.csv) and in addition the line number in combination with the line position must be stored. For example, if the desired value is in the first line, in the second column, then you enter as line number 1 and as line position 2.

In the “CSV file (web service)” variant, instead of the file name, there is the field URL, in which the previously created link is entered (e.g. https://dl.dropboxusercontent.com/s/vnakiet2ztwizwe/export.csv). The line number and position is filled in analog to the iCloud configuration.

Congratulations, you have successfully completed the setup of your key figures! This is only necessary once. If you change values in your Excel or Numbers documents in the future, they will be exported, the app will retrieve all new data at regular intervals and store it in a database on your iPhone. Even if the app is not opened, the values are checked for changes, which are then automatically applied if necessary. Your key figures are now always up to date and show you the current progress of your goals.

Since the configuration of the key figures is very flexible via the different connector types, there are many more ways to enable a synchronization of your data. If you have already implemented other creative ideas with VINIS or if you still need a certain functionality in the app, please let us know. We are grateful for suggestions and ideas via email and look forward to further developing VINIS together!