Home | Tips | Library | Other Authors | Other WP Sites | Writer's Links | Contact | Site Map | Donate

Barry MacDonnell's
Toolbox for WordPerfect

Macros, tips, and templates for Corel® WordPerfect® for Windows®
© Copyright 1996-2024 by Barry MacDonnell. All Rights Reserved.

Page updated May 6, 2024

WordPerfect Tips
Main tips page | Browse more tips

Using WordPerfect tables

Table example



Related table resources -

► Some references and tutorials on using tables

•  In WordPerfect X5 and later versions, the new Reference Center has a PDF User Guide with an extensive section on using Tables. To view it click on Help, Reference Center, WordPerfect section, User Guide. [You can also search in WordPerfect's Help Index (F1) for "tables".]

• 
Creating Formulas in a Table (Corel Tutorial)

•  Creating Forms with Tables (Corel Tutorial)

•  Ten frequently asked questions about table formatting in WordPerfect (Corel Tutorial)

•  Answers to 9 Frequently-Asked Table Math Questions (Corel Tutorial)

•  Search the Corel support site's Knowledge Base for "Table" ... but be aware that some search results apply to the Table of Authorities or Table of Contents features, which are not the same thing as the Table feature

► Some macros on this site that use or process tables

•  Brackets - A macro that creates an "outdented" table — i.e., a table that extends slightly outside page margins — with a large, full-height left and/or right border that simulates a large square bracket ("[" and/or "]"); the result can also be "indented"

•  Calendars - Macros to create monthly or annual calendars using tables

•  Colsrchr - Macros that find text or symbols in just the current column of a table (and optionally color the rows)

•  CustomTbl - Creates a custom table at the cursor position with your preferred default settings for the number of columns and rows, as well as the table's horizontal position, cell margins, cell widths, and cell format (numbers, currency, text, etc.)

•  DeleteRC - Deletes empty rows and/or columns in the current table

•  QwikFill - A macro that adds incrementing numbers (1..n) in the current table column from the current cell to the bottom of the column, in a manner similar to WordPerfect's QuickFill feature — but easier and with more options

•  QwikFill Dates - A a macro that automatically fills a series of table cells — even dozens or hundreds of them — in the current table column with your chosen dates (in plain text), each date incremented by a chosen interval (e.g., every "n" days/weeks/months/years).

•  RowLines - Adds underlines and/or fills (shading) to every Nth row in a table for added readability or improved appearance






WordPerfect tables offer more than the ability to organize information in columns and rows: They can do many types of calculations, sort items, format the relative positions of several images and blocks of text, etc.

Below are some "How To" tips and links to other pages on this site.

This page is not a comprehensive list, but a "work in progress." Additional tips are welcome.

C O N T E NT S

=
Current page (below)  = Linked page (on this site)

[See the ◄ left column for more table resources and other information.]


  General tips


  Shortcut keys for WordPerfect tables [More...]

  Setting tabs inside table cells (and navigating to those tabs) [More...]

  Numbering rows inside a table [More...]

  Line numbering in adjacent page margins to include or exclude table rows with blank cells in the first table column [More...]

  Wrapping document text around a table [More...]

☼  Problem: Table cell content not expanding to fill the cell [More...]


  Problem: Multi-page table not filling up pages (too much white space on some pages) [More...]

☼ 
Problem: Full-page table causing an extra blank page to be added [More...]

  How to add a page number in the header row (or other cell) [More...]

  Creating a table that has a "Continued" label in the header row on the second and subsequent pages of the table [More...]

  Sorting WordPerfect tables [More...]

  Locking and unlocking table cells [More...]

  Table gridlines, guidelines, borders, and cell lines - What they do and how they work - Why you might not see lines around cells on your screen or see "reverse text" (white text on a dark cell background), etc. [linked page]

  Splitting table cells in a row so the resulting cells are equal in width [linked page]

  Making cells bold, italic, etc. (and removing these attributes) [More...]

  Adding a foreground or background color to table cells - Why you need to set a "fill" first [More...]

  Remove all background fills from a table (or multiple tables) with a macro [More...]

  Duplicating a table cell's contents automatically [More...]

  Duplicating the entire current table [More...]

☼  Splitting, deleting, and joining tables [More...]

  Formatting the entire current table [More...]

  Renaming tables in a document (two methods) [More...]

☼  Using footnotes and endnotes in tables [More...]

☼  Use a small macro to
change ALL cell formats in a given table to Text or other table format type (e.g., General, Fixed, etc.) and optionally remove all borders and cell lines [linked page]


  Tables as a formating and organizational tool


☼  Two general tips: [1] Right-click in a table (or on a selection of cells) and explore the various features in the context menu that appears; and/or [2] use Help (F1 key) and click on the Index tab to search for "tables, working with"; then use the Display button to show the list of various related subtopics under that main topic.

☼  Table gridlines, guidelines, and borders/backgrounds - Interactions and tips [linked page]

 
Format body text in a document or envelope with a table to keep items lined up horizontally and/or vertically - some built-in table tools and examples [More...]

  Fill in forms using borderless tables [linked page]

  Sorting regular paragraphs in reverse order using a temprorary table [More...]

  "Bracketing" text outside the left margin with a large "[" bracket symbol [More...]

  How to use a table to format vertical text so that it can be placed anywhere in the document [More...]

  How to rotate cell contents to create "tear off" strips at the page bottom [More...] 

  Creating table cells with variable ("draggable") widths in any given row by using several stacked one-row tables [linked page]

  Create vertical (rotated) labels or cards with tables [linked page]

  Rotate table cell contents either 90, 180, or 270 degrees (or "skew" the contents) [linked page]


  Table "math," merging, data conversion, and automation


☼  For a general reference see WordPerfect's Help (F1 key) Index (tab) under the "tables" entry and click on the sub-entries for "formulas," "functions," "operators," etc.
    Also see the sub-entry "functions, notes on" which takes you to a more comprehensive section, Reference: WordPerfect table functions (with examples).
    Note that WordPerfect tables often use a slightly different syntax compared to QuattroPro spreadsheets (e.g., using "+" instead of "@" to indicate a function) even though many operations and functions are otherwise similar or identical in both programs.

☼  Using text in table cells that were formatted as Numeric [More...]

  Automatically add incrementing numbers or dates to a table column or row [More...]


 
Convert spreadsheet data into a WordPerfect table [More...]

  Convert text into a table -and- convert a table to text or to a merge data file [linked page]

  Decimal alignment of numbers in a table column [More...]

  Finding the current table's name and/or cell address (three methods) [More...]

  Force a table cell that could possibly evaluate to zero to display as blank (i.e., not show a "0") [More...]

  How to randomize a list of items (or even a block of sentences or paragraphs) using a table as a tool [More...]

☼  Selecting all contents of a table cell (both text and codes) [More...]

☼  Detecting an empty table cell (macro snippets) [More...]

☼  Automatically calculate an hourly time sheet [More...]

  Merge tips for tables [linked page]:
▸ Converting existing mailing labels into a table [More...]
▸ Converting tables to merge data files or plain text [More...]
Converting merge data files (.dat) to WordPerfect tables or "comma delimited" (a.k.a. comma-separated-values, or .csv) files [More...]
Automatically number table rows (or items) when you merge into a table [More...]

* * *

Expanded content ...
(NOT always in same order
as Page Contents)


Shortcut keys for WordPerfect tables

[Back to Page Contents]

WordPerfect's Table menu (and some other) default shortcut keys when using a WordPerfect for Windows (WPWin) keyboard or a DOS (WPDOS 6.1) keyboard.

Note: Some Table menu shortcut keys will not be available unless a table is first created.

To ...
Press (on WPWIN keyboard) ...
Press (on DOS keyboard) ...
Create a table or floating cell (Create)
F12
Alt + F7
Format a table (Format)
Ctrl + F12
[available]
Add borders or fill to a table (Borders/fill)
Shift + F12
[available]
Fill a table with incrementing numbers or dates (QuickFill)
Ctrl + Shift + F12

[available]
Add values in a table (QuickSum)
Ctrl + =
Ctrl + =
Move up one table cell
Alt + Up arrow
Alt + Up arrow
Move down one table cell
Alt + Down arrow
Alt + Down arrow
Move right one table cell
Alt + Right arrow
(or Tab)
Alt + Right arrow
(or Tab)
Move left one table cell

Alt + Left arrow
(or Shift + Tab)
Alt + Left arrow
(or Shift + Tab)
Decrease column width
Ctrl + ,
Ctrl + ,
Increase column width
Ctrl + .
Ctrl + .
Insert one tab space (or
indent) in a cell
Ctrl + Tab
(or Indent with F7)
Ctrl + Tab
(or Indent with F4)
Select cell contents (as well as the internal cell format; for just cell text plus any format codes, use the main menu's Edit, Select, Paragraph)
Shift + F8
Alt + Shift + F4
Delete table row
Alt + Delete
Alt + Delete
Add a new row to bottom of table (assumes “Insert new rows automatically” is enabled in Table> Format> Table tab)
[For more about using the Tab key while in a table: see "Setting tabs inside table cells..." below.]
Tab
Tab

Tips:

•  See more shortcut keys:  For this and many other WordPerfect shortcut keys you can download a PDF file: WP_shortcut_keys.pdf - A list of major (and some minor) WordPerfect for Windows shortcut keys for the Windows and DOS keyboard definitions (keystroke assignments) you can use to navigate a document, format items, select text, etc.

•  Print a list of them:  In recent program versions you can print a list of your current shortcut key assignments with Tools, Settings, Customize, Keyboards (tab), <select your keyboard>, Edit, Print Report.

•  Create more of them:  To assign a keyboard shortcut to an available key or key combination see here.


Format body text in a document or envelope with a table to keep items lined up horizontally and/or vertically - some built-in table tools and examples
[Back to Page Contents]
Tools

Table tools can be found in several locations — on the
▸ program's main menu (under the "Table" menu chocie)
context menu (when you right-click inside a table)
table tools dialog (pops up with the Table Tools choice on the context menu)
Table property bar (located below the program's main toolbar)
 
The Table property bar is a special toolbar that appears whenever your cursor is inside a table without selecting any cells.*

It has some of the same features (buttons) as the main menu and (right-click) context menu choices — as well as some useful ones to format the table that you might want to explore and experiment with, such as:

▸ QuickJoin
▸ QuickSplit Row
▸ QuickSplit Column
...and related to these on the main menu's "Table > Split":
▸ QuickSplit Row/Column**

These are "toggle" (On/Off) features which can be employed in several ways, depending on your work style. For example:

•  Choose the feature first, then click-drag your mouse cursor between adjacent cells to quickly join (or split) them. For example you can split just a few adjacent vertical cells in a column into two columns rather than all cells in that column. (You can do the same thing to split adjacent cells into multiple rows.)

  ...or...

•  Select some adjacent cells first, then choose the feature to split the selected cells into additional columns or rows inside those cells.

  ...or...

•  Place the cursor inside a (non-selected) cell, then bring up the context menu with a right-click and choose Split Cell on that menu to pop up a small dialog to let you divide just that cell into two or more columns or rows.

Tip: After the feature is turned Off, the new column/row borders can then be click-dragged to adjust them.

----------
* There are actually three (named) "table property bars" (at least in recent WordPerfect versions):
- Table (appears when no cell structures are selected)
- Table Cell Selected (appears when a cell's structure is selected)
- Table Everything Selected (appears when the entire table's structure is selected)
The latter two have some different features (buttons) compared to the Table property bar.
[For general information on toolbars and property bars see here.]
** The QuickSplit Row/Colum feature (or any of the other Quick... features) can be added to the same Table property bar alongside the three other Quick... buttons using the Property Bar Editor (see the "How to customize property bars" page here).

Examples

•  Create a custom return address with a logo and text on your envelopes. See here for more.

•  A one-column, one-row table can put a border around a block of text (like a text box), and if you edit the table and choose Format, Row, "Divide row across pages," the material will "flow" across page boundaries if you add or delete material above the table.

Note: "Divide row across pages" is disabled by default.

Because of this, sometimes long tables cause excessive amounts of white space on a page when the program does not cause a cell's contents to flow continuously. Remedy: Enable the option.

•  You can easily set the dimensions or position (from the left edge) of a table, add "fills," remove borders, etc. You can use the Table menu or just right-click in a cell to get a context menu.


Setting tabs inside table cells (and navigating to those tabs)

[Back to Page Contents]

[1] First, place your cursor just above the table.
If you open the Reveal Codes window you can simply place the cursor to the left of the [Tbl Def] code.

[2] Clear all current tab stops at that point in the document (you can restore them following the table, in step 4). This will ensure the table does not carry existing tab settings into it.

Click on Format, Line, Tab Set. This brings up the Tab Set dialog.

Optional
but recommended: Enable the radio button, "Tab position from left edge of paper (absolute)".

Click Clear All, then Close.

[3] Edit the table (click in it) to set new tab stops where desired in one or more cells.

(Tips: Be sure to see the Important tip below. It also helps to open the Reveal Codes window to see the effects of your work.)

Here's how to do it.

Left-click just underneath the horizontal ruler line -- i.e., under the ruler just above the WordPerfect edit area -- to set a Left tab stop at the mouse cursor location.

Once the new tab stops are set you can move the cursor -- and any following text -- to a desired tab stop in any celll that has the new tab settings with Ctrl+Tab or Ctrl+Shift+Tab. (Note: Just pressing the Tab key alone anywhere inside a table takes you to the next cell, which is why Ctrl+Tab is needed here.)

Tips:

-
These Ctrl-key combinations insert either a [Left Tab] or a [Hd Back Tab] format code in the cell, as needed. Any following text in that cell will start at the new tab stop position.

- As with most other format codes, you can always delete them in Reveal Codes.


- By default, the <WPWin Keyboard> definition assigns the F7 key (same as Format, Paragraph, Indent) to insert a [Hd Lft Ind] code. This will indent (wrap) the following text in the cell at the next tab stop in that cell.

Notes:

- A lengthy string of indented text will wrap at the cell border if the table row's format was set to expand the row to fit the extra text. Otherwise, some of the text might become hidden text.

- If the F7 key fails to provide an indent, check to see that there's a tab stop in that table cell for a start location for the indented text. This can be an easily overlooked requirement.
   Also, verify that the F7 key is still assigned to to the "Indent" feature in that keyboard definition: it might have been deleted or changed and, if so, it can be reassigned to an available keyboard shortcut.


Important:


Always start from the top of the table and proceed setting your text at desired tab stops rightward and then downward in various cells. Otherwise, the program might become confused (e.g., if you go back up to an earlier row later to reset some tabs).

In other words, setting text to new tab stops inside table cells might be best left to your final draft of the document.


[4] Optional but suggested:

Immediately following the table (i.e., after the [Tbl Off] code) set your preferred tabs for the rest of the document text. (Here is a macro to do this for you.)

[Thanks to 'Robin' and 'bobhs' at WordPerfect Universe for the basic steps.]


Numbering rows inside a table
[Back to Page Contents]

Tips:


•  These methods might be best used in an empty column of the table — most often Column A.

•  If you need to add a new empty Column A to an existing table: With the cursor in the table's first column, click Table, Insert, Columns = 1, Before, OK. You should now have a table with a new, empty first column.

•  [You can also use a table to sort text. For example, see Sorting regular paragraphs in reverse order using a temporary table here.]

Methods:

  Method A: Use QuickFill

Example: Type a "1" in the first (top left) cell, then a "2" in the next cell down, in column A. (Or start the numbers in any column or cell.)

Select
the entire column (tip: move the mouse cursor inside the column until it turns to an up arrow, then double-click your mouse).
Or you can click-drag drag the mouse to select the column (or just a chosen section of cells in that column).

Then right-click the selected column or cells. The selection will be populated with incrementing numbers.

  Method B: Use a table formula

Postion the cursor in the first (top) cell of the column you want numbered, then click on Table>Formula Toolbar.

Click on Functions, then select All, and scroll down to Row(). Clck on Row(), then Insert. The formula will appear to the right of the blue arrow in the formula field. Click on the blue checkmark and the function will put the row number in the cell.

Alternative: Just type (without quotes) "+Row()" into the formula field, then click the blue checkmark.

Click on Copy Formula. Select Down, and enter the number of rows into which to copy the function. (Tip: To copy it to all rows in the column, click and hold the small up arrow to the right of the field; it will increment numbers until it reaches the maximum.)

  Method C: Use a macro to populate all cells in the column

Example 1:

Here's a macro that can do the same thing as QuickFill, but can be played anytime — especially after inserting or deleting rows which sometimes can cause disruptions in numbering the rows.

Note that the table formula method will not suffer disruptions since +Row() always returns the current row number. Note also that the macro assumes you want to start numbering in cell A1; if not, delete the first PosTableBegin command.

[To copy this macro code into your WordPerfect program to create a working macro see this page.]

// Macro code begins

// Suggested macro name: QuickFill.wcm

// Purpose: Deletes any existing items in the first column,
// then adds incrementing numbers (1..n) in that column.

If(NOT ?InTable) Quit  Endif

Messagebox(vAns; "Caution";
"The first column's contents will be deleted
and replaced with incrementing numbers."; OKCancel!)
If(vAns=2) Quit Endif

PosTableBegin
SelectTableColumn
SelectDelete
Type("1")
PosCellDown
Type("2")
SelectTableColumn
TableDataFill
SelectOff
PosTableBegin

Return
// End of macro

Example 2:

A more robust version of the QuickFill macro above (named QWIKFILL) can be found in this site's Library here.

  Method D: Use automatic paragraph outline numbers in the column's cells (see here)


Line numbering in adjacent page margins to include or exclude table rows with blank cells in the first table column

[Back to Page Contents]

[From a thread on WordPerfect Universe here:]


Problem: Using Format, Line, Numbering in a document (to produce line numbers in the left page margin) can sometimes produce a problem with numbering table rows that have one or more blank cells in the first (left-hand) column of the table.

For example, if you disable "Count blank lines" in the Line Numbering dialog, then tables that contain data in the second or subsequent columns in a row but a blank cell in the first column will NOT be numbered. It's as if the program considers the entire row to be blank. A simple fix is to add a space character in the empty cells in the first column — but there's a better way [thanks to a tip by Larry Lewis]:

Solution:

(1) Place the cursor in the first cell of the table.
(2) Select the entire table with Edit, Select, Select Table.
(3) Use Format, Line, Numbering to turn line numbering "on" for all table rows by disabling (un-ticking) "Count blank lines". This adds a pair of separate [Ln Num] codes to just the "nested" table, over-riding the blank line option for the adjacent parts of the document. All the table's rows (even those with blank cells in the first column) should now be included in the line numbers in the page margin.

Tips:

Similarly, you can selectively toggle the ability to count (or not count) blank lines in any portion of a document that uses line numbering.

For example, if you disable line numbering to "Count blank lines" for the document (e.g., at the top of the document), then select a smaller portion of it and enable that Line Numbering option for the selection, the smaller portion will count blank lines in that selection.

And vice versa: You can enable "Count blank lines" for the document, then disable counting them in a smaller selection of the document.

Either way, the smaller "nested" section(s) of text can be quickly selected for treatment by left-clicking in the left page margin and dragging down with the mouse. Or use Shift+arrow (or Shift+PgDown) to make the selection.

One small issue with selecting tables: Rather than use the mouse, it is best to select the entire table (Edit, Select, Select Table) separately to change blank line numbering for just that table. This produces just a single on/off [Ln Num] code pair.

Wrapping document text around a table

[Back to Page Contents]

For a new table -

When you create a new table with Table, Create, Columns/Rows/Format there's a checkbox option on the Create Table dialog to "Drag to create a new table".

[Note that this checkbox option is "sticky" — its current On/Off state persists until you change it.]

If you use that option when drag-creating a new table in the main document, it will automatically create the new table inside a borderless graphic box. [See also the related tips below about table formatting]

Document text will automatically wrap around the boxed table on all sides.

If the box is selected (right-click on it and choose Select Box) it can be left-click-dragged to another position (including into the margin's printable area). Alternatively you can right-click on the box and choose Position to specify the new location. (See also steps [6] through [9] in the next section.)

Notes and tips:

¤  The table inside the box can be edited and formatted like any other table: Left-click on the table area (in the box) to put the cursor inside the table. Right-click to display the context menu with some table formatting options.

¤  See also related tips below.

¤  For more about this type of graphic style, see the program menu's Insert, Graphics/Pictures, Custom Box..., Style name: Table.

¤  See some general tips on inserting and using graphic images here.

For an existing table -

You can insert an existing table into a standard WordPerfect graphic box (particularly one designed to contain tables). Then you can wrap text around the box.

[1] In the Reveal Codes window, carefully select and copy (Ctrl+C) everything between (and including) the [Tbl Def] and [Tbl Off] codes to the Windows clipboard.

[2] Open a new, empty document and paste the table into it for temporary safe-keeping.

Note:

If the pasted table's left side does not align with the temporary document's left page margin do this:

-  Click anywhere in the table to put the cursor in the table, and then right-click on the table. Choose Format from the context menu. The Properties for Table Format dialog appears. Then:
-  Click on the Table tab and set the "Table position on page" to Left. This will ensure the table will be properly positioned inside the graphic box (in step [4] below).

Return to the original document and delete the original table (including the [Tbl Def] and [Tbl Off] codes). Reformat any document text, if needed.

[3] Create an empty graphics box on the page with Insert, Graphics, Custom Box, Table, OK. Then double-click on the empty box to edit it (or right-click it, then choose Content, Edit).

[4] Paste the entire table (Ctrl+V) from the clipboard into the Editor window that appears (if it doesn't paste, you can go to the temporary document, select the table, and copy it to the clipboard again (see step [1] above)).

[5] Exit back to the document's body text area with File, Close or by clicking the Close icon on the property bar.

[6] Select the box by right-clicking on it and choosing Select Box from the context menu.

[Tip: Eight square "drag handles" appear around the perimeter. When the mouse cursor changes to a two-headed arrow over one of them you can drag a border to enlarge or reduce the box's size. When the mouse cursor changes to a four-headed arrow over one of them you can drag the box into a new position on the page. [Or, when you right-click on the box you can use Position from the context menu to specify an exact location.]

[7] While still selected, right-click on the box area and choose Position, Attach.... This lets you "anchor" the box to a specific location on the Page. For some tables you probably will want to anchor it to Paragraph so it will move with that paragraph if you edit the document later above that location.

[8] Right-click the box again. From the context menu that appears you can choose to wrap the document's text text around the box in various ways (e.g., "Both sides"). You can also re-size the box, reposition it, add a border, add a caption (or edit an existing one), etc.  Experiment with the various options to get the effect you want.

[Tip: If you are not currently editing a box, you can also double-click on the [Box] code in Reveal Codes at any time to bring up the Edit Box dialog with various options.]

[9] Exit from the box by clicking elsewhere on the document page.

Related boxed-table tips -

•  You can adjust left/right spacing between the table and the box's side borders.

[1] Click in the boxed table area to put the cursor inside the table, and then right-click on the table. Choose Format from the context menu. The Properties for Table Format dialog appears.

[2] Click on the Table tab. This allows you to set the horizontal position and size of the table inside the box in a similar way you can do it when a table is in the normal text area of the document.

For example:

- Setting the "Table position on page" to Center will center the table horizontally inside the box, allowing you to adjust the empty space along the sides of the box by (e.g.) mouse-dragging the box's side drag handles.

- Setting the "Table position on page" to Full will expand the table horizontally to entirely fill the box's current horizontal area, the same as it would expand a table between the page margins in the document's text area. However, a fully expanded table will prevent adding extra spacing between the table and the box borders (hence, try using the Center position choice).

- Setting some (or all) individual column widths or row heights in the boxed table to larger amounts can cause the table to fail to fit the box area correctly. You might need to try different dimensions for these items and/or different box sizes to find the ones that meet your needs.


•  This "table in a box" technique is also useful if you need to rotate a box and its contents by right-clicking on it and choosing Content, Rotate.... This can be useful when mixing landscape pages with portrait pages, creating rotated, structured information in a margin area, and similar tasks.

•  See more tips on inserting, using graphic image styles here (and the section on that page about creating and retrieving your own box, border, line, and fill styles).


Table cell content not expanding to fill the cell

[Back to Page Contents]

There are reasons why cell content that is wider than the width of a cell does not expand downward to fill the cell. Further, this typically results in the excess material to become Hidden text (you'll see a [Hidden Txt] code in Reveal Codes) and thus be truncated on screen an in print.

This problem can be caused by table Row settings that restrict how much text shows in a cell or cells.

Possible solutions:

•  If you want the content to expand in any table cell, select the entire table first with Table, Select, Select Table. You can also select just those (contiguous) rows first that show the problem. Then right-click on the selection. Otherwise just right-click in the table row where the problem appears.

•  Choose Format... from the context menu.

•  In the Properties for Table Format dialog appears, click on the Row tab.

•  Enable both of these options:

"Lines of text per row:"

Multiple *

"Row Height:"

Automatic (...generally preferred for most situations)
or
Fixed (...but set it large enough to contain all cell content; otherwise the content will be truncated as noted above)
or
At Least (...this setting should not affect the display of excess cell content)

[Tip: For more on the Row tab option,
     "Row attributes:" Divide row across pages (disabled by default),
see the next section below.]

----------
* The program's default setting for the "Lines of text per row" for all table rows is "Single..." which can produce the Hidden text effect noted above.  In regular document text areas, such text can be displayed with View, Hidden Text. But inside any table row using the "Single..." setting the cell borders in the row will override that View option and prevent the Hidden text from becoming visible. Hence the above suggestion to set the row (or selection of rows) to "Multiple..." and not to set the row height to "Fixed" (unless it can contain all the cell contents in that row).

Arcane tips

If you want to keep your table's current row format, but just need to view any Hidden text in that row:

A one-line macro can be used to quickly turn on the "Multiple..." setting for the current table row (or for a selection of rows).
     TableRowNumberOfLines (RowLines: Multiple!)
A similar macro can quickly reset that row (or selection of rows to
Single...":
     TableRowNumberOfLines (RowLines: Single!)
[To copy such macro code into your WordPerfect program to create a working macro see here.]

Be aware that these macros will normally only affect the row the cursor is in — unless (after you change that row's setting) you then use that row as a model to insert one or more of new rows further in the table (with Table> Insert). In that case the inserted rows will have "inherited" the setting.


Multi-page table not filling up pages (too much white space on some pages)

[Back to Page Contents]

When long multi-page tables seem to produce blocks of empty space on some pages between table rows when the table contents should fill up the page vertically, the cause might be the default setting for table rows which contain large amounts of material.

Possible solution:

•  Right-click in the table row that appears to be "pushed" down to the following page.

•  Choose Format... from the context menu that appears.

•  In the Properties for Table Format dialog that appears, click on the Row tab and then enable (tick) the option "Divide row across pages". This should split the contents of cells in that row and cause the row to "join up" with the row above.

[From WordPerfect's Help:

"...The Divide row across pages option is not available if the row you selected contains cells that are joined vertically. The option is also ignored if you enabled the Single line only or Fixed row height options or if you are using headers in delay codes."]


Full-page table causing an extra blank page to be added

[Back to Page Contents]

Sometimes when the end of a table extends downward close to — but quite reaching — the bottom page margin, WordPerfect might add an entire extra blank page immediately following that table.

This appears to be by design, since there's still space on the page — but probably not enough for anything else. This situation tells the program to insert a new page to prepare for more content.

Possible solutions:

Method A

[1] Open Reveal Codes (View, Reveal Codes). In the last cell of the table (i.e., the last cell at the end of the last row) position the cursor after all text and/or format codes inside that cell — i.e., just before (to the left side of) the [Tbl Off...] code.

[2] Add a tiny font change at that location to Arial 1-point. Arial, and many other fonts, will accept such a small font size. In the property bar's Font Face field (or in Format, Font) choose "Arial" and in the Font Size field type a "1" (over-writing the font size displayed there) followed by pressing the Enter key to confirm the change.

The result should now look something like this when viewing the last table cell in Reveal Codes:
     "...last line of text.[Font Size: 1pt][Tbl Off]"

[3] If there is more material in the document, be sure to restore your desired document Font and/or Font Size immediately following the table (i.e., just after the [Tbl Off] code that ends the table).

If this doesn't work for you...

"In those cases where a 1 point font still doesn't solve the problem, try adjusting the bottom [page] margin (if you are not limited by printer minimums) or the bottom of the document by .01's.

Usually you can get by with such a slight adjustment that it's hardly noticed." [Quoted from Larry Lewis on WordPerfect Universe here.]

Advantage

Method A should not affect footers (if used) as a Method B's margin adjustment might do.

Method B

You can try setting the bottom page margin (Format, Margins) a small amount to accommodate the table without it also adding the extra page. (If you have more material in the document, you can restore the original bottom page margin on the next page.)

Disadvantage

Any footers on or following the page with that margin adjustment will move a bit as well, so you should view the document to see if the change is acceptable. As noted, you can restore the original bottom page margin on a following page.

Method C

Try right-clicking on the bottom row, choose Format..., Row (tab), and set the Row Height to a Fixed setting that removes the extra page. (Adjusting Row Margins in that dialog might also help.)

You can also select several adjacent table rows and set the Row Heights (and/or Row Margins) for all of them.


Force a table cell that could possibly evaluate to zero to display as blank (i.e., not show a "0")

[Back to Page Contents]

Example #1:


Assuming you are calculating figures in two columns (e.g., cell A1 multiplied by cell B1) and want the result to be shown in the third column (e.g., cell C1) only if it is not equal to zero.

▸ Here, all cells formatted in Table, Numeric Format as General.

Then, in Cell C1 (here, the result of A*B should be multiplied by .50):

    +IF((A1*B1)=0, "", (A1*B1)*.50)

Example #2:

Assuming there is text in one table cell (Table A, cell A1) and you want it to display (duplicated) in another table cell (even in a different table) such as Table B, cell C1 — but if there is nothing in table A's cell you want Table B's cell to be completely empty — i.e., without ?? or ERR symbols.

Here, the text cell is formatted in Table, Numeric Format as Text, while the calculation cell is formatted as General. (ISNA = IS Not Available = Empty)

Then, in cell TABLE B.C1 (the second table) you could enter this formula:

    +IF(ISNA(TABLE A.A1),"",TABLE A.A1)

Note the use of two double quotes with no space between them.

Of course, instead of the "" (empty or null) specification as in the previous example you could use something to alert you, such as "REFERENT CELL EMPTY!" or similar text. For example, in a table cell that determines the existence of an entry in TABLE A.A1 you could insert this:

    +IF(ISNA(TABLE A.A1),"EMPTY",TABLE A.A1)
or

    +IF(ISNA(TABLE A.A1),"EMPTY","NOT EMPTY")

The general logic of an IF statement: a True condition returns a 1, while False returns a 0. (Hence in actual use the first condition will be either 1 or zero.)

+IF (<if condition is TRUE>,<...do THIS>,<...otherwise do THAT>)


Sorting WordPerfect tables

[Back to Page Contents]

It is a good idea to save the document before performing any sort on it. Make sure to enable "Allow Undo" in the Tools, Sort, Options button drop list.

The individual items in a sort are considered to be "records." WordPerfect lets you sort five kinds of records:

•  lines (each ends with one hard return),
•  paragraphs (each ends with multiple hard returns),
•  merge records,
•  parallel columns (table column or parallel column), and
•  the rows in a table.

Each row of a table is often called a record * and it is divided into its parts: Column (cell), Line (text in a cell), and Word (text in a cell). Cells are numbered from left to right, starting with cell 1.

To define a custom Table sort:

Place your cursor in the table, click Tools, Sort, New. Give the sort a name (e.g., "My New Sort"), then with the Table Row radio button enabled, define the "Sort by" rule (or key), which defines the order in which the sort will be conducted. You can define additional rules with the Add Key button.

Normally, lowercase sorts before uppercase. To reverse this, click the Options button and choose "Uppercase sorts before lowercase."

To sort by the last word in a particular column's cells, define the column number to use and then use "-1" (without quotes) in the Word field, "-2" for the next to last word, etc.

More tips on sorting tables: See the Sorting page here.

Notes:

¤  WordPerfect format codes ([Tab], [Hd Left Ind], etc.) are treated as field separators by the sort feature.

Hence it might be a good idea to look over the table and see if all rows used in the sort have the same "format" (i.e., same number and location of Tabs, etc.) if you wish to use a particular field to sort on.

On the other hand, spaces, forward slashes (/) and hyphens separate words.

¤  Dates can be used as a Key Type (WordPerfect 10+), and each date in the table should be separated by slashes or hyphens; all characters are considered when sorting dates in numerical order.

Hence, use the same format for all dates (e.g., 10 characters: 09/25/2023).

Also: As noted, the slash or hyphen can be used to separate words, so parts of dates (e.g., the year) can be used as "words" to define a sort key for the dates you want to sort. See WordPerfect's Help <F1> or the Reference Center (on the Help menu) for more information.


----------
*  The exception to the definition of a row as a record
(above) is a "Header row": The first row in a table can be set (toggled) to become an automatic Header row with Table, Format, Row (tab), [x]"Header row (repeats on each page)".
    When toggled on, the table Header row simply displays its contents at the top of the page each time the table spans a page break, similar to the way a page Header works. Hence, they are not sorted along with other rows, so they still will be visible after the sort at the top of each table page.
    Setting a header row in bold or formatting its cells with a background color or borders can help make its function more apparent to readers.


Sorting regular paragraphs in reverse order using a temporary table

[Back to Page Contents]

If you are keeping a diary, journal or other document where you enter new lines (or paragraphs) at the end of the document, but you now want to reverse the order of the items so that (for example) the most recent are at the top, here's a good way to do it:

Use a temporary table to reverse-sort the paragraphs.

Note that using a table for this also helps prevent changes to existing formatting in the paragraphs (such as existing automatic numbering scheme applied to the paragraphs). The table cells act like little protective containers for each of your paragraphs during the sort.

Tips:

☼  If the paragraphs are separated by more than one hard return code (i.e., displayed as [HRt] in Reveal Codes) and you want to remove the extra ones first ... this can be done with Edit, Find and Replace to replace the multiple adjacent codes with a single code. (For more on this see the Find and Replace tips here.)

☼  Or you could use a macro such as DelExtraHR.wcm here. (Be aware that macro processes the entire body text area of the document. If the relevant material is embedded with other material that should not be processed, it might be helpful if you cut or copy the desired text into a new temporary document and remove the extra hard returns there; then copy the material back into the original document when you are done.)

☼  Removing extra hard returns is not required for the procedure below, and in fact might not always be desirable. You might actually want the extra space (which to the program in this case is an extra — if empty — paragraph). Work on a copy of your document and try it both ways, with the extra returns and without them.

Method:

(Recommendation: If you are new to sorting WordPerfect tables see the tips and notes in the short section above before proceeding.)

[1] Choose the paragraphs to sort.

•  Either select all paragraphs in the document (Edit, Select, All -or- Ctrl+A on the Windows keyboard)

•  or just use mouse or keyboard to select the specific sequential paragraphs you wish to sort.


[2] Create a temporary table structure.

•  Click on Table, Create, and set the Columns=1 and the Text Delimiters=Paragraphs.

•  Click OK.


Result: You should now have a table with all selected paragraphs inside separate table cells.

[3] Add a new table column to the temporary table.

•  Place the cursor in the table and click Table, Insert, Columns = 1, Before, OK.

Result:You should now have a two-column table with the first column being empty. (At this point don't worry about column widths since you will be removing this column later.)

[4] Set up the sort conditions in the new column,

•  Enter a "1" in the top cell of the first column and a "2" in the cell just below it in the same column.

•  Select just the entire first column (either "paint" all cells in that column, or place the cursor just under the top edge of the first cell in the column; when it changes to an up arrow you can double click there to select the entire column).

Note that the column must be selected first, before using WordPerfect's QuickFill feature (next bullet step).

[Tip: An alternative to the WordPerfect feature is to use the macro, QwikFill (...note the different spelling...) which can insert sequential numbers (and more) into a column that is not selected.]

•  Click Table, QuickFill. 

Result: This should sequentially number all cells in the first column.

•  Click inside the second column (or anywhere outside the table) to de-select the first column.

[5] Sort the table based on the first column.

•  Place the cursor in the table and click Tools, Sort to bring up the Sort dialog.

•  In the Sort dialog choose "First cell in a table row," then click New.

•  Give the new sort routine a name (e.g., "Reverse table sort"). 
The "Sort by" radio buttons should be set to "Table row."
Then, under "Keys," set the Type = Numeric and Sort Order = Descending.

•  Click OK.

•  With the new routine name ("Reverse table sort") selected in the Sort dialog, click Sort.

Result: The entire table should immediately sort into reverse order.

[6] Remove the temporary table structure to restore the selected paragraphs to ordinary document text.

•  Place the cursor in the first (numbered) column.

•  Click Table, Delete, Columns, 1, OK.

Result: You should now have a one-column table again. (The width of the column can be ignored here.)

•  With the cursor in the table, click Table, Convert.

•  Select the "Convert tables to text" button, and the "Separate text with paragraphs (hard returns)."

•  Click OK.

Result: The temporary table structure is removed and your original selected paragraphs should now be sorted into reverse order.


"Bracketing" text outside the left margin with a large "[" bracket

[Back to Page Contents]

Here's the effect. Note that the text lines up with the left margin, and the bracket is "outdented."

Here's how to do it
and create a QuickWord from it to make it easy to re-create anytime:

[1] Open a new blank document. Create a 1-row, 2-column table with Table, Create.

[2] Drag the middle vertical cell border to the left as far as it will go. This leaves a minimum-width left-hand column (you can resize this column to a specific dimension by right-clicking in the column, then choosing Format, Column). Typically, this is 0.67" wide. The right-hand column (the cell) will extend to the right margin.

[3] Right-click in the right-hand column and choose Borders/Fill, and then click the Cell tab. Remove ("X") all 4 borders from that cell. This should leave the first cell (i.e., the left-hand column) with a 3-sided border shaped like a left bracket ("[").

[4] Right-click in the right-hand column and set the top/bottom row margins with Format, Row (e.g., to 0.40" for each). Be sure to enable (check) "Divide row across pages" and click on the "Multiple lines" option. Set the inside left/right column margins to 0.0" with Format, Column; while there, align the contents in cells, if desired.

[5] Exit from the table. Place the cursor just before (i.e., just to the left of) the [Tbl On] code. Change the left margin to 0.933" with Format, Margins. (This assumes your default left margin is 1.0". If not, set the margin appropriately so that the left margin dimension plus the width of the table's left column equal your normal left margin setting.)

[6] Place the cursor just after the [Tbl Off] code and change the left margin back to 1.0" (or your preferred left margin setting).

The table should now be outdented beyond the left margin by the width of the first column.

To automate creating the table in future sessions — turn it into a QuickWord:
  • Before adding any text to the table do this:
  • In Reveal Codes, place the insertion cursor before (just to the left of) the [Tbl Def] code.
  • In Reveal Codes, select the six adjacent codes (first remove any stray hard returns between them). These are the codes to select:
    [Lft Mar][Tbl Def][Row][Cell][Tbl Off][Lft Mar]
  • With the codes selected, create a QuickWord with Tools, QuickWords. Perhaps give it the name of "\[" (without quote marks).
  • Back in your document, type (without quotes) "\[".
  • Result: A new table with the "[" border outdented by the same amount as the first (empty) cell in the table.
[7] Enter text in the second column of the table. The bracket will extend downward as you do this — including onto the following page if necessary.


Locking and unlocking table cells (the Tab key will let you skip over locked cells)

[Back to Page Contents]

To lock one or more cells:


Place your cursor in the cell (or select the range of cells) to be locked with your mouse, then right-click on the cell(s) and choose Format from the context menu that appears. This brings up the Properties for Table Format dialog. Under the Cell tab, enable (i.e., tick) the check box "Lock cell to prevent changes," then click Apply or OK.

Repeat this procedure to lock all cells that should be locked. (Remember, you can skip over locked cells with the Tab key.)

Note that locked cells will display a circle with a slash through it (the universal "no entry" symbol) when the cursor is over the locked cell. However, this should not prevent using active hyperlinks in that cell, even though the cursor is not the usual "pointing finger." Just be sure to place the cursor directly on the hyperlink.

To unlock one or more cells (even in a completely locked table):

Step 1. Select the cell(s). (To unlock a completely locked table you should select all cells.)

For individual cells: Place your cursor over the cell to be unlocked with your mouse, inside the top (or left) edge of the cell until the cursor changes to an arrow, then left-click once to select the cell.

For multiple cells:
Place your cursor over the first cell to be unlocked with your mouse, inside the top (or left) edge of the cell until the cursor changes to an arrow, then hold down the left mouse button and drag the mouse to select the remaining cells. Release the left mouse button.

The cell(s) should now be completely filled in black (i.e., reverse color), right up to the cell borders.

Step 2. Right-click on the selected item(s) and choose Format from the context menu that appears. This brings up the Properties for Table Format dialog.

Step 3. Unlock the cell(s).

To permanently unlock one or more cells:

Under the Cell tab in the Properties dialog, disable (i.e., un-tick) the check box, "Lock cell to prevent changes," then click OK.

Note that if you are permanently unlocking a cell at a time, repeat Steps 1-3 for all cells that should be unlocked. If you are permanently unlocking a range of selected cells, all cells in that range will be unlocked; go to Step 4.

To temporarily unlock all cells:

Under the Table tab in the Properties dialog, enable (i.e., tick) the check box, "Disable locks in cells," then click OK.

Note that this option is a toggle switch that lets you unlock and re-lock previously locked cells. You can re-lock all locked cells when you have finished editing the table by disabling (i.e., un-ticking) the check box. It is independent of the Cell tab option above, and therefore it does not permanently unlock any locked cells.

Step 4. Test the results of Steps 1-3. [Thanks to Larry Lewis for parts of this method.]


Making cells bold, italic, etc. (and removing these attributes)

[Back to Page Contents]

There are two general methods to apply text attributes
(called "appearance" in Format, Font) in a table. You can apply them to the 

•  text contents in the cells, or to the
•  cells themselves (i.e., to their internal properties).

Method A - Format cell text only

[1] You can select just the text inside a cell and apply bold, italic, etc., the same as you would do in normal body text: Double-click directly on the cell's text, or just carefully "paint" the text inside that cell using your mouse.

Caution: "Painting" multiple cells in one operation can inadvertently select the entire cells, not just their content, which might lead to undesirable results when adding or removing text attributes. See Method B for more on this issue.

[2] When the text is selected (it displays in reverse color) you can apply a text attribute with the [B], [I], etc., buttons on the property bar or with the shortcut keys, Ctrl+B, Ctrl+I, etc.

In Reveal Codes you should see the format codes for these text attributes (see image below).

To remove these attributes simply reverse this method or (in Reveal Codes) delete the relevant format codes in the cell with the Delete or Backspace key. (The codes can also be dragged from the cell to delete them.)

Example:

Table cell with text only selected


Tip:

Having a method to internally format cells in bold, italics, etc., can be useful when creating column or row titles or other specific cells so that editing the table doesn't accidentally remove such specific attributes from those cells; moreover, you won't need to keep applying the same attributes to certain cells. In this case use Method B below.


Method B - Format cell properties (a.k.a. "cell structure")

[1] You can also select the entire cell itself: Move the mouse cursor inside the cell next to its top (or left side) border until it turns to an up arrow or a left arrow, then left-click your mouse.

The cell background should turn completely black (see next image below), filling the cell up to all cell borders.

If desired, when the arrows appear you can left-click and drag the mouse to select multiple adjacent cells in one operation.

[2] When one or more cells is selected you can apply a text attribute with the [B], [I], etc., buttons on the property bar or with the shortcut keys, Ctrl+B, Ctrl+I, etc.

Text attribute codes are typically hidden using Method B.

Note: Even when using Method B, new [Und]erline, [Font], and [Font Size] codes
will still show up in a cell when viewed in Reveal Codes.

This often causes confusion when you try to remove such text attributes from Reveal Codes by deleting their format codes — but which are not visible! They are stored internally as part of the cell properties (i.e., cell structure).

To remove these attributes use Method B again to select the entire cell(s) -- not just cell contents as with Method A -- and apply the same attribute, which should toggle that attribute off. Repeat for any other attributes that might have been applied to the cells.

Example:

Entire table cell selected

Tips:

☼  If you have used both methods to apply the same text attribute in one or more cells:

You probably will see temporary ("placeholder") codes in the cell(s), such as [Ignore: Bold] wherever both the cell's text and the cell's properties were made bold. The cell's properties take precedence here, so the program will use placeholder codes for the attribute applied to the cell's text.

If you remove the attribute only from the cell Properties (i.e., using  Method B as discussed above) then the [Ignore] codes will change to their normal (active) counterparts.

To remove both types of formatting you probably will need to use both removal methods for that attribute in the cell(s).


☼  Alternative method of deleting text attributes in table cells:

See Charles Rossiter's free macro, TableAttributesRemove.wcm here, which can remove all internal table and cell attributes, cell fills, and justification from the table in one quick operation. It's a simple macro (see modifiable code in Footnote 2 below).

☼  Related tip: To remove table cell fills see "Remove all background fills...".




Using a borderless table to fill in a form

[Back to Page Contents]

See "Filling in forms using WordPerfect".



Creating a WordPerfect table that has a "Continued" label in the header row on the second and subsequent pages of the table

[Back to Page Contents]

First note that WordPerfect will use as a repeating header any row, or adjacent rows, which you designated as a header by right-clicking in the row(s) and choosing Format, Row(tab), Header row (repeats on each page) — wherever located in the table, as long as NO previous row(s) in the table were designated as a header.

In brief, you can have only one automatically repeating header starting at just one location in a table. Most often the first row in the table is used this way, and this is assumed in the Example.

But what if you want to use a modified header row starting on a subsequent page in the table?

Example

The following method creates repeating header rows on multiple pages in the table that (e.g.) contain the added word "Continued" — but starting at the top of the second page of the table. The header on the first page will appear the same as before; it's just no longer a repeating header.

[1] Select the original repeating header row(s) on the first page of the table (Edit, Select, Select Row).
The row(s) currently should be designated as header rows with "Header Row (repeats on each page)" in Table, Format, Row (tab).

Tip: If you use the cells in that row for column titles (a.k.a., labels) you might  first want to prepare a space for the added word (see step 4 below), perhaps by using the Enter key where appropriate.

[2]
Copy the selected row(s) to the Windows clipboard.

[3] For the original header row(s) on the first page de-select "Header Row (repeats on each page)" in Table, Format, Row (tab). The program will now allow you to designate a new header row.

[4] Paste (from the clipboard) the original header row(s) into the top row of the second page of the table.

[5] Type "Continued" (or other desired text) where appropriate in that new, repeating header row on the second page. You can format its font, size, color, etc. The text's horizontal position in the cell can be set with the property bar's Justification button — or with Format, Line on the program's menu.

Done. The pasted row(s) will now be the header for the second and subsequent pages
.

Note:
The "Header Row
(repeats on each page)" option should still be selected (enabled) in the new Header row(s) on the second page.

Tip: To add page numbering in a Header (or other) cell see the next tip below.


[Thanks to Maggie Holman at WordPerfect Universe for this tip.]


How to add a page number in the header row (or any other row's cell)

[Back to Page Contents]

If the header row is set to repeat on all pages (the option "Header row" in Table, Format, Row is enabled), then place the cursor in the row and use Format, Page, Insert Page Number. (The DOS keyboard has a shortcut: Ctrl+p.) The page number will be visible in the header row on subsequent pages.


Similarly, place the cursor in any cell of the table and use Format, Page, Insert Page Number.


Adding a foreground or background color to table cells - Why you need to set a "fill" first

[Back to Page Contents]

From Pascal Couture on OfficeCommunity (Jul 18, 2012):

"In WordPerfect, you create a table, select some of the cells and you select a color from the 'Table Cell Foreground Fill Color' icon on the Property Bar.  Nothing happens... the cell color doesn't change.

The reason why the cell color isn't affected in this case is that the 'foreground color' is only applied to cells that have a 'cell fill' selected.  I agree this is a little counter-intuitive.  Essentially, once a cell fill is selected, you can then select both a foreground and background color to apply to that gradient/pattern fill.

You can set a cell fill by using the 'Cell Fill' icon on the Property Bar (to the left of the foreground color icon), or from the 'Properties for Table Borders/Fill' dialog (accessible from the 'Borders/Fill' item in the 'Table' menu)."

About foreground and background colors in table cells (and also text boxes and graphic boxes):

These features can be a little confusing, so I did a little experimenting and posted the results on WordPerfect Universe. See Footnote 1 below for a duplicate of that post.
[Note: To remove all cell fills from tables see the "Remove all background fills..." section below.]


Remove all background fills from a table (or multiple tables) with a macro

[Back to Page Contents]

[Note: To remove text attributes in tables see the "Making cells bold, italic..." section.]

Here are some relatively simple macros to remove background fills from all cells in the current table or from all tables in the currently open document. Obviously, make document backups first.

This would also let you print the document without table fills, then restore the fills with Edit, Undo (or Ctrl+Z).

Tips:

To copy the code below into your WordPerfect program to create a working macro, see here.

To assign the macros to toolbar buttons, keyboard shortcuts, or a menu, see here.

Current table only in the open document:

// Macro code begins here
// Purpose: Remove FILLS from all cells in the CURRENT table

If(Not ?InTable)
Messagebox(;"Turn Table Fills OFF";
  "Error! Place the cursor in a table with cells with color fills FIRST!")
  Quit
Endif

TableSelectOn (SelectionMode: Table!)
SelectTable ()
TableCellFillStyle (FillPattern: NoFill!)
SelectOff ()

Display(On!)
Messagebox(;"Turn Table Fills OFF";
  "Done! You can Undo the effects of this macro with Ctrl+Z")
Return  // (exit from the macro)
// Macro code ends

All tables in the open document:

Tip: After playing the macro inspect the result to ensure the macro has processed all tables.

// Macro code begins here
// Purpose: Remove FILLS from all cells in ALL tables in the document

OnNotFound(End@)  // (when no more tables are found, exit macro)
PosDocVeryTop  // (start at the very top)
vCount:=0

While(True)  // (i.e., keep looping until no more tables are found)
  MatchPositionAfter
  SearchString(NToc(64393)) // (<- NToC(64393) = [Tbl Def] code)
  SearchNext(Extended!)
  // When a table is found:
  TableSelectOn (SelectionMode: Table!)
  SelectTable ()
  TableCellFillStyle (FillPattern: NoFill!)
  SelectOff ()
  vCount:=vCount+1
Endwhile  // (loop ends here)

Label(End@)  // (exit macro here:)
MatchSelection  // (restore default setting)
Display(On!)
Messagebox(;"Turn Table Fills OFF";
  "Done! "+vCount+ " tables were processed." +NToC(0F90Ah)+
  "You can Undo the effects of this macro with Ctrl+Z")
Return
// Macro code ends


Finding the current table's name and/or cell address (three methods)

[Back to Page Contents]

Notes:


¤  A table's internal name can be useful with table calculations or with macros that need to find specific cells.

¤  To learn about renaming a table to something other than the default name (TABLE A ... etc.), see WordPerfect's Help (F1) and search for "Naming tables". Then see the sections below ("Duplicating the entire current table" and "Renaming tables in a document").

¤  Note especially that copying and pasting tables in a document can produce tables with duplicate names. This can be problematic if you need to locate particular cells in different tables (e.g., with a macro). See the important notes in Duplicating the entire current table for some solutions and tips.


Method A. Use the Formula Toolbar.

•  Place the cursor in a table;
•  click Table, Formula Toolbar (an On/Off toggle option);
•  the table's name will appear in a field on that toolbar.

Method B. Use "Go To".

•  Place the cursor in a table;
•  click Edit, Go To; then choose Table in the "Go To" dialog;
•  view the current table's name in the "Select Table" field. [Note: You can use the down arrow list in that field to quickly navigate to any other table. This will not work if they have the same name as the current table; see the section below on renaming tables.]

Method C. Use a macro. Here are two examples.

•  Example 1. Play the macro below inside the current table.

This simple macro will display the table's name (it will also display the current cell's name and cell address). Click OK to dismiss the message.

Tip: To copy this code into your WordPerfect program to create a working macro, see here.

If(?TableInTable)
    x:=?CurrentTableName
    y:=?Cell
    Messagebox(;"Current Table and Cell Information";
        "Table name: "+ x +NToC(0F90Ah)+
        "Cell name: "+ y +NToC(0F90Ah)+
        "Cell address: "+ x +"."+ y)
Else
    Messagebox(;"Error";
        "You must have the cursor inside a table.")
Endif
Quit

•  Example 2. Play the macro below in the current document. S
tarting at the current cursor position (or at the very top of the document before all format codes) it will stop at each table in the document (in its first cell) and display the table's name. Click OK to search for the next table, or click Cancel to stop searching at that point.

Important: As noted above some tables in a given document might have the same name (e.g., TABLE A) if they were produced by copying a table and then pasting that table into various places in the document. See Renaming tables in a document below.

Tip: To copy this code into your WordPerfect program to create a working macro, see here.

// Macro code begins here
OnNotFound(TablesNF@)
vCount:=0  // (initialize a counter)
vName:=""
SelectOff
MatchPositionAfter
// First check if the cursor is already in a table; get table's name:
If(?TableInTable)
    vName:=?CurrentTableName
    vCount:=vCount+1
    Messagebox (vAns;"This table's name is -"; vName; OKCancel!)
    If(vAns=2 or vAns=7) Go(TablesNF@) Endif
Endif
While(True)  // (loop through all tables)
    Display(On!)
    SearchString(NToC(64393)) // (<- [Tbl Def] code's numerical value)
    SearchNext(Extended!)
    // When a table is found:
        // If there's a [Tbl Def] code on the right, skip past it:
        If(?RightCode=10964)  PosCharNext  Endif
        // Center cursor location vertically on screen if possible:
        If(?Substructure or ?GraphicSelected) Go(GetName@) Endif
        Display(Off!)
        QuickmarkSet
        Display(On!)
        QuickmarkFind
        BookmarkDelete("QuickMark")
    // Get the table's name, display it in a message & optionally quit macro:
    Label(GetName@)
    vName:=?CurrentTableName
    vCount:=vCount+1
    Messagebox (vAns;"This table's name is -"; vName; OKCancel!)
    If(vAns=2 or vAns=7) Go(TablesNF@) Endif
Endwhile
Label(TablesNF@)
MatchSelection  // (reset parameter to search command's default)
Messagebox (; "End of search"; vCount+" tables found by this macro")
Quit
// Macro code ends here



Duplicating a table cell's contents automatically

[Back to Page Contents]

WordPerfect tables provide many of the functions of a full spreadsheet program (Quattro Pro, Excel, etc.). Hence, you can set up a simple formula in a target cell (the cell which should contain the duplicated material) to automatically reference the source cell.

Tip: For more on WordPerfect's tables and using formulas and functions in them, see the program's Help (F1) module and/or the Reference Center.

Example:

Assume you want the material in Table A, cell A1 to be automatically duplicated (mirrored) in Table B, cell A1. (See also "Finding the current table's name" above.)

Step 1. Format the cell(s).  For example:

•  For text strings (e.g., "The XYZ Company," "April 13," etc.), right click in the source cell, choose Numeric Format, then choose Text. [Note that even dates like "April 13, 2015" are considered text unless you format the cell as in the next paragraph.]

•  For formatted dates (e.g., where you enter the date as "4/13/15" or "4/15" to produce the standard U.S. date "April 13, 2015"), you will need to choose Date/Time as the Numeric Format in both source and target cells.

Step 2. Add the "duplicating" formula to the target cell.

•  With the cursor inside the target cell, the Table property bar should appear (if not, see here).

•  Click the "f" button on that property bar to display the Formula toolbar above the editing screen.

•  (Using our current example:)  In the formula field just to the right of the blue check mark () delete any text string there and then type the formula (without quotes), "+TABLE A.A1" — assuming this is the source cell. (Note the plus sign and the space.)

•  Then click the blue check mark button to add the formula to that cell. (If you see a warning message, "Reference to a duplicate name..." then you probably have another table of the same name in the document. See "Renaming tables in a document" below for how to rename them.)


Duplicating the entire current table

[Back to Page Contents]

Notes:


Important:

Selecting a table with Edit, Select, All — and/or selecting it to includie the [Tbl Def] and [Tbl Off] codes (visible in Reveal Codes) — then copying it (Ctrl+C) and pasting it (Ctrl+V) into other locations will produce identical table structures, formatting and content — but each will have the SAME table name.

[Tip: See Footnote 3 below for a small macro that can make selecting the entire table (including its "on" and "off" codes) quick and easy.]

In documents containing multiple tables, having tables with unique name can be useful — even critical — with  calculations or macros that need to find specific (named) cells.

If you need to perform such calculations or other operations within or between multiple tables they probably will need to have different names. Therefore, place the cursor inside the source table and choose Edit, Select, Select Table (not Edit, Select, All) before copying and pasting. See the "Method" section below for complete instructions.

Some tips about Table names:

•  If you want to know the current name of a particular table, see the tips under "Finding the current table's name" above.

•  See the "Renaming tables in a document" section below for methods to rename existing tables — especially if you want each one to have a different name or a non-standard name.

Method:

Use this method if you need to duplicate a table and you want the duplicates to be named differently with standard (default) table names (e.g., Table A, Table B, etc.).

(As mentioned in the previous paragraph, you can do the renaming with existing duplicated tables; however, this method duplicates a table and renames each duplicate as you paste it.)

[1]  Place the cursor in the "source" table.
[2] 
Click Edit, Select, Select Table (not Edit, Select, All).
[3]  Right-click in the selected area of the table and choose Copy (or just press Ctrl+C). The "Cut or Copy Table" dialog appears.
[4]  Choose "Selection" then click OK to return to the document.
[5]  Relocate the cursor to the desired target location and paste the copied table there with Ctrl+V.
[6]  Repeat step 5 for multiple copies. Each copy will have a different name — which you can verify with the methods above.


Splitting, deleting, and joining tables

[Back to Page Contents]

Spliting a table into one or more smaller tables:

•  Place the cursor in the row that you want to become the top row in the second table after splitting the current table into two parts.
•  On the WordPerfect menu click Table, Split, Table.
•  If you want to add spaces or text between the split tables, open Reveal Codes and use the arrow key to move between the first table's [Tbl Off] code and the second table's [Tbl Def] code. Then press Enter to add spaces between the split tables, type or paste text, etc.
 
[The above method splits tables by rows. To split by columns see Footnote 4.]

Cautions:

You might want to rename the split tables with unique sequential names if you wish to use table math that encompasses more than one table and/or uses specific, program-assigned table names
(Table A, Table B, Table C, etc.).

Splitting tables not only gives them different table names, it can also assign alphabetical names (Table A, Table B, Table C, etc.) to them out of their physical location sequence
(e.g., Table A = first table, Table C = second table, Table B = third table, etc.).

Moreover, copying and pasting entire tables including their [Tbl Def] and [Tbl Off] codes (see "Duplicating the entire current table") in a document gives them the same table name!

Finally, joining tables (see next paragraphs) causes all the table rows in the now-joined table to become part of the first table's name in the sequence of the two original tables.

All of these operations can affect your table math if it expects to perform calculations by addressing a specific cell in that specific named table -- when that cell is now part of a differently named table. You'll just need to be aware of these issues and verify that your table math works as expected after any of these table operations have been performed.

For some renaming solutions see "Finding the current table's name and/or cell address" and
"Renaming tables in a document".

Deleting a table:

Choose any one of the following methods.

Method A:

•  Place (i.e., click) the cursor inside the table.
•  On the program's main toolbar click Edit, Select, Table.
•  Press the Delete key. The Delete Table dialog appears.
•  Choose "Entire table" and press OK.

Method B:

•  Open Reveal Codes (View, Reveal Codes) and place the red block insertion cursor () just to the left side of the [Tbl Def] code.
•  Press the Delete key.
•  The Delete Table dialog appears.
•  Choose "Entire table" and press OK.

Method C (for quicker access to the Delete Table dialog using a button on your toolbar):

[This part is a one-time procedure -]
•  Right click on the toolbar and choose Edit. This brings up the Toolbar Editor dialog.
•  On the Features tab, in the "Feature categories" drop list, choose the Table feature.
•  Select "Delete table" in the "Features" drop list.
•  Click on the Add Button (button).
•  Click OK. The new button -- a table grid icon with a blue "X" overlay -- should appear at the end (right side) of your existing toolbar buttons.

[Then, whenever you need to delete a table - ]
• 
Place (i.e., click) the cursor inside the table.
•  Click the "Delete table" toolbar button.
•  The Delete Table dialog appears.
•  Choose "Entire table" and press OK.

For tips on adding, moving, or deleting toolbar buttons see here. Note also that toolbar buttons can be added to, or moved to, a property bar (such as the Table property bar as described here).

[Macro fans: See Footnote 3 for a macro -- originally written to copy or cut a table to the clipboard -- that can be modified to delete the table by simply changing the EditCopy command to SelectDelete.]


Joining two tables
:

You can join two tables if they have the same number of columns.

•  Open Reveal Codes (View, Reveal Codes).
•  In the Reveal Codes window you must delete all hard return codes and any other codes or text between the [Tbl Off] "ending" code of the first table and the [Tbl Def] "beginning" code of the second table. This includes any hard return (HRt) or page break (HPg) codes or their variations.
•  Click inside the first table.
•  On the WordPerfect menu click Table, Join, Table.

Tip:

You can use a small macro to select an entire table including its [Tbl Def] and [Tbl Off] codes to copy (or cut) to the clipboard, then paste it elsewhere -- such as directly under an existing table, ready for joining them. See Footnote 3.

Joining multiple tables:

You can join multiple tables if all tables have the same number of columns.

Method A: This can be done manually using the "Join two tables" method above. Remember to first delete all intervening codes and text that might exist between the [Tbl Off] and [Tbl Del] codes.

Method B: To more quickly join many tables into one table you can use a macro. See WordPerfect Universe here. Be aware that it deletes all material between each table before joining them (the same as is required by the manual Method A), and since it works quickly and does not pause for confirmation, be sure to use it on a backup copy of the document.

Note also that it processes the entire document in one operation, so if you wish to join only a selection of tables, simply select each of them (from just before
[Tbl Def] to just after [Tbl Off]), use Ctrl+C to copy the table, and then paste it (Ctrl+V) into a new blank document before playing that macro on the selection of tables. [Or use the manual Method A to join each table in sequence.]


Formatting the entire current table

[Back to Page Contents]

Here is a general method to apply formatting to the structure or numbers/dates/text properties of all cells in the entire current table with a few mouse clicks.

This can be a handy way to add new (or change existing) global formatting in a table.

Place your cursor anywhere in the current table.

Select the entire table with Edit, Select, Select Table on the main program menu. [Macro equivalent command: SelectTable()]

You now have 2 choices:

•  [Structural formatting:] Right-click on the selection and choose Format...* on the context menu that appears.

•  [Numeric formatting:] Right-click on the selection and choose Numeric Format... * on the context menu that appears.

Assuming you made the first choice -

1. On the Properties for Table Format dialog that appears choose (click on) the desired tab: Cell | Column | Row | Table

For example, to set all Row heights in the table to adjust the row height automatically according to the content of their cells:

2.  Choose the Row tab.
3.  Click on Row height: Automatic.
4.  Click OK.

You can de-select the selection by clicking anywhere in the table or in the document.

Remember that using Ctrl+Z right away can Undo the change.

----------
* You could also adjust (for example) specific cell borders for all cells, such as creating a border for just the bottom of all rows: Choose Borders/Fill on the context menu; then choose the "Each cell in selection" radio button; then disable (X) all Cell Lines except for the Bottom cells. In the Bottom field (deliberately) click on "Single" (or other style). A representation should appear in the preview pane in that dialog. Click OK.

Important

Be aware that in many cases ** the structural formatting (and all numeric formatting) applied to the inside of a cell will take precedence over the same formatting applied to the column or row that the cell is in.  Similarly, column and row formatting of the table's structure will take precedence over the same formatting applied to the entire table.
These items are on the Properties for Table Format dialog.


This is by design, and makes sense: You would always want to have the ability to "fine tune" smaller parts of a table wherever possible.

However, because structural format settings (in the column, row, and table tabs on that dialog) are more inter-related, they are somewhat less flexible in this respect than numeric format settings (Table, Numeric Format). Numeric formatting applied to a cell will (almost) always override the same type of formatting applied to the column (there's an exception to allow using current column formatting settings for the column's cells). In turn, numeric formatting for column take precedence over the same type that was applied to the entire table.

These items are on the Properties for Table Numeric Format dialog.


----------
** There are exceptions, such as when a row setting — such as Table, Format. Row (tab), "Lines of text per row" — is set to either "Single..." (the program default) or to "Multiple...".  Such a setting is (and must be) applied to the entire row or selection of rows (which is why you won't find it on the Cell tab). So setting it to "Multiple..." while the cursor is inside a cell where you need all text displayed will not only apply to just that cell — it will apply to all cells in the row(s) to which it is applied.


Using text in table cells that were formatted as Numeric

[Related to the section "Formatting the entire current table" above:]

Here are a few things to keep in mind when formatting all or parts of a table as numbers or formulas, but where you want to insert (or convert) some cells to ordinary (non-numeric) text.

¤  To use text in cells that were formatted as numeric (including formulas that you might want displayed as ordinary, non-calculating text characters):
    •  Right-click in the cell,
    •  choose Numeric Format,
    • 
then choose "Text" on the Cell tab.
(If there's a formula already in that cell a "Replace formula?" message will appear: click the Yes button.) The contents of the cell will change to plain text. You can then delete it and type new text into the cell.

¤  Note that WordPerfect table cell formatting supersedes (replaces) column/table formatting for that cell or selection of cells, and column formatting supersedes table formatting for that column. Hence the order of tabs in the Properties for Table Numeric Format dialog (Cell | Column | Table) reflects their order of precedence.

In other words, cell formatting almost always takes priority over other formatting. 
So if cells do not seem to take on more global changes you have made to formatting e.g., applying the Currency format to the column (or entire table) a Text cell is in use the above method to check the current Numeric setting for the cell(s) and change it to match the desired format.

¤  Be aware that when your cursor is in the last cell in the last row and you press Tab, the new empty row that appears contains a copy of the previous row's formatting — including any custom formatting in specific cells you made in (or were carried into) that previous row. While this might be desirable, if it is not you can simply reformat the new cells or the entire row to your preferred numeric setting.


Renaming tables in a document (two methods)

[Back to Page Contents]

Notes:


¤  If you want to know the current name of a particular table, see the "Finding the current table's name" tips above.

¤  Table names can be entered in lower case or mixed case, but the program will convert them to all UPPER case letters.

¤  Names must begin with a letter but can contain letters, numbers, and spaces.

¤  Names appear to be limited to 20 characters (at least with WordPerfect X7).

¤  To learn more about naming a table see WordPerfect's Help (F1) and search for "Naming tables".

Method A. This simple method can be a bit tedious (and sometimes confusing) in a document with lots of tables. It might be better to create and use a macro such as the ones in Method B below.

•  Place the cursor inside a table.

•  Click on Table, Names from the WordPerfect menu to bring up the "Table Names in Current Document" dialog.


•  Choose a table/floating cell and click the Edit button to change the name.

Method B: Use a macro.

•  Create and save either or both macros in the next section.

Tip: To copy macro code into your WordPerfect program to create a working macro, see here.

•  Place the cursor in the desired table and play the desired macro.

Example 1.  A macro to rename the current table only (displays information about the new name and cell location). Note that it works in regular tables but not in (one cell) Floating tables; for Floating tables use Method A.

// Macro code begins here
// Change the name of the current table.
// [Note: Not for renaming Floating cells.]
vHRt = NTOC(0F90Ah) // (used in dialogs for hard returns)
If(NOT ?TableInTable)
    Messagebox(;"Error";
    "You must have the cursor inside a table to"+vHRt+
    "change the table's name with this macro.")
    Quit
Endif
vCurrentName:=?CurrentTableName
OnCancel(End@)
vNewName:=vCurrentName // (used as default in GetString)
Label(GetText@)
GetString(vNewName;
    "Current table name is: "+vCurrentName+vHRt+
    "Enter the table's new name (max=20 characters): ";
    "Rename current table";20)
If(vNewName="")
    Messagebox(;"Oops!";
    "You must enter some text in the field"+vHRt+
    "or click Cancel in that dialog to exit.")
    Go(GetText@)
Endif
// Trim any leading or trailing spaces:
vNewName:=StrTrim(vNewName;;TrimEnds!;WhiteSpace!)
// Change the name:
TableNameChange(OldName:vCurrentName;NewName:vNewName)
x:=?CurrentTableName
y:=?Cell
Messagebox(;"Table's new name and current cell information";
"Current table name: "+ x +vHRt+
"Cell name: "+y+" ( i.e., Column x Row )"+vHRt+
"Cell address: "+x+"."+y)
// Exit macro here:
Label(End@)
Quit
// End of macro code

Example 2.  A macro to rename all tables in the document with a chosen text string followed by a number (e.g., MY TABLE 1, MY TABLE 2, etc.). The macro also renames all Floating (cell) tables. [Thanks to Kenneth Hobson on WordPefect Universe, who posted the code here.]

// Macro code begins here
HR=NtoC(HardReturn!)
PosDocTop()
GetData(vTableCount; Table!; Count!; CurrentDoc!)
//MessageBox(;;vTableCount)
If(vTableCount)
    Declare (vNamesArray[vTableCount];vSortedNamesArray[vTableCount])
    ForNext(vNextTable; 1; vTableCount)
        GetData(vTableName; Table!; Name!; CurrentDoc!; vNextTable)
        vNamesArray[vNextTable]=vTableName
    EndFor
    Else
    Quit
EndIf
//vSortedNamesArray[]=SortArray(vNamesArray[];0)
MessageBox(vMB;"Bailing Option";"Do you really want to rename all of your tables and floating cells?  If so, press Yes now.  Press Ctrl+G and tables to see the name of your tables.";YesNo!|IconStop!)
//MessageBox(;;vMB)
If (vMB<>6)
    Quit
EndIf
GetString(vNewName;"Please enter a prefix name for each table.  Floating cell names will be ordered and precede all table names.  "+HR+HR+"e.g. MyTables, becomes Mytable1, Mytable2, Mytable3 etc.  Mytable3 could be the start of your new table names where the first two were floating cells.";"Prefix Table and Floating Cell Names")
ForNext(vTableNo;1;vTableCount)
    TableNameChange(vNamesArray[vTableNo];vNewName+vTableNo)
EndFor
// End of macro code

Tip:

If you want the numeric parts of each table's new name to be the same length (e.g., MYTABLE01, MYTABLE02 ... MYTABLE99) then you can pad the shorter numbers with a leading zero by changing the TableNameChange() command in Example 2 above to -

  TableNameChange(vNamesArray[vTableNo];
     vNewName+StrPad(vTableNo;StrLen(vTableCount);PadLeft!;"0")


How to rotate cell contents to create "tear off" strips at the bottom of a page

[Back to Page Contents]

General method:

Create a large 2-row table, with the bottom row divided into several cells.

The easy way to do this is to -

•  create (for example) a 2-row by 10-column table; then
•  join the cells in the top row to create the description section
(e.g., "For Sale" sign, etc.); then
•  rotate the cell contents in the bottom row. 

Here's how:


Size:

Set the overall table space to a maximum size by reducing all page margins to Minimum (which depends on your currently selected printer) with Format, Margins, Minimum (the button on the right side of the dialog).

Set the page Zoom level (View, Zoom) so you can see the entire table.


Create the table:

Click Table, Create. Choose (e.g.) 10 Columns and 2 Rows. Click Create.

Place the cursor in the bottom row and set the row height with Table, Format, Row (tab). The Properties for Table Format dialog should display. Set the row height to (e.g.) 2.0" (Fixed). [Optional: Adjust the row's Top/Bottom margins.]

Click the OK button to return to the table.


Enter the text for the cells in the bottom row:

Don't worry that the text is not yet rotated; just type it (or paste it) in the first cell. You can also use <Enter> to add a second line of text. (Open Reveal Codes so you can see if any text is marked Hidden; if so, try using a smaller font size.)

Duplicate the cell's text in the remaining cells — e.g., with standard copy and paste.

Rotate the text in the cells:

When finished entering text in the bottom* row's cells — all cells must contain something in order to rotate themselect all cells in the row. (The easiest way is with the Select Table Row button on the Table property bar.)

Then use Table, Format, Cell (tab). Under "Align Cell Contents" set both Horizontal and Vertical to Center, and Rotate to 90 or 270 degrees. A small graphic on the dialog should show a sample of the result of these settings. [Optional: Adjust the cell's Left/Right inside margins.]

Click the OK button to return to the table.

Note: The row's text is now inside text boxes inside each cell. To edit the text, click inside the box(es), which opens a full-screen Text Box Editor.

----------
* The bottom row was used in this example, but you can rotate the text in any table row, depending on your particular needs.


Format the table's top row:

Select all cells in the top row and join them with Table, Join, Cell.

Alternative: Place the cursor in the first cell in the row and click Table, Join, QuickJoin; then drag the mouse across the remaining cells in that row to join them. Note that QuickJoin is "sticky" for the session unless or until the option is unchecked.


Enter the text for the top row (generally this is the main part of your sign):

As you do the cell should expand downward (if Table, Format, Row has "Multiple lines" enabled).

Add spaces to push the bottom "tear off" row down to the bottom edge of the page.

You can also use Table, Format, Cell to set the top row's cell alignment.


Optional:

•  Remove or add colored borders, fills, etc.

•  Use dotted lines for the cells in the bottom row. (If the row is not selected, be sure to select it first.) Click Table, Border/Fill. On the Cell tab, enable "Each cell in selection." For "Cell lines" set the Left/Right/Top buttons to dotted (or dashed) and the Bottom to "X" (none). Click OK when done.

•  Use scissors to cut the printout's vertical borders between the cells in the bottom row to make them easier to tear off.


Convert spreadsheet data into a WordPerfect table
[Back to Page Contents]

Here are a couple of ways to do this. Both methods convert a spreadsheet's displayed values (i.e., not formulas) into a WordPerfect table.

There are several reasons why you might want to do this — often to simply display the data in a table format in WordPerfect, but also to make it quick and easy to convert the data to a merge data file (see the tip below in this section).

The author has tested these methods using QuattroPro but they should also work using the Microsoft Excel program or similar.


Method A.

This method might be useful to quickly insert the material as a simple table — i.e., without any formatting or formulas — into a WordPerfect document.

[1] Open the spreadsheet program and select the range of cells you want to copy. For example, you can click in the upper left cell of the range, then hold down the Shift key while you click in the lower right cell of the range.

[2]  Copy the selection to the clipboard with Ctrl+C (or right-click on the selected cells, then choose Copy).

[3]  In WordPerfect: Place the cursor where you wish. Right-click there and choose Paste Unformatted Text from the context menu that appears. (Or you can paste from the WordPerfect menu using Edit, Paste Special, Unformatted text.)

This inserts the selected spreadsheet
cells as plain text. The original rows are inserted as paragraphs (i.e., ending with a [HRt] code) and the original cell contents are separated by tabs.

[4]  Select the newly inserted material, and then click Table, Create. A dialog appears entitled "Convert: Text to Table". The "Table Delimiters" should be set to Tabs.

Click OK. You should now have the data formatted as a table.

Method B.

This method lets you directly import the spreadsheet data as either a Table, or as Text (same as Method A but with some formatting), or as a Merge Data File.

However, it does require you to specify a range of cells by their cell addresses if you wish to import just a specific section of the spreadsheet.

[1] In WordPerfect: Place the cursor where you wish. EITHER click Insert, File and browse to the spreadsheet file location, choose it, then click Insert; -OR- use Insert Spreadsheet/Database, Import.

[2] The Import Data dialog appears. Choose "Import as: Text". If the Filename field is empty browse to the spreadsheet file and choose it. Then click in the Range field to specify the range of cells to import (e.g., A:A1..A:D100). Click OK to return to the document.

[3] Select the newly inserted material in the document and click Table, Create. A dialog appears, titled "Convert: Text to Table". The "Table Delimiters" should be set to Tabs.

Click OK.
You should now have the data formatted as a table.

Tips


☼  To modify the resulting table's Properties you can double-click on the [Tbl Def] code in Reveal Codes, or you can use Table, Format from the WordPerfect menu. If the cursor is inside the table you can also use the Table Property Bar's options.

☼  Once converted to a WordPerfect table you can quickly create a Merge Data File from it by simply deleting the [Tbl Def] code, and in the pop up (Delete Table) dialog that appears, choosing "Convert table contents". [See also Merge tips for tables [linked page] for more on creating and using Merge Data Files, etc.]


Decimal alignment of numbers in a table column

[Back to Page Contents]

Instead of using Decimal tabs with a WordPerfect table and trying to line up numbers in a column of cells on their decimal points — also without causing unwanted wrapping of those numbers that have extra characters like the percent symbol (%), or a trailing parenthesis or bracket — you can use a built-in table formatting option: Decimal Align.

Here's how.

Step 1.

Select the cells that you want to format – e.g., left-click and drag down through the column’s cells, or use the Select Table Column button on the Table property bar. (All cells will then have a black background from border to border.)

Step 2.

Format the type of numbers to be used in the selected cells:

▸ Right click anywhere in the selected cells and choose Numeric Format....

Choose either Accounting, Commas, Currency, Fixed, Integer, Percent, or Scientific.

Click OK to close the dialog. (The cells should remain selected.)

Step 3.

Format the decimal alignment of the numbers in the selected cells:

Right click anywhere in the selected cells and choose Format....

(Choose the Column tab if it’s not already the active tab.)

▸ In the “Align contents in cells” drop list choose Decimal Align.

In the “Decimal alignment - Digits after decimal” field set the number to at least one more than you are planning to use for your figures.

For example, if your number will always need 2 decimal places, choose 3 digits to allow for the closing parenthesis, brackets, or percent symbols that might be used with negative numbers, percentages, etc.

Click OK.

Step 4. [Optional]

•  If you will be using large numbers — i.e., large number of digits in some numbers — you can adjust the the column width to accommodate numbers larger than anticipated so as to leave room for the dollar sign, the trailing space, and any parenthesis if a negative number is entered or the percent symbol if percent formatting is used.

(This setting can be found when choosing Format... in Step 3. Or you can just manually drag the column's vertical border left/right to re-size the column.)

•  Use table lines to create the underlines and double underlines that you might be using currently.

•  You can right-click in a cell and use QuickSum to instantly sum the cells above.

[After a post by Joe Fox on WordPerfect Universe.]


How to use a table to format vertical text so that it can be placed anywhere in the document

[Back to Page Contents]

This is a general method that you should be able to adjust to suit your needs.


The idea is to create a simple table inside a small movable text box to create a section heading or page identifier.

Here, it was placed along the page margin — but it could be paced anywhere else, including inside a header, footer, or watermark.

For example, here's a 2-column, 1 row table (with most cell borders removed) inside a movable text box (with all box borders removed). A table cell vertical border lines up with the page margin guideline to provide an interesting effect. The number was formatted in a large bold font, and the text in both cells was centered vertically.

Page identifier with vertical text

When the following method is done once the result can be reused (with the same or different text) in the currrent or any other document.(This might be best done in a new empty document to see how it works.)

STEP #1 

Create the table that will contain the text.

•  Click on Table > Create > (2 columns 1 row) > Create.

•  Make these suggested changes to the program's default table settings by right-clicking in a cell, and choosing Format:

CELL:
    Horizontal = Center; Vertical = Center; Inside cell margins = 0"

C
OLUMN:
    Horizontal = Center; Width = 0.300"; Inside column margins = 0"

ROW:
    Row margins = 0" (or use custom top/bottom settings)

TABLE:
    Horizontal = Center; Size = 2 columns, 1 row;
    Position on page = Center; Width = 0.300";
    Inside margins = 0"

•  Then - click Apply, then OK.

STEP #2 

Enter the text in the table.

• 
In the left cell, enter the text — with each letter or number followed with a hard return (Enter key). The table will expand downward as you fill the cell with characters.

For example:

S
E
C
T
I
O
N

Repeat for the next cell. For example:

O
N
E

Note: You might need to right-click on a cell to ensure the cell's Horizontal and Veritical alignment is Center.

Tip (optional): In either or both table cells you could use rotated text as in the left cell here:

Text box with rotated table cell

Rotating the text in a cell is best done inside the table before performing the rest of the steps below. Here's how:

(Optional: Increase the program's magnification level (View > Zoom) to make editing easier in small, confined spaces.)

▸ Instead of typing the text vertically in the cell, letter by letter with hard returns between them (as above), just type the text as a continuous string (which might result in a temporary cramping of the characters).

Then right click on that cell, choose Format > Cell >Rotate > 90 degrees > OK. This puts the text inside its own text box. (Side note: Content to be rotated in table cells is always put inside a text box. At this point in this example you will now have a text box inside a table — which shows how useful both "container-like" items can be in formatting text in novel ways.)

Left click on that new box to use the Text Box Editor to edit its contents. For example, you probably should explicitly center the text in the Editor first (Format > Justification > Center) since the box is a different structure from the table cell it is in. Then you could expand letter spacing with Format > Typesetting. You can select the text and change the font, add bold, and so forth. When finished editing, click the Close icon on the property bar (or just use File > Close on the menu) to exit from that text box back to the table cell.

Finally, you can expand that rotated box downward to (e.g.) reveal any hidden text in the rotated box: Rightclick on it, choose Size, then increase the dimension as needed. (This also expands the table row's height.) Click back in the document area when finished editing.

STEP #3 

Remove all cell border lines except (optionally) the middle vertical border line.

•  Right-click in the first cell, choose Border/Fill, then remove ("X")  the Left, Top, and Bottom borders. Click OK.

•  Right-click in the second cell, choose Border/Fill, then remove ("X")  the Right, Top, and Bottom borders. Click OK.

•  Click outside the table to exit from it.

STEP #4  (Optional but suggested)

Put the table inside a new (draggable) text box so that it is easy to position where needed.

•  Open Reveal Codes (View > Reveal Codes). In the Reveal Codes window carefully select the entire table — i.e., everything between (and including) the two [TblDef] codes. (Using Shift+arrow can make selection easier.)

•  Copy the selection to the clipboard (Ctrl+C).

•  Create a graphic box with Insert > Graphics/Pictures > Custom Box > Text Box > OK. This opens an empty 1-line text box with 8 drag handles (small squares around the box perimter)

•  You can move the box:  Move the cursor to the box perimeter until it changes to a 4-headed arrow. You can then drag the box anywhere on the page, including into the area near the edge of the page.

•  Paste the copied table into the box with Ctrl+V.

•  Resize the box by dragging the top/bottom/side drag handles to enclose the table more tightly.

Note that the graphic box's inside and outside spaces can be adjusted later by right-clicking the box and choosing Border/Fill > Advanced. Using a small amount of space allows document text to wrap around the box and its table.

•  You can remove the text box's border later by right-clicking on the box and choosing Border/Fill and clicking on the empty icon (under "Available border styles") on that dialog.

•  Drag the box to reposition it as desired. 

Done!

Tips

☼  To copy the box, just select the [Box] code in Reveal Codes and use Ctrl+C. Or just right click on the box, choose Select Box, then copy it with Ctrl+C.  It can then be pasted elsewhere (Ctrl+V), even into another open document.

☼  You can left click on the box's table at any time to change the text or add formatting to it. (Right click while in a cell and use Format to change (e.g.) a column width, etc.) Then click outside it to return to the document.

☼  If you right click on the box later you can choose Position to specific an exact position and/or "anchor" it to the Page or Paragraph or Character. By attaching it to the current Paragraph it will "travel' with that paragraph if you add or delete material above it.

☼  If you select just the [Box] code in Reveal Codes you can immediately save it as a QuickWord for later use in any document.


How to randomize a list of items - or even a block of sentences or paragraphs - using a table as a tool

[Back to Page Contents]

[Here's a method adapted from one originally described by Charlie Cork and Roy "lemoto" Lewis at WordPerfect Universe here. It is similar to the method above which sorts paragraphs in reverse order, but instead it uses a simple, built-in table math function.]

Method

Recommendations:
▸ Back up your document before beginning.
If you are new to sorting WordPerfect tables see the tips and notes in the short section above before proceeding.

•  Select the block of items you wish to randomize with your mouse or keyboard.

The selection can contain lines with characters, spaces, WordPerfect format codes (e.g., Bold, Italics, etc.), symbols (Ctrl+W), and even graphic images. All items should all begin at the left margin (i.e., no tabs, indents, centering, etc.).

The next step will group the items into separate table cells in a one-column table.

Notes

¤  Very large amounts of material — hundreds of items, items with lots of material, or heavily formatted materials — might produce problems for a table when sorting the items. Remember that a WordPerfect table is also a mini-spreadsheet with over 100 built-in functions, not just a simple formatting tool.

    Any such problem might depend in part on the available memory in your computer and/or the complexity of formatted items in the selection. Asking a WordPerfect table to do some really "heavy lifting" for which it was not designed might be asking a bit too much.

    Hence you might want to

[A] break up the selection into smaller blocks and process them separately, and/or

[B] remove all format codes before using the selection in the method below.


Removing codes can be most easily accomplished by selecting the material, copying it to the clipboard (Ctrl+C), then pasting it with Edit, Paste Special, Unformatted text into a new blank document. Alternatively you can simply save the items as ANSI or ASCII (generic text).

¤  If you are using a WordPerfect Outline inside the selection, use Reveal Codes to ensure you are not also including an [Outline] code in the selection. Otherwise the randomized selection's outline items will not be properly re-numbered if that code is moved below other outlined items as a result of the next steps.

    One easy workaround for the Outline problem is to first select just the [Outline] code in Reveal Codes, cut that code to the clipboard (Ctrl+x), and paste it above the desired selection (Ctrl+v). Then select the block of items to be randomized and proceed with the next steps. (You can relocate that code the same way later, if desired.)

•  Create a table structure around the selected items by clicking on Table, Create.

The "Convert: Text to Table" dialog opens.

▸  Choose 1 Column, and set the Text Delimiters to "Paragraphs".
▸  Click OK. (Note that WordPerfect treats each item – i.e., text that ends with a hard return or similar format code – as a "paragraph".) The cursor will be automatically included inside the table in the first cell.

•  Insert a new empty column to the left of the current column.

With the cursor in the first table cell, click on Table, Insert, Column (set to "1"), Before, OK. (It might help if you widen the resulting column to an inch or so.)

•  Populate the new column with random numbers.

▸  Place the cursor in the first cell on the empty column. The Table property bar should be visible above the ruler:
Table property bar 
▸  Display the Formula Toolbar: Click the f(x) button on the right side of that property bar. 
The Formula Toolbar will appear under the ruler:
Formula Toolbar
[Tip: If the Table property bar above is not visible you can use Table, Formula Toolbar on the program's main menu to display the Formula Toolbar.]

▸  Define the formula: Click inside the empty formula field on the right end of the Formula Toolbar and carefully type the characters RANDOM(1) into that field:
Formula Toolbar with RANDOM(1) function

▸  Insert that formula: Click the
Blue check mark blue check marked button on the left side of that field to accept the formula and insert it in the first table cell. It should display a random decimal number (i.e., between zero and 1) in that cell immediately. (The actual number of digits displayed depends on the column's width.)

▸  Replicate the formula down to all subsequent table cells:

With the cursor in the first cell of the first table column (the one showing the random number) use the Copy Formula button on the Formula Toolbar (shown above -or- use the Table, Copy Formula choice on the main menu).

In the small dialog that appears, click the radio button labeled "Down" and choose the number of cells to copy the formula into to fill the column (one less than the number of rows; you can type the number into the number field or use the spinner). For example:
Copy Formula dialog
[Tip: If you don't know the number of cells required to fill the entire column just type an arbitrarily large number (e.g., 111111) into that field; the program will pop an error message and show the maximum number you can use.]

Click OK to dismiss the dialog.

The first column of the table now contains random decimal numbers in each cell. (Since we used a positive number in the RANDOM() function each number will be between zero and 1.)

[Optional: You can now remove the Formula Toolbar with its Close button.]


•  Now, sort the table:

▸  Place the cursor anywhere in the table and click Tools, Sort on the program's main menu.
▸  In the "Sort by" field, choose "First cell in a table row."
▸  Click Sort.

The original column of items will now be sorted randomly, since they were temporarily "attached" to the random numbers in the adjacent cells in the first column.

•  Next, remove the new column. Since the new random-number column has done its work ... with the cursor placed in that column, remove the column with Table, Delete, and the Columns radio button field set to 1. Click OK.

You should now have just a 1-column, randomly sorted table.

•  Finally, delete the table structure (but not the table's contents) to return the original material back to ordinary text:

▸  Click on Table, Convert.
▸  In the small "Convert: Table to Text" dialog that appears, choose the two radio buttons "Convert tables to text" and "Separate text with paragraphs (hard returns)."
▸  Click OK. 

Tip: Your randomized items might need some editing to add or remove extra hard returns, etc. (For large amounts of text, removing extra hard returns can be done very quickly with a macro: see DelCodes in the Library for a macro, DelExtraHR.wcm.)


Using footnotes and endnotes in tables

[Back to Page Contents]

From the tips page on this site, "Footnotes and Endnotes: Setting or changing margins, numbering, font sizes, tabs and other formatting in WordPerfect notes":

If you try to create a footnote in a header row of a table, you will find that the Footnote/Create option is unavailable. You must use an endnote in that situation.

Reason:

Since a header row might span several pages, a footnote would not logically work in that situation, so WordPerfect forces you to use an endnote.

However: 

You can use footnotes in ordinary non-header rows if you disable (un-tick) the option, "Divide row across pages" in Table, Format, Row (tab) for the row (or just right-click in the cell, then choose Format, Row (tab), etc.).

If this option is enabled, you will find that the Footnote/Create option is unavailable, and you must use an endnote in that situation — and for the same reason given above for header rows.


Selecting all contents of a table cell (both text and codes)

[Back to Page Contents]

Tip:
See also the next section for some macros that can simply determine if a cell is empty or not.

Tip: To determine if a table row has any visible (keyboard) characters in any cell in the row so you can, for example, delete the row, see here.

Method A

Using the WordPerfect program's menu, choose Edit, Select, Paragraph.
(For convenience the built-in feature "Select Paragraph" could be assigned to a toolbar or keyboard shortcut.)

However ... This menu option selects the contents in the current table cell — but NOT everything if the cell contents are divided into separate paragraphs with hard returns ([HRt]).


Hence either of the macros in Method B below can be more reliable for this task, and could be assigned to a toolbar or keyboard shortcut for quick and easy access.

Method B

H
ere are two versions ("snippets") of macro code to select all contents in a table cell. Either snippet can be included as part of your own macro, or it can be used as a standalone macro to be manually played as needed.

Side note: The macro command SelectCell() might seem to be an obvious choice for this task — but it will select BOTH the cell's structure AND the cell's contents. [See a simple test below.] Most likely this is not what you want to do — hence the reason for using a snippet like the ones below.

It is important to note that the snippets below only select all cell contents —
including any [Hidden] text and any format codes — but they do not do anything else.

Hence if you use them in your own macro (rather than as standalone macros) you must code your macro for other tasks that require the cell to be selected.

// Simply SELECTS the entire contents of the current table cell.

If(NOT ?TableInTable) // Test cursor position
    Messagebox(;"Error"; "The cursor is NOT in a table cell")
    Quit  // <- or use Return if required to return to main macro
Endif
// Move cursor as though Reveal Codes in open:
WP51CursorMovement(On!)
// Go before any text and format codes inside the cell:
PosTableCellTop 
While(?LeftCode>0 and ?LeftCode<>{195;196;197;198})
    PosCharPrevious
Endwhile
// Turn select mode on:
SelectMode(On!)
// Go to the bottom of the cell:
PosTableCellBottom
// Go to the end of any line of text (and after any codes inside the cell):
PosLineEnd
// Stop selecting when the right border of the cell is reached:
While(?RightCode>0 and ?RightCode<>{189;191;192;195;196;197;198})
    PosCharNext
Endwhile
WP51CursorMovement(Off!)
Return

Alternative - same snippet as above ... but included as part of a Procedure that can be called by the main macro as often as needed:

[From my post on a WordPerfect Universe thread here, which thread also deals with some related issues:]


// Simply SELECTS the entire contents of the current table cell by
// calling
a procedure from the main macro when the cursor is already
// in the table cell, then returns control to the main macro.

// ... other main macro code ...
// Call the procedure when needed:
pSelectTableCellContents ()
// ... do other tasks here with the now-selected text ...

// Place this code segment at the end of the macro after all other code:
Procedure pSelectTableCellContents ()
// Selects the entire contents of the current table cell:
If(NOT ?TableInTable) // Test cursor position
    Messagebox(;"Error in macro Procedure";"Not in a table cell")
    Quit
Endif
// Move cursor as though Reveal Codes in open:
WP51CursorMovement(On!)
// Go before any text and format codes inside the cell:
PosTableCellTop 
While(?LeftCode>0 and ?LeftCode<>{195;196;197;198})
    PosCharPrevious
Endwhile
// Turn select mode on:
SelectMode(On!)
// Go to the bottom of the cell:
PosTableCellBottom
// Go to the end of any line of text (and after any codes inside the cell):
PosLineEnd
// Stop selecting when the right border of the cell is reached:
While(?RightCode>0 and ?RightCode<>{189;191;192;195;196;197;198})
    PosCharNext
Endwhile
WP51CursorMovement(Off!)
EndProcedure

----------
*
To test this: Create a one-line macro contining the SelectCell() command; play it with the cursor inside a table cell containing some text; copy the selection (Ctrl+c); then paste it (Ctrl+v) outside the table. The result: The entire cell structure — including cell borders and cell contents will appear at that location, NOT just the cell's contents as you might have expected (and which is what the snippets in this section are designed to do).


Detecting an empty table cell (macro snippets)

[Back to Page Contents]

Several methods have been put forth over the years to help macro writers detect the entire contents of the current cell. See, for example, the previous section (and the reason there whey SelectCell() might not be appropriate for the task).


Here are some macro snippets that determine whether the current cell (i.e., where the cursor is located) is empty or not.

The differences between them depend on what you consider to be "cell contents" (text only? both text and format codes?) and what information you want the snippets to pass to your main macro.

These snippets are also standalone macros: You can just play them in a table cell and the results appear in a message box, or you can use their code as part of your main macro. Note that the Quit command is used to stop the macro at various points; you might need to omit it and instead tell the macro what to do next if you use the code as part of another macro.


Snippet #1. You can have a macro DETECT the presence of ANY characters, spaces, punctuation, symbols, and/or format codes inside the cell (i.e., from the cell's left border to its right border) and return a 0 (zero) if it's EMPTY or a 1 if any of those items exist in that cell:

// DETECTS any character, space, symbol, or format code in
// the current cell and stores the result (either 0 or 1) in the
// vTableCellIContents variable in preparation for another task:

vTableCellContents := 0 
If(NOT ?TableInTable) // (test cursor position)
    Messagebox(;"Error"; "The cursor is NOT in a table cell")
    Quit
Endif
// Test if current cell is absolutely empty (cell border to cell border):
If(?LeftCode=198 AND ?RightCode IN {189;191;192;195;196;197;198})
    Messagebox (;"Current cell contents -";
    "Cell is completely EMPTY.")
    vTableCellContents := 0
Else
    Messagebox(;"Current cell contents -";
    "Cell contains SOMETHING (text, symbols, and/or codes).")
    vTableCellContents := 1
Endif
Quit

// End of macro code


Tip: If you are only interested in detecting cells that do not contain visible text characters or symbols, there's a macro in the Library that uses the Procedure above to identify such a cell and then delete any row or column in the table based on that empty cell: see DeleteRC. (If there are only spaces, format codes or images in the cell it is considered empty by that macro. This is different from the snippet just above which detects anything in the cell.)

Snippet #2
: You can get a COUNT of the items in a cell (except WP codes) so as to do something else depending on the results of the count.

// COUNTS any text characters, spaces, and symbols found in the
// current cell (but does NOT count WP codes that might be in the cell) and
// store the results in the vString variable in preparation for another task:

If(NOT ?TableInTable) // (test cursor position)
   
Messagebox(;"Error"; "The cursor is NOT in a table cell")
    Quit 

Endif
If(?LeftCode=198 AND ?RightCode IN {189;191;192;195;196;197;198})
    Messagebox (;"Current cell contents -"; "Cell is completely EMPTY.")
    Quit

Endif
// Move cursor as though Reveal Codes in open:
WP51CursorMovement(On!)
// Go before any items in cell:
PosTableCellTop 
While(?LeftCode>0 and ?LeftCode<>{195;196;197;198})
    PosCharPrevious
Endwhile
// Turn select mode on:
SelectMode(On!)
// Go to the bottom of the cell:
PosTableCellBottom
// Go to the end of any line of text:
PosLineEnd
// Stop selecting when the right border of the cell is reached:
While(?RightCode>0 and ?RightCode<>{189;191;192;195;196;197;198})
    PosCharNext
Endwhile
WP51CursorMovement(Off!)
vString:=StrLen(?SelectedText)  // (store the character string's length)
SelectOff
// Display a message:
Messagebox(;"Current cell contents (except any format codes) -";
    "Cell has  "+ vString +"  total text characters, spaces, and/or symbols.")
Quit

Snippet #3: [Similar to #2 above]
You can get a COUNT of the items in a cell (including WP codes) so as to do something else depending on the results of the count.

// COUNTS the ENTIRE contents of the current table cell — all characters,
// spaces, punctuation, symbols, format codes, graphics, etc. (except
// Hidden text),
and stores the result in the vTableCellItemCount
// variable in preparation for another task:

vTableCellContentsCount:=0
If(NOT ?TableInTable) // (test cursor position)
    Messagebox(;"Error"; "The cursor is NOT in a table cell")
    Quit

Endif
If(?LeftCode=198 AND ?RightCode IN {189;191;192;195;196;197;198})
    Messagebox (;"Current cell contents -"; "Cell is completely EMPTY.")
    Quit

Endif
// Move cursor as though Reveal Codes in open:
WP51CursorMovement(On!)
// Go before any items in cell:
PosTableCellTop 
While(?LeftCode>0 and ?LeftCode<>{195;196;197;198})
    PosCharPrevious
Endwhile
// Physically count all text, symbols, format codes, etc.:
Repeat
    PosCharNext
    vTableCellContentsCount := vTableCellContentsCount + 1
Until (?RightCode IN {189;191;192;195;196;197;198})
WP51CursorMovement(Off!)
// Display a message:
Messagebox(;"Current cell contents -";
    "Cell has "+ vTableCellContentsCount +
    "  total characters, symbols, and/or codes in the cell.")

Quit


Automatically add incrementing numbers or dates to a table column or row

[Back to Page Contents]
Here are two methods.

Method A:

From WordPerfect X9's Help module -

"To fill a table with incremental numbers or dates

1. Select the cells that contain the incremental or decremental pattern of values as well as the cells in which you want to continue the pattern.

[Explanation: To set up the incrementing items simply enter 2 or more "seed" numbers or dates individually into the first 2 or more cells in a column or row. Then select BOTH those cells AND the following cells that should contain the remaining incrementing items.*]

2. Click Table, QuickFill.

Note

You can use Roman numerals, days of the week, months, or quarters, even if only one cell is used to establish the pattern. To repeat incremental or decremental numbers, however, you must select at least two cells with values to establish a pattern. 

Tip

You can also fill a table with incrementing numbers or dates by clicking the QuickFill button on the Table formula toolbar. To display the Table formula toolbar, click Table  Formula toolbar."

Method B:

See the QwikFill macro on this site, which has several added options.

----------
* Note that the "seed" numbers/dates are typically in a regular sequence such as 1,2,3 or 5,10,15. If they are not in a regular sequence
e.g., numbers that are in a "random" sequence such as 1,7,3 then the program will most likely use the increased/decreased differences between each of the items (for the example here, +4 and -4) as the pattern to follow for each of the subsequent items, creating a strange result like 1,7,3,9,5,11,7,13, etc. If this happens just use Edit, Undo (Ctrl+Z) and enter a regular (seed) sequence of items in the initial cells.


Automatically calculate an hourly time sheet

[Back to Page Contents]

If the task is to create a "time sheet" -- which presumably would contain multiple rows as a project progresses -- then a WordPerfect table can do this fairly easily.

Moreover, such a table can calculate the correct number of hours even when dates span the end of short months (e.g., months with 30 days) and February in Leap years.*

For example:

There is a custom format for dates in table cells ** that displays dates like this:

April 23, 2019 (2:30pm)

1. Assume Column A and Column B are formatted with this custom date format and you have then populated these two cells -- e.g., with Insert, Date, or by just typing (or pasting as unformatted text) a date such as 4/23/19 -- then you can simply click in these cells to edit the displayed custom dates to change the month, day, and/or time. (The date columns can be in any order (A-B or B-A) -- the table simply calculates the difference between them.)

2. Assume Column C (for "Days") contains cells with the formula +ABS(A1-B1) using Fixed Numeric Format with 3 decimal places, and it is replicated down through that column.

3. Assume Column D (for "Hours") contains cells with the formula +C1*24 using Fixed Numeric Format with 2 decimal places, and it is replicated down through that column.

4. When the table is calculated (or it is set to automatically calculate with Table, Calculate) you should see something like this in an example table row, with Column D containing the total hours between the two date cells:

April 23, 2019 (2:30pm) | April 23, 2019 (3:45pm) | 0.052 | 1.25

And if you want your hours to include all hours during a 24-hour cycle (you are "on duty" 24/7) you should see something like this:

April 23, 2019 (2:30pm) | April 25, 2019 (4:00pm) | 2.063 | 49.50

A small caveat:

Once dates are displayed in the above format and you want to edit them you must be careful to maintain the exact same formatting as displayed on screen. If the days/hours in a row show strange results (e.g., very large, unlikely values) you probably made mistake in an adjacent date cell format. In that case simply delete the contents in the affected date cell and insert a new date as in #1 above.

5. Further, adding more columns to calculate an hourly rate and include totals can give you data (or even a formatted table) to copy into an invoice or statement.

----------
* Verified using https://timeanddate.com (see the Date to Date calculator there).
** To set the custom format to the one described above in this post: Select the cells to be formatted, right-click on the selection, and choose Numeric Format.... Then choose Date/Time (under the Cell tab). Click the Custom... button, and in the Custom Date Types dialog that appears use the drop list to choose the custom format shown above in this post (by default it will show today's date and the current time, but as noted above you can edit the actual date in the cells).


Notes area ...

Footnote 1

[Continued from above]

Foreground and background colors in tables, text boxes, and graphic boxes


[From a 2013 post on WordPerfect Universe:]

... After a little experimenting with table cells, text boxes, and graphic boxes and setting the Foreground to pure red (RGB=255,0,0) and the Background to pure blue (RGB=0,0,255):

The Foreground color is used for -

- 5%-100% Fill settings (i.e., a solid color of various shades); and

- dots (individual pixels) or lines in a Pattern Fill.

The Background color is used for the other parts of the cell.

Hence, it might help to think of these things the way some graphics programs use the word "layer":

Foreground = analogous to a top layer (used for solids, dots, and lines).
Background = analogous to a bottom layer.

The interaction between Foreground and Background color is most easily seen when choosing a Pattern Fill....

For example, try using the Bricks pattern and change just the Foreground color to red (leave the background set to the WP default, or to white). Note that the "mortar" lines are now red, and the bricks are white.

Then reverse the process and change just the Background color to red (foreground to white); this makes the mortar lines white, and the bricks are red.

Further:

For some graphics — such as 2 dimension shapes inserted with Insert, Shapes (and edited with right-click, Properties) — the Fill Color corresponds to the Background color above, and the Pattern Color corresponds to the Foreground color (for the dots, lines, or geometric shapes inside the shape).


Footnote 2
[Continued from above]

As note above, Charles Rossiter's TableAttributesRemove.wcm macro (see download page here) can remove 
all internal table and cell attributes, fills, and added justification that you might have deliberately or accidentally added to the table (see Method B above).

However. you might not want to remove fills and/or special justification from the table. Here's the main part of Charles's macro, which you can simply use "as is" (or as part of another macro) or use after removing the blue lines (to remove their operation).

To copy this code into your WordPerfect program to create a working macro see here.

// Macro code begins here

If (Not ?TableInTable)
   MessageBox (;"Ooops!"; "Cursor must be positioned within a table")
   Quit
EndIf
TableSelectOn (Table!)
TableAttributeOff (Every!)
TableCellAttributeOff (Every!)
TableFill (NoFill!)
TableCellFillStyle (NoFill!)
TableCellJustification (Left!)
TableSelectOff ()
Return

// Macro code ends


Footnote 3
[Continued from above here and here]

If you want to select a table and copy (or cut) it to the clipboard so that it can be pasted elsewhere (with Ctrl+v or with a macro equivalent command), here's a macro to do it quickly and easily. [Note: "Cut" allows moving the entire table.]

While WordPerfect has a "Select - Select all cells in the current table" button on the Table property bar that appears when the cursor is inside a table, that feature simply selects the contents of the table's cells, not the entire table structure (i.e., from the [Tbl Def] code to the [Tbl Off] or [Tbl Off-SPg] code). If you use that button and then (e.g.) cut the selection to the clipboard, the table structure is left behind!

It seems useful to have a quick method that can select the whole thing, including the initial table definition code and terminal table off code. Hence the inclusion below of a macro to do the job.

Note 1

This macro copies the selected table. To cut (remove) the table to the clipboard, change the EditCopy command to EditCut. [This particular macro could also be duplicated so that one macro copies the selection and the other cuts it.]

Note 2

Copying the table elsewhere will (by default) also duplicate the source table's name at the new table location. This may or may not be important to you, depending on whether you need to reference individual tables by their internal name. See above for more on this issue; also see here for a macro method to rename all tables in the document so they have different names.

- - - - -
To copy this code into your WordPerfect program to create a working macro see here. Once you save the macro on your system you can assign it to a toolbar, shortcut key, or menu to make it quick and easy to play — see here.
- - - - -

// Macro code begins here

// = = = Purpose = = = =
// This macro copies (or optionally cuts) the entire current table so it
// can be pasted (Ctrl+v) elsewhere in the current document or into a
// new document. [Note: "Cut" (then paste) allows moving the entire table.]
// = = = = = = = = = = =
// First ensure ehe cursor is inside a table; if not, display a message:
If(?InTable=False)
    Messagebox(;"Error";
    "Cursor must be inside a table before playing this macro.")
    Quit
Endif
PosTableBegin // Send the cursor to the first table cell
PosCharPrevious  // Move cursor outside the table (before its "on" code)
QuickmarkSet  // Set a temporary bookmark there
SelectMode(On!)  // Start selecting the table
PosCharNext  // Go into the table's first cell
PosTableEnd  // Go to the last cell
PosTableCellBottom // Go to the bottom of the last cell
PosLineEnd // Go to the very end of any line of text and codes
PosCharNext // Move the cursor outside the table (after its "off" code)
// If needed, relocate the cursor if the code on the left is not
// a [Tbl Off] or [Tbl Off-SPg] code:
While(Not (?LeftCode=191 Or ?LeftCode=189)) PosCharPrevious Endwhile
// The entire table (including [Tbl Def] and [Tbl Off] codes) should now
// be selected. The next command copies the selected table to the
// clipboard, ready to paste it elsewhere.
EditCopy  // <=  Replace EditCopy with EditCut to cut (remove) the table
Return

// Macro code ends


Footnote 4
[Continued from above]

Splitting tables by columns

(To split by rows — the more usual method of splitting a table — see above.)

This is a simple and fairly easy method, and once you've done it, it should take only a minute or two to repeat the process in the future.

Notes

¤ First make back ups of any documents used in this method.

¤ For large multi-column tables it might be easier and less problematic to do these things in a new blank (temporary) document.

¤ For large Landscape-oriented tables (i.e., typically created with Format, Page, Page Setup, Landscape) you might want to make some simple, temporary adjustments to make editing/splitting the tables easier:

First, try setting the font size just above where the "source" table will be created — or where the it already exists — to 6-point size so that the table's column contents become visible (if only very tiny).

A little more horizontal spacing might be helpful to view the column contents:

▸ Try setting page margins to their minimum settings in File, Page Setup.

   -or-

See the information in Footnote 3 on the PrnProbs.html page (the first part there, not the "To print..." part).

Essentially you just need to
set the page to (e.g.) Legal or Legal Extra size, and in Landscape orientation with minimum document margins.

Then (if your printer cannot print such sizes) choose
a virtual printer that ships with Windows and is available from WordPerect's File, Print menu. (Just choose the printer and return to the document; don't print the document.)

The result expands the horizontal area to 14-15 inches.

There are other page dimensions available that are even wider than Legal Extra, such as SuperB size: click on the Page Definition's drop list and choose Standard page types.

Note that these are useful editing setups for the current task: Your printer probably will not be able to print such large sizes.


When you have finished with the steps below you can remove these temporary adjustments by removing their format codes in Reveal Codes or by superseding them with the appropriate format adjustments.

Method

[1] Navigate to (or create) a multi column table. This is the "source" — the table you want to split by columns into new tables.

[2] Select and copy the column/s (or particular section in those columns) to use as a new ("target") table, and copy the selection to the clipboard. An easy method:

[a] Place the cursor inside the table cell where the selection should begin;

[b] while holding down the Shift key, click inside the column cell where the selection should end;

[c] copy (Ctrl+C) that selection to the clipboard; then

[d] click outside the table to de-select it.

[3] Paste the copied material into a new location in any open document. It should appear as a new table. [Before pasting you can create room for the new table with Ctrl+Enter, which creates a page break and a new page.]

[4] Repeat steps 1 - 3 as desired. Each time you do this a new table is created, but the contents will depend on what was selected in step 2.

[5] [Optional:] Delete the source table.