Datasheets hold the data that your simulation can access and update. Like a database, datasheets allow you to store any information required to simulate your application. In this tutorial, we will create a new datasheet to store customer information that will be used in our simulation. We’ll use two methods of populating the datasheet with data: typing directly into the datasheet, and importing a properly formatted CSV file.
Watch this video to see a brief demonstration of the topics covered in this tutorial.
The basic building block of a datasheet is the record. A record is a collection of related data treated as a single item. For example, a CUSTOMER could be stored as a record that includes: First Name, Last Name, Email Address, Username, and Password. Each of these related pieces of information is called a field: each CUSTOMER record has a First Name field, a Last Name field, an Email Address, a Username field, and a Password field.
Datasheets look like spreadsheets, with each row corresponding to a record, and each column corresponding to a field. You can add data to your datasheets by simply typing into the datasheet in Studio, or you can import sample data from a CSV file. You can also import datasheets, including any data they contain, from one project to another by using the Import submenu in the Studio File menu.
The CSV import feature relies on the first row in the CSV file matching the column names in your Datasheet, so before you begin, check your column headers. Alternatively, you can create a datasheet from scratch by importing your CSV file into a blank datasheet.
In this example, you will create a datasheet in iRise Studio and populate it with five columns of sample data. You will then export the data to a CSV file, add more records in Excel (or your favorite spreadsheet application), and then import the new data back into Studio.
First, create a new datasheet in Studio by expanding the new component menu above the Directory panel and choosing Datasheet.
Name this datasheet CUSTOMERS. Then create five columns with the following headers:
Note: To name the first column, right-click the column header and choose Rename in the context menu. Once the first column is named, you can tab to the remaining columns.
Add at least one sample row of data to the datasheet (you can use one of the images on this page for reference if you’re not feeling creative).
Next, you will create a CSV file and modify it outside of Studio. Click the Export CSV icon above the datasheet and save the resulting CSV file to your desktop. Then open the CSV file in Microsoft Excel (or another spreadsheet application) and add several rows of new sample data.
Save the changes to your CSV file (making sure to preserve the CSV file type). Back in Studio, with the CUSTOMERS datasheet displayed in your workspace, click the Import CSV icon on the toolbar and navigate to the CSV file you saved. The data you typed into Excel now appears in your datasheet inside iRise Studio!
The row of data you created manually will be duplicated after you import the CSV file. To delete the duplicate row, right-click the row number and choose Delete.