You can add tables to a document from a Microsoft Excel spreadsheet with Typefi Writer 8.3 or later. Some of the advantages of using Microsoft Excel instead of Microsoft Word for working with tables are Excel's support for cell styles that make sure that cells have consistent formatting, and using formulas to perform calculations or other actions on the data in your table.
Insert an Excel worksheet
To insert a Microsoft Excel spreadsheet, do the following:
- Select "Excel spreadsheet" from the Table tool on the Typefi Writer ribbon to open the Insert Excel Spreadsheet dialog.
- Click "Browse" and double-click a Microsoft Excel spreadsheet.
- Use the controls to make adjustments:
- Sheet: Select from the available worksheets within the Excel spreadsheet
- Table style: Change the overall appearance of the table
- Cell range: Select from available named cell ranges within the Excel spreadsheet (for more information, see Excel Support → Create a named range in Excel)
- Formatting: Preserve cell styles and local formatting from Excel, or adjust the relative width of the table
Note: Cell range support requires Writer 8.4 or later; Writer 8.3 instead required manually setting the body row and column extents.
Note: Writer embeds only the text and not the graphic representation of an Excel worksheet (that is, no charts or graphs).
Modify an Excel worksheet
When you insert an Excel spreadsheet, a copy of the entire spreadsheet is embedded into the Microsoft Word document. Once embedded, the spreadsheet is no longer linked to the source file and won't reflect any changes made.
To make changes to an embedded spreadsheet, do the following:
- Double-click the Excel table.
- Make your changes and then save them.
Note: Hidden rows and columns, formulas and conditional formatting rules are preserved in the embedded spreadsheet but are omitted when converting from Word/Excel to Content XML.
To make changes to the number of header and footer rows, preferred width or other formatting options, do the following:
- Double-click the Typefi Table tag.
- Make your changes and then click OK.
Excel data can be quickly formatted using cell styles to add borders, fill the cells with color, or change the number format, which allows you to change the appearance of a number without changing the number itself. In Writer 8.3 or later, you can customize which formatting is preserved when publishing your data.
To control the overall width of the table, relative to the column that contains it, set your "Preferred width". For example, setting a value of 100% will emit
<tps:table width="100%"> .
To preserve the appearance of Excel cell styles, enable "Preserve cell styles". For example, an Excel cell style of "Normal" will emit
<tps:entry type="Normal">. For more information on cell styles, see Excel Support → Change the format of a cell.
Note: If the applied Excel cell style doesn't exist in your InDesign template, Typefi will automatically create and apply the missing style.
To keep any manual formatting you may have applied to specific data in your Excel spreadsheet, enable "Preserve local overrides". Horizontal and vertical alignment, and text orientation (rotation) will emit as attributes of the
<tps:entry> element. For example,
<tps:entry align="right" valign="top" rotate="270">. Other manual formats such as cell borders (style, color, side) or fill, and horizontal indent will emit in a CSS-style string within a custom character style "cell-format". For example:
; indent: 1;</tps:c>.
Note: Many Excel cell format options have direct equivalents within Adobe InDesign, but there are some differences. See the following table:
|Microsoft Excel||Adobe InDesign||Notes|
|horizontal alignment||general*||left||Text strings and cells with an "accounting" number format are left-aligned|
|right||Numeric values and all other number formats are right-aligned|
|center across selection||center|
|90*||270||While Excel rotates cell content counter-clockwise, Content XML and InDesign rotate text clockwise|
Tip: Because Microsoft Excel doesn't have paragraph styles, make sure you setup your InDesign cell styles to apply a paragraph style instead. For more information on InDesign table and cell styles, see InDesign User Guide → Tables → About table and cell styles.