ASK ANDY




DATABASES




Last month I looked at how custom databases could be created to help organise and format the text for certain kinds of 'desk top published' documents. Using the 'tags' formats available in programs such as Adobe PageMaker and QuarkXPress, documents such as directories, schedules, tables, and datasheets could all be started in a database, and the correct 'tags' codes required to style the text added in the database too. Because the data is exported with text formatting included as tags, when imported into say XPress, any stylesheets and formatting are automatically included, reducing the need for manual formatting.

This month it's time to look at how to get already existing information into DTP packages such as PageMaker or XPress. When creating documents in DTP packages, often graphs or spreadsheets and database data have to be included, and getting these files into your DTP program can cause problems. These 'office' programs don't have the full graphics or pre-press features that you may need to prepare images for print, but DTP packages don't have full graph, charting or spreadsheet features as standard.

The problems arise when documents that are to be printed on a printing press, and required output from XPress, also need data from the 'office suite' programs. Often there is no direct way to import say an Excel file, or Word table into XPress. Other examples could include an Excel spreadsheet and graph, a Word document that includes a table, and all these need to be included in a XPress annual report.

There are many 'office' type programs available, but the principles mentioned here will apply to most, the workarounds are not too program specific, so if a your particular 'office' program is not mentioned here, a solution for a similar program could solve your problem too.

One of the most common problems is getting Word tables (or any word processor custom tables) into XPress. If you import a Word file that contains a table into XPress, the table will be ignored. The solution is to convert the table in Word into tab delimited text, where each entry or 'cell' in the table is separated by a tab, then import this text into XPress and format it further from there. In XPress you have several options to create the table format. You could use a single text box and tabbing, many linked text boxes, or a single multi column text box. Which you use depends on the nature of the table.

If the table is fairly simple, tabbing could be the quickest solution. Create a stylesheet with the type attributes you need, including custom tab stops to create the table alignment. When the text is imported the 'delimiting' tabs will automatically tab the cells into a table-like format.

If the table is more complex, multiple linked text boxes may be more appropriate. With this method, create your table by using a single text box for each cell of the table. If you need 5 columns by 10 rows, create a grid of 5 by 10 text boxes, then link each one together using the text box linking tool, so that the text flows left to right, top to bottom. When the text is first imported into this, it may appear jumbled, you need to replace each tab with the 'next text box' command. Using the FIND/CHANGE menu search for all the tabs and replace them with \b This is the command to move the text into the next linked text box, so each table cell will occupy a single text box, and the text chain will then jump to the next box for the next cell.

A further option is to use multi-column text boxes, for a 12 column by 5 row table, create a text box with 12 columns, and use 5 lines from this to create the table format. The first 12 cells occupy the first line, enter a return or new line, and continue with the next row. Adjusting the overall size of the text box will in turn alter the width of each column, the gutter width can also be used to adjust the amount of horizontal space between columns.

All these methods can be combined to create very complex and versatile table formats, often better than those 'default tables' available in Word etc. Horizontal lines or rules can be set as part of a style sheet and applied automatically, without having to draw them in manually. Tints and colours can be applied directly to text boxes, and stylesheets, giving greater control over the appearance of the table.

A good trick is to apply a line or rule below a paragraph, but offset and as a increased width so that it covers the line of text that it is underlying itself. Then set the text is a different colour, and you automatically have a coloured line or box behind any text set in that style. As an example, setting white text with a black offset rule beneath, will give the impression of a black box or bar with white text on top, without having to manually draw in rules or boxes.

Tab fill characters are also useful for tables, as an example, if a period or full stop character is used, whenever the cell jumps to the next cell, the distance between is filled with periods, automatically creating a 'share price.........12.415' kind of format.

Again, the key with Word tables is to convert to tab delimited text, import this into XPress, and use the full array of text boxes, style attributes and formats to create the table required.

Spreadsheets often need to be imported into XPress, either in table or cell format, or as charts or graphs already created in the spreadsheet. Firstly, treat 'cell format' spreadsheet data in the same way as Word tables. Export as tab delimited text, and import into XPress, using the linked text boxes, or tabbing ideas mentioned earlier. The multi-column or linked text boxes are very useful for creating a spreadsheet like grid in XPress, into which the text can be flowed. The only point being the replace the delimiting tabs with the \b command to move each cell along into the next text box, or use \c to move into the next column.

Using tab delimited text can also open up other options, as in conjunction with the tags format discussed last month, you could edit the spreadsheet to include the required tags codes, to automatically format the text, or select stylesheets automatically.

Data from spreadsheets can also be in the form as charts or graphics, and often there is no way to save these as graphic files, ready to import into DTP programs. If that is the case, use the clipboard to copy the chart or graph from the spreadsheet, paste this into a drawing program, such as Freehand, CorelDraw, or Illustrator. From there, edit and tidy the image to suit, and then export as a EPS or other suitable vector graphic format. There are many points to note about this though, as moving images between packages via the clipboard can cause further problems, though it's nothing that cannot be fixed.

Once the image is pasted into the drawing program, it may need tidying and refining, before it can be place in XPress. Any colours used might be defined as RGB, however these would have to be changed to CMYK (process colours) or spot colours (Pantone etc.) to suit. If left as RGB, they would not colour separate properly from XPress, and not print properly on the printing press. Also the image is unlikely to be trapped, and would have to be trapped to requirements, either manually or automatically from the drawing program. Any gradient fills may be banded or coarse and could need replacing with the drawing programs own fills. Although the images would need tidying up and editing, it can be done, and you would be able to finally export them to XPress.

Other types of data from 'office' packages can be treat in a similar way, such as PowerPoint 'slides' that may need to be included. Again, the clipboard idea would work with this, or you can save the slides as Windows-Meta-Files (WMF) which can be imported into a drawing program, therefore missing out the clipboard 'copy and paste' section.

When faced with a chart, graph or any graphics from a program, first check whether the program can export them as a workable graphic format, which you could edit further in a drawing program. If it can, this would be the preferred way, if not, use the clipboard idea.

If you use charts and graphs on a regular basis, the time spend copying, pasting and editing them could add up, and a purpose built graphing package could be invaluable. Packages, such as CorelChart, Deltagraph Pro (http://secure.deltapoint.com/) can import spreadsheet or database data, present this in a variety of charts, graphs or tables, and can then export these as graphic images that can be imported directly into XPress. These can also offer far more charting features and options than are available in regular spreadsheets. If you use graphs on a regular basis, this kind of package could save you hours in editing and exporting.

Using combinations of the above, it's possible to use the graphics from virtually all of the office type programs, regardless of how appropriate those graphics may be. It might be that a more suitable chart or graph could be created directly in your drawing program, but it might also be that someone decides that you must use a Excel graph - now you have the choice.

If you have any DTP related questions, please fee free to email me at the address below, and until next month, happy DTP'ing.
Andy.

Contact: Andrew.Davidson@onyx.octacon.co.uk




Home Andy's Columns


Webmaster: aanestad@wco.com
Copyright © 1995-1998, SVCG. All rights reserved.

URL: http://www.vom.com/svcg/index.htm