Archive for May, 2007

Working with Tables

Friday, May 25th, 2007

Adobe has been improving your ability to create table designs and working with table data in several applications for some time. In Acrobat 8 we have some nice features for copying and exporting table data to spreadsheets. With the new form features in Acrobat 8 we can easily export form data to spreadsheets.

Now with the recent release of Adobe InDesign CS3 we have much more control over tables at the design stage. As a matter of fact, I’d rank the new table styles in InDesign CS3 as one of InDesign’s best new features.

For you table designers, let me outline a workflow for creating and editing tables to illustrate how Adobe has improved working with tables at the design level and swapping table data between applications.

Using Microsoft Excel

I’ll start my table creation in MS Excel —nothing new here for creating a simple spreadsheet with columns and rows. In Excel I don’t add any special formatting or design styles. I just create a table by adding data to two columns and seven rows and save the file in native xls format from Excel.

Formatting a Table in InDesign

After saving the Excel spreadsheet as an xls file, I open InDesign CS3. Import the Excel data like you would import any graphic or type by using the File > Place menu command. When the data are placed in InDesign, the text comes in unformatted. Using InDesign’s Table > Convert Text to Table menu command a simple click converts the text to a table. Figure 1 shows the raw text placed in InDesign on the pasteboard on the left and the text converted to a table on the document page.

fig01.jpg

Figure 1

If you format a table for a single instance, then InDesign’s new features won’t be necessary. However, if you plan on using a table design several times in a layout or in different layouts, then the new Table and Cell Style sheets will be most welcomed.

I’ll start my table setup by first adding Character and Paragraph Styles for formatting table cells. All I need is a single instance for a cell in a column and row and then I can apply the styles to type requiring the same style in additional columns and rows.

In Figure 2 I have a nested style in the first column and another paragraph style in the second column. Nested Styles were introduced in InDesign CS2. This nested style includes the text formatting for the first line of text and a different point size for the type in the second line. Adding a soft return to the paragraph enables me to create a nested style using the character attributes in the first and second lines. In column two I format the text for type style and justification and capture the formatting in a second paragraph style.

fig02.jpg

I finish off my table design by adding some alternating fills for the rows and formatting the first row as a header row and define the fill and text color for the header in another Paragraph Style.

Creating a Table Style

After adding all the Paragraph Styles you need for your table, the next step is to create a Table Style. You may be first inclined to use InDesign’s Cell Styles panel, but hold off on this until you add a new Table Style.

I select my table and open the Table Styles panel in InDesign. Click the Create new style icon in the panel and the New Table Style dialog box opens as you see in Figure 3. In this dialog box I can add column and row strokes and fills, but it’s just as easy to handle these table design attributes before opening the New Table Style dialog box as I did before opening the dialog box.

fig03.jpg

Figure 3

Add a name for your new Table Style and click OK.

Creating Cell Styles

For a single instance for each unique cell in my table I create a Cell Style. Press Option/Alt and click the Create new style icon in the Cell Styles panel. Adding the modifier key opens the New Cell Style dialog box shown in Figure 4.

fig04.jpg

Figure 4

Notice at the bottom of the dialog box you have all your Paragraph Styles listed in the Paragraph Style pull-down menu. Choose the Paragraph Style respective to the cell you are adding to the style and click OK. Select all the cells requiring the same formatting and click the respect cell style to format the cells.

Another nice new feature in InDesign is the folder options you now have available for organizing style sheets. In Figure 5 you see the cell styles nested in a folder in the Cell Styles panel. Just click the Create a New Style Group icon to create a new folder and drag and drop your style names in the folder to organize them.

fig05.jpg

Figure 5

Applying Cell Styles to a Table Style

At this point I return to my Table Style and open a context menu on the Table Style name in the Table Styles panel. From the menu options I choose Edit “table style name” to open the Table Style Options dialog box. This dialog is identical to the New Table Style dialog box I opened when I first created my Table Style.

At the bottom of the Table Style Options dialog box you find the Cell Styles options for the Table Style as shown in Figure 6. Open the pull-down menus and choose the Cell Styles for the rows and columns you want to define with the respective Cell Styles. Click OK and your new Table Style is ready to use.

fig06.jpg

Figure 6

Importing Styles

If you create additional layouts and want to use the same Table Style in a new layout, open the Table Styles fly-out menu and choose Load Table and Cell Styles. The Open a File dialog box opens where you can navigate and select the InDesign file having the Table Style you want to use. Select the file and click Open and the Load Styles dialog box opens as shown in Figure 7.

fig07.jpg

Figure 7

Notice that all the Table and Cell Styles along with the Character and Paragraph Styles are loaded when you select all the styles to load. At this point you can import another Excel Spreadsheet, convert it to a table and apply the Table Style to reproduce an identical table design in your new document.

Converting to PDF

Export the InDesign file using the File > Export command and choose PDF as the file format. The layout is converted to PDF and when View PDF after Exporting is toggled on, the file opens in Acrobat as shown in Figure 8.

fig08.jpg

Figure 8

Round trip table editing

If you import an Excel spreadsheet in InDesign, the table is dynamic and maintains a link to the original Excel spreadsheet. Open the Links panel and double click the Excel import and the file opens in Excel. Make any changes to the data and save the file and the InDesign document is dynamically updated. All your style sheets remain intact and the Excel changes are formatted according to the Cell Styles you created in InDesign.

Getting table data out of Acrobat and back to a spreadsheet is a simple task in Acrobat 8. Use the Select tool to select a table and from the popup menu you have several choices for extracting table data. As shown in Figure 9 you can copy a table, save a table, or open the table directly in MS Excel by choosing Open Table in Spreadsheet.

fig09.jpg

Figure 9

Unfortunately, we still have one missing link in regard to editing tables. You cannot export a table back to InDesign from Acrobat, edit the table data and dynamically update the table in the PDF. You still need to export from InDesign a new PDF document with revised table data. If working on a multi-page document you would then use the Document > Replace Pages menu command to replace the old table with the new one.Perhaps InDesign CS4 and Acrobat 9 will offer us a bit more. For now, the new table formatting options you have in InDesign CS3 can save you much time when replicating tables with identical design appearances.

ted