![]() InDesign gives plenty of options to format the layout of the table.Īll table formatting options are accessible from the Table Options dialog box. If you want an even distribution of rows and columns, you can simply select the rows or columns and go to the Table menu and select either Distribute Rows Evenly or Distribute Columns Evenly or both. You can edit the contents of each cell just like how you would edit a regular text frame. We see that InDesign has created a table with the given data. You need to tell InDesign what it should consider as a row and column separator. Go to the Table menu and select the Convert Text to Table… option to open the Convert Text to Table dialog box. Select all the contents of the text frame by clicking the text and pressing Ctrl+A on Windows or Command+A on the Mac. In the following example, we will use a simple text file containing information about websites of some pharma companies and convert this into a table. Then, use the Place command to place your data into the text frame. Use the Text tool to create the text frame for your table. You can import a Word, Excel, Access (database) file, or even a text document and convert the contents into a table. Most of the time, it makes sense to convert an existing data into a table. To delete the table, simply drag over the table and press Delete on your keyboard. If you use the Selection tool, it will move the whole text frame instead of just the row or column. Remember that to drag the rows or columns, you need the Type tool selected on the toolbar as the table is considered to be a text frame. Use Shift and drag outside of the table to adjust the entire table proportionally. Moving the cursor over any of the rows or columns will allow you to resize the row or column. ![]() You can now enter data within this table. Clicking OK will create the table within your text frame. Here, you can specify the number of rows and columns that you want in your table and also specify if you need headers and footers for the table. Then go to the Tables menu and select Create Table… to open the Create Table dialog box. To create a new table, simply select the Text tool and draw an area that you want to create as a table. Note that the table created will be an anchored object for the text frame. You can create a table from scratch within a text frame or convert an existing data into a table. While( t=a.pop() ) for( t=t.cells, i=t.InDesign provides several ways of working with tables. everyItem().getElements() Ī = ().tables.everyItem().getElements() contents returns an Array of strings.Īll you have to do is to convert the plural specifier into an actual array of tables at the very beginning: Hence the weird fact that tablelist.cells. Then tablelist.cells represents the set of every i-indexed cell in the first table of all stories. For example, tablelist represents in a single expression the first table of all stories. When you read tablelist for some value of t, what you actually get is a plural specifier that points out to every t-indexed table in every story. The reference ().tables is not an array of Table instances, this is an unresolved collection based on multiple stories. Var tablelist = ().tables Īlert("Edditing "+tablelist.length+" tables in document") ![]() Here is the code: Thank you for your help! Instead, it reads '1,2' and then '3,3' etc. It somewhat works (it finds the values in the correct column and it does iterate through the table properly) but instead of only pulling a single cell's value, it pulls multiple values.įor example, if I have two tables and the values to read through in the first table are and are in the second table, I would expect my code to go through the first table and then go through the second table. But now, I don't want to select and run the code for each table manually so I thought I would add a bit extra to simply run the code for every table in the document. I do not want to manually change each cell color so I wrote a basic script that takes a selected table, looks at the values in one column, and tints the cells in each row accordingly. These tables are used as graphical aids by coloring in certain cells - rather than the normal use of displaying values. ![]() I have a document containing a lot (maybe 100?) similar tables.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |