PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WinDevWebDev - Server codeWebDev - Browser codeWinDev MobileReports and QueriesWindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPadJavaPHPAjaxUser code (UMC)External languageHFSQLHFSQL Client/ServerStored proceduresHyper File 5.5OLE DBODBCNative Accesses

TableToWord (Function)
In French: TableVersWord

Creates a Word file (.RTF) from the data found in a Table or Treeview Table control.

Note: This file can be opened by Word or by OpenOffice Writer (depending on the software installed on the current computer).

Example

Syntax
<Result> = TableToWord(<Control Name> , <Name of Doc File> [, <Options> [, <Start Row> [, <End Row>]]])
<Result>: Boolean
  • True if the file was created,
  • False otherwise.
<Control Name>: Character string (with or without quotes)
Name of the control to use. This control can correspond to:
  • a Table control.
  • a TreeView Table control.
<Name of Doc File>: Character string (with quotes)
Name and full path of the Word file to create. The file is replaced by the new file if it already exists.
<Options>: Optional constant
Configures the Word file to create.

taWithInvisibleColumnsAlso exports the invisible columns of the control.
taColumnDisplayedOrderExports the columns according to the order of columns currently displayed in the control (and not according to the order of columns defined in the editor).
taSelectedLinesExports the selected rows only (all the rows are exported by default).
taNoTitleOnly the data is copied into the file.
taNoTotalDoes not export rows with totals, average or automatic count (these rows are exported by default).
taColumnsTitles
(Default value)
The title of columns is inserted into the file.
<Start Row>: Optional integer
Number of the row where the export will start. If this parameter is not specified, the start row is the first row of the control.
<End Row>: Optional integer
Number of the row where the export will end. If this parameter is not specified, the end row is the last row of the control.

Remarks
  • The created file can be opened by Word 95 (or later) or by OpenOffice Writer 2 (or later).
  • The merged columns are ignored.

Related Examples:
WD Export table Training example (WinDev): WD Export table
[ + ] This example explains how to export the data found in a table with the WLanguage functions.
The following topics are presented in this example:
1/ interfacing Word and Excel
2/ sending data to the clipboard
3/ generating a text file
Summary of the example supplied with WinDev:
This example explains how to export the content of a table to a Word document, an Excel worksheet, the clipboard or a text file via the WLanguage functions: TableToWord, TableToExcel, ToClipboard and fWriteLine.

Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment