Starting with Origin 2019b, you can connect a worksheet to an external data file using the new Data Connector Apps. The benefit of using a Data Connector is that the project can be saved without the data to reduce project file size, and one can at any time re-import the data from the file for further processing. Data Connectors are available for several file types such as CSV, Excel, XML, JSON, MATLAB, and also for data archived in Origin Project files.
A single project file can have any number of data connectors, allowing you to set up connections with multiple files, all of the same type, or even mixed file types. This allows you to pull in data from multiple experiments and analyze them in a single project file.
Let us then look at two different scenarios:
Your data files are moved to a new folder location:
It would be tedious to edit the file path for each Data Connector in your project to point to the new location. To make life easier, Origin 2019b introduces the concept of a Common Data Path for Data Connectors.
After importing a data file with Data Connector, click on the Data Connector icon and select Common Data Path… and in the dialog, set the path:
The Common Data Path is global within each project. So once it is set, any new Data Connectors that you add to the project for data files in the same folder or sub folders, will use the Common Data Path. Only the relative path information is used by the data source. Also, if other data connectors already existed in the project, the source path for the files will be checked and if the path is under the Common Data Path, they will all be automatically converted to be a relative path.
Note: If a source data file is not under the Common Data Path, an absolute path will still be used.
You want to share the data files and the associated Origin Project with a colleague:
For this scenario, Origin 2019b also offers a Relative to Project Path option for your data source. You can follow these steps:
- First save the Origin Project at the top level of the data folder that contains all of your data files
- Then set up each Data Connector with the Relative to Project Path option in the Data Source dialog
Now you can zip up the entire folder and share it with your colleague. When they unzip to some arbitrary folder location, all Data Connectors will look relative to the Origin Project Path to find the relevant data files.