Home                                        Prolog version 4.

Import from spreadsheet example

 
We have been given a file from excel. It has an extension of .xlsx and we wish to import it into Prolog. Prolog can only import spreadsheets in csv format so within excel we need to do a File - Save As and save in a csv format. Make sure the delimiter is a comma and there are no ",s around the text.
 
The excel file saved as a csv is shown below. We have opened it within notepad as a check:
 
 
Back in Prolog we need to open up a blank file. The example shown below is using the CoalLog template. If you look at the sample data you will notice that the depths are recorded as "From" and "To". We are presently set as recovered and depth. To change this go to the "Setup" menu and then "Options". Select the From - To option.
 
From the "Data Xfer" menu click on Import and then Spreadsheet Data. Next you go through and set the excell fields to the appropriate fields defined within Prolog. If there is data within the spreadsheet that is not within the Prolog file then you may need to enter new fields within Prolog. Here you will notice that there are some unfilled fields within Prolog. This is because there is no appropriate entry within the spreadsheet corresponding to this entry.
 
 
 
You will notice there is a Format file name defined along the top row. This holds the data once we run the import. Next time we enter this function the defaults from last time we were here are automatically brought up. If you have more than one type of format you simply select a different format file. This file is defined in metres so leave the Metres radio button set.
 
We now need to browse to the file to be imported. Click on the "Browse File" button and find the appropriate file. Now hit the OK button.
 
 
In our data the first line was a heading line. This is imported as well as just another entry into Prolog. However this is a good check on our actual data. You will notice that most of the entries match - however you will notice above that the mineral abundance,mineral type and mineral assoc are incorrect. You need to go back in and fix these entries up. You can then perform the import again. As it is already done we get the following dialog box. Set the replace selected and select all the previous data and OK. It is overwritten with the correct data.
 
 
The excel file is now imported. You need to delete the first page. Show first page and hit the X icon to delete it. The first entry is now shown.
 
 
<TODO>: Insert description text here... And don't forget to add keyword for this topic

Made with help of DrExplain

Prolog version 4