Course contents6 lessons
Course overview
  1. Create a Print Document
  2. Recursive Printing
  3. Printing Visualizations (charts, maps, etc.)
  4. 04Printing Static Tables
  5. 05Printing Images from URLs
  6. 06Adding Appending Document Templates Dynamically

Lesson 4 of 6

Printing Static Tables

Insert an Excel named-range table into a Word print template, configure header and skipped rows, and generate the document from an application button.

2 min read

Static-table stubs place the rows from an Excel named range into a Word or PDF document. The Word template defines the table's visual formatting, while the Print Process supplies the current application data when a user generates the document.

Prepare the workbook data

Create the source grid in Excel and assign a named range to the complete area that should be available to the print template. For example, the video uses a range named Grid1. Confirm that the range includes the intended columns and that its header handling matches the document configuration you plan to use.

Add the table stub to Word

Open the Word template and insert a static table in the desired location. Format its borders, widths, alignment, and header row to match the finished report. In the row that should receive the SpreadsheetWeb data, enter the named-range stub using double braces, for example, {{Grid1}}.

Upload the Word file to the application's Print Process. SpreadsheetWeb detects the stub so it can be mapped to the corresponding workbook range.

Configure table options

Open the document stubs for the template and edit the table mapping. Select the named range that supplies the rows, then review these options:

  • Has Header treats the first row of the source range as a header rather than repeating it as data. Use this when the Word table already contains the formatted header labels.
  • Skip Row Count omits the specified number of template rows before SpreadsheetWeb begins inserting data. This helps preserve custom title or header rows in more complex Word tables.

The correct combination depends on how the Excel range and Word table are structured, so generate a sample document after changing either option.

Run the Print Process

Add a button to the application and assign the event that runs the Print Process. Publish or preview the application, generate the document, and confirm that all expected rows appear in the correct order. Check page breaks, repeated headers, long cell values, and large data sets to ensure the table remains readable in the final Word or PDF file.