Display an Excel file
From SpinetiX Support Wiki
As prerequisite for this tutorial, please follow the "Create a master playlist" tutorial.
Contents
Introduction
This tutorial explains how to display the content of a spreadsheet file created within Excel, on top of an existing layout. For this, we are going to import one of the spreadsheet widgets included in Elementi widget library, configure it to load the data from an Excel file and display the information we want on the screen.
You can download the project resulted after following this tutorial from the link below.
Video
For full screen, see this video on Vimeo.Tutorial
- Difficulty: Easy.
- Total duration: 5-10 minutes.
- Requirements:
- Elementi 2016 or later. The latest version is recommended.
- Microsoft Excel application installed on your PC.
- One or more HMP devices using firmware 3.3.0 / 4.1.0 or later for the publishing part of the tutorial. The latest version is recommended.
Getting started
- Prepare your Excel file.
- Open Elementi and follow the "Create a master playlist" tutorial. Or just download the project from that tutorial and import it into Elementi.
- Once done, make a copy of that project and rename it to something like "Datafeed - Excel - Spreadsheet".
- Double-click on the project icon to open it.
Import the spreadsheet widget
Next, let's import a spreadsheet widget into the project.
- Click on the "Widgets" tab within the Browse panel to open the Elementi widget library.
- Open the "Spreadsheets" folder. For this tutorial, we are going to use the "Text Ticker.svg" widget.
- Drag & drop the widget from the Browse panel onto the Edit panel. A new media layer is added on top of the other layers.
- Click the project name in the Browse panel to go back to the project. As you can see, the widget file got automatically copied into the project.
- Use the "Align left", "Align top", and resize options to position the widget on the top area of the screen.
Use data from the Excel file
Next, let's configure this widget to load data from an Excel file. No need to import the file into the project, as the Excel file itself cannot be interpreted by the HMP.
- Double-click on the "Text Ticker" layer in Edit panel to open the widget properties and to preview it within the main layout context (i.e. without closing index.svg document, as a double-click within the Browse panel would do).
- Click on the button (it opens the Data Feed Properties dialog) and edit the properties related to the data source.
- Select the "Channel" as Excel file.
- Click the "Workbook" button to browse for the file on your PC.
- Select the sheet that contains the data you want to display, if required.
- Click the "Test..." button to verify the results. Click "Close" once done.
- Click the "OK" button to save the changes to the data source.
Configure the widget
Next, let's configure the text ticker widget, which by default is set to display the content from a column called title (this is done through the data placeholder syntax [[title]]) - as our spreadsheet does not contain a column with this name, nothing is displayed for the moment.
- Edit the text layout to change the text to be displayed and its color.
- Click the pen button of the "Text template" property to open the "Edit Text" dialog.
- Replace the default "[[title]]" with the following text: "[[Fitness Class]] - [[Trainer]]: [[Registrations]]".
- Use [[column_name]] to display a specific column - i.e to display the column called "Trainer", use "[[Trainer]]". The column names are case sensitive!
- It is possible to mix text coming from the spreadsheet with default text, for instance "Trainer: [[Trainer]]".
- It is possible to format the text to be displayed - like making it bold or change the text color.
- The text size cannot be changed for this widget as it will be automatically computed to fit the size of the widget in the layout.
- This widget only displays text on a single line.
- Select "[[Fitness Class]]" and make it bold and optionally change its color.
- Click on the "OK" button to save the changes to the text template.
- Save your work.
Publish the project
The final step is to publish the project on your HMP device(s) by clicking the "Publish" button.
See also
- Master playlist tutorial
- "Customize your spreadsheet widget" video tutorial which is covering the subject presented on this page.
- Get data from Excel file