<< Click to Display Table of Contents >> Excel Export/Import |
This chapter describes the Export and Import function to and from CSV or Excel file.
In this chapter we use the Equipment class as the example.
Export and Import Active node only as an Excel file
In the section, we show how to export only the active node as an Excel file. To export the data only of a specific class you first select the class and then click on the Export button. The Export Data dialog opens where the file path, name, and extension are pre-defined. You switch to Active node to ensure only the properties of the selected class gets exported. If you want to have the file in a different location you click on the ... button to select a different location. Finally, you click on OK. If you open the Excel file it looks like this. The worksheet is using the class name. The cells with the grey background cannot and must not be edited. If you select the cell for the Tag you will see, that there is a formula defined. This is essentially the Tag Format as it is defined in Plant 3D. We change the Number of the two equipment pieces and we see, that the Tag got updated automatically. We also added the Manufacturer. To import the changes you click on the Import button. Next you select the Excel file. The Import Data dialog opens where you click on the OK button, because the option to import only a specific worksheet is not important here, since there is just one worksheet. In PlantDataManager you now see all your changes from the Excel file.
|
Export and Import Active node only as a CSV file
In the section, we show how to export only the active node as a CSV file. This is almost the same process as with an Excel file. You click on Export. The Export Data dialog opens, but now you click on the green icon to switch from xlsx to csv. The icon changes to a C and the file extension also changes to CSV. You also select Active node. The worksheet name has the project name in front of the class name. If you select the cell for the Tags you will see, that there is no formula like with Excel files. You change the Number. Changing the Tag is not needed, because PlantDataManager will only import the cells which are used in the Tag Format, but not the actually Tag value. We use the Import button again. And now we select the CSV file. There is no Import Data dialog this time, because a CSV file can contain only one worksheet. We see, that not only the Number was imported, but the the Tags was updated as well.
|
Export and Import Active node and all child nodes as an Excel file
In the section, we show how to export the Active node and all child nodes as an Excel file. Now we not only export the Equipment class, but also all sub/child classes. We use the Export button again. Now we don't switch to Active node, but keep the Active node and all child nodes option. When we open the Excel file we see a worksheet for every class which is under the Equipment class. And the Equipment class itself. If you want to edit the Tag you have to use the class of the symbol. E.g., Centrifugal Pump. You see the formula for the Tag again. You change the Number and the Tag changes automatically. If you select the Pumps class above the Centrifugal Pump you see, that the Number property is greyed-out, because it comes from the lower class as you can see in the formula of the cell. The same applies to the Tag or Type properties. If you click on the Equipment class you also see, that this comes from the Centrifugal Pump class. However, it is possible to edit data on the worksheets of the parent classes like Equipment. Let's enter a Manufacturer to later see what happens on import. We click on the Import button again. We select the Excel file again. You can now choose to Import all worksheets or Import selected worksheets. We will first see what happens when we Import all worksheets and click OK. And now we see, that the Number and Manufacturer values were imported. If you make changes for the same property and object on multiple worksheets, then the value of the most right worksheet will be imported. So make sure you don't enter different values on different worksheets. If you use the Import selected worksheets option you can select one or many worksheets for the import. Let's what happens when we only import the Centrifugal Pump. And we see, that only Number was imported. Now let's import the Equipment class after we already imported the Centrifugal Pump. And now we see the new Manufacturer in addition to the Number.
|
Export and Import Active node and all child nodes as a CSV file
In the section, we show how to export the Active node and all child nodes as a CSV file. Now let's see how exporting Active node and all child nodes work with CSV files. We use the Export button again. We click on the green icon to toggle to CSV file format. We click OK. Since CSV doesn't support multiple worksheets, PlantDataManager exports each class as a separate CSV file. Of course, they is no reference between CSV files within the CSV files. We open the PDM NPO-Equipment-Centrifugal Pump.csv file. As the worksheets name you see the file name. However, it may be trimmed off if the name is too long. The Tag has no formula in CSV. We change the Number of the Pump. Next we open the PDM NPO-Equipment.csv file. We see the file name as the worksheets name again. We add the Manufacturer for the Pump. Next we use the Import button. We select the PDM NPO-Equipment.csv first. We see, that the Manufacturer was imported. We import again. Now we select the PDM NPO-Equipment-Centrifugal Pump.csv. Now the Number was imported, but the Manufacturer is gone. This is because the PDM NPO-Equipment-Centrifugal Pump.csv doesn't contain a Manufacturer.
|
Next Chapter: Save & Close