Importing spreadsheet data

Adding a CSV Source to your Silva

Preparation

Before adding data from a spreadsheet such as Microsoft Excel you must first save your data as a CSV file (Comma Separated Values). This is a text format where the values in the cells of your spreadsheet are separated by commas.  

Saving a CSV file

Fig. 1. Importing CSV text example.

Importing a CSV source

Go to the Silva Management area and add a CSV Source via the select list.

Note: if you do not see Silva CSV Source in the list ask your Manager to install the Silva External Sources product into the Products area of Zope. (Fig.2.)

Adding CSV external source

Fig. 2. Silva CSV Source option in select list.

Fill in the id and title and the character coding for your CSV file. (Fig. 3.)  If you're not sure what the coding is, leave it as the default 'latin1'. If your text has accented characters and they don't display correctly in the "preview", try one of the other encodings. If your encoding doesn't appear in the select list – say your content is in Chinese – you can type it into the designation field. Then click save

If you click on save and edit you will be taken to an area with four more forms.  This is useful because you can give a description of your uploaded data or you can upload here if the data needs updating or if you  simply wish to check the uploaded code.

Congratulations, you now have imported your spreadsheet data.

Creating a Silva CSV Source

Fig. 3.  Silva CSV Source form.

Embedding a CSV source in your document

Go to the edit view of your document.

Place the cursor at the position in the document where you would like the data to appear.
In the toolbox located on the right of the screen, scroll to the external source tool, select the name of the external source you would like to add from the dropdown list (Fig. 4.) There may only be one choice, depending on how may sources your site has uploaded.

Adding a CSV Source with Kupu

Fig. 4.  External source tool in Kupu.

Click the add external source button.
You are then given some more options. You can choose a table style from the drop down list. Also you can enter the batch size. The batch size enables you to split up a large file into a number of pages. If you want 10 items per page you would put 10 in the batch size form. (Fig. 5.)
Click the add external source button.
A yellow bar indicated the position of the data will appear at the point in the document where you placed the external source.

Setting external source options

Fig. 5.  Setting the external source options.

Updating the external source options

Click the asset in the edit area, select the new options on the toolbox area on the right and click update. (Fig.6.)

Updating the CSV Source

Fig. 6. Click update to add the csv source.

To verify and preview the data click the preview tab.

Submit the document for publishing.

CSV Source Updating

Changes to the data of the CSVSource are done by uploading a new set of data or editing the raw data via the edit screen. A re-publication of the document is not necessary.

The table layout is the standard table layout Silva uses for its tables. But there is, as always, the possibility to modify the page template which creates the html table.