Importing a long list with formatting into Scribus
(You will need OpenOffice to achieve this)
** This is a DRAFT - it will be tidied up when I test it to make sure its written correctly **
From time to time you may want to import a long list of data such as a catalogue, where the list of items will wrap over multiple text frames. Lists such as this will often require formatting - eg to highlight special offer items.
It is possible to achieve this in Scribus (tested in 1.3.x) - without having to do the formatting by hand. The steps in the process are relatively simple, although there are several steps to the process. (This seems to work more by accident rather than design!)
1. You need the list you want to import in some form of table - either from a database or a OO calc spreadsheet. If you are exporting from a SQL database the easiest way (especially if you do it often) would be to write some PHP to create a formatted HTML table. The detial of how to do that is beyond the scope of this article.
2. Do any of the formatting, text work now on the table. In other words if your list looks like this:
|Prod001||Product1:||This is the best product you can buy||£100||Yes|
|Prod002||Product2:||This is a cheap copy of Prod 1||£75|
|Prod003||Product2:||Multipack of 5 of Product 2.||£350|
|Prod004||Product2:||Buy Two Multipack Product 2s get £100 off||£600||Yes|
|Prod005||Product3:||Another Product Description||£100|
|Prod006||Product3:||Buy 2 get 1 Free||£200||Yes|
You might want to use some conditional formatting in Open Office to create something that looks like this:
Clearly these lists are short enough to import as a normal table (via SVG etc) but imagine they run to several pages!
3. In OpenOffice.Calc save the file as an HTML file
4. Now Close OpenOffice COMPLETELY - I have no idea why but until you close OpenOffice Completely it seems to know that the file is a Calc file and re-opens it in calc?
5. Re-open the HTML file. Select the table and choose... [remove table]
6. Resave the HTML
7. Now import the HTML into a Scribus Text Frame
8. Edit the style for the imported paragraph to set the tabs in the correct place