Starting with App from a Spreadsheet
Introduction
You can choose the App from a spreadsheet starting point in Studio Pro, import a Microsoft Excel spreadsheet, and build an app using your data. The data of the spreadsheet will be analyzed and converted into a domain model with entities, attributes, and associations. Also, pages and navigation items based on your data can be generated.
Preparing Your Data for Import
Before importing your spreadsheet into the app, do the following:
- Make sure your spreadsheet is in the .xlsx format
- Make sure that the spreadsheet meets the following requirements:
- The size of your file does not exceed 1 MB.
- The number of worksheets does not exceed 50.
- The number of columns per worksheet does not exceed 100.
- A column name does not exceed 100 characters.
- Make sure that you have normalized your data in the spreadsheet. Check if the following requirements are met:
-
Each column should name a unique name within a workbook.
If a column name consists of several lines, Studio Pro will process the only first one. If your column does not have a name, but has values in it, it will be named “_EMPTY”. -
Each cell of the worksheet (a row or a column) should contain a single value or be empty.
-
If you want to create links (associations) between two columns, make sure the conditions mentioned above for creating these links are met.
-
Data Conversion During Import
During the import process, spreadsheet data is analyzed and converted the following way:
-
Your worksheets are converted into entities.
-
Your columns are converted into attributes.
-
The links between the worksheets are identified and can be converted into associations if all of the following conditions are met:
- All values of one column in your spreadsheet are used in another column.
- The values of the other column are unique.
- The type of data in these columns is converted to string or enumeration attribute types. For more information on correspondence between Excel data types and attribute types, see the Correspondence Between Excel Data Types and Attribute Types section.
Download this Excel spreadsheet example to check how data is normalized there: Spreadsheet Example. You can also import it into an app and test how this spreadsheet is converted. For more information, see the Importing a Spreadsheet section.
Starting an App from a Spreadsheet
To create an app using your own data, do the following:
-
Open Studio Pro and choose Create New App.
-
Choose the App from a spreadsheet starting point.
-
When you create your app, a page where you can upload your spreadsheet is opened. Drag your spreadsheet onto the page or browse your files and choose the one you would like to import.
If you choose to start without data, you will have just a blank app, and will not be able to import a spreadsheet later.
Previewing Spreadsheet Data
Once you select the spreadsheet for import, your data is analyzed and is converted to associations, entities, and attributes.
Correspondence Between Excel Data Types and Attribute Types
In the table below, you can see how the Excel data corresponds to the attribute types:
Excel Data | Attribute Type It Is Converted to |
---|---|
One of the following conditions should be met:
|
String |
Values in the columns should be exclusively one of the following:
|
Boolean |
Data of type General or Number that falls into a range from –2,147,483,648 to 2,147,483,647 and does not contain empty cells. | Integer |
Data of type General or Number that falls into a range from –9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 and does not contain empty cells. | Long |
Other numbers that do not fall under Integer and Long attribute type conditions and the column does not contain empty cells. | Decimal |
Data of type Date or Time that does not contain empty cells. | Date and Time Note If only the date is indicated, the time is set to 00:00 in the preview |
All of the following conditions should be met:
|
Enumeration |
Previewing Associations
After you upload the spreadsheet, worksheets that have relations (associations) are identified.
In the Customize import, you can check the spreadsheet data before the actual import is completed. You can review tables and columns and untick the ones that you do not want to import. Tables that have relations (associations) detected are indicated with a link icon ():
The columns which have associations cannot be deselected for the import. You need to delete the association first.
To review a list of associations and unselect the ones that you do not want to be created, click Edit…. In the Edit Relations dialog box, you can see which table and column will be used to create an association From and which will be used to create an association To. A column with unique data is the one the association goes to.
For example, in the image above you can see that an association is created from the MarketingDocs entity to the Contributors entity. This association was discovered through the column Responsible in MarketingDocs and the column Name in Contributors. As a result, when data is imported, the MarketingDocs entity does not have Responsible as an attribute. Instead, it has an association with the Contributors entity and gets data from this entity through the association.
Managing Attribute Types
At the bottom of each column (that will be turned into an attribute), an attribute type is automatically identified and indicated. Click the drop-down menu to change the attribute type. For more information on how Excel data types correspond to attribute types, see Correspondence between Excel Data Types and Attribute Types.
If columns have empty values, the attribute type will be identified as String. However, if you change it to another attribute type, Studio Pro automatically chooses and fills in a default value for the following attribute types:
- Booleans – empty values are converted to False
- Long and integer – empty values are converted to 0
The Option to Generate Pages for My Data
You can select or unselect the Generate pages for my data option at the bottom of the Data Import Preview.
If this option is selected, it generates an overview page with a data grid and an {EntityName}__NewEdit page for each entity. For more information, see the Generating Pages section below.
Your Data after the Import
After you have reviewed all data, click Import Data at the bottom of the Data Import Preview.
Open the domain model to see the created entities and attributes:
You can now preview your app and test it out by clicking Run Locally ().
Generating Pages
If Generate overview pages is selected in the preview page, pages are created based on your spreadsheet. The following changes are made in the page editor or in the navigation document:
-
One {EntityName}_Overview page per entity is created – a page with a data grid where you can have an overview of this entity’s objects
-
One {EntityName}_NewEdit page per entity is created – a page to create and save a new object of this entity, or to edit the existing objects
-
A Manage data menu item is created in the navigation with a link to the first {EntityName}_Overview page with tabs for each Excel table that allow you to go to the overview pages of other entities:
-
Your data is transferred to the preview and publish environment. This means when you preview or publish your app, you can view your data there