view

Prev Next

Function Names

view

Library

Support Library

Description

This function provides a more elaborate approach to view tables than the function table list() which is just outputting some or all rows and columns of the table to the console. You have the choice to view and scan through the table in B4P (using the console) or the web browser. For the web browser, you can view the table either in conventional manner (static HTML file) or as a browsable data table (Data table functionaltiy is craeted and provided by: SpryMedia Ltd, Scotland, MIT license).

Note: Every time you view a table with this function, a copy of the table will be saved in the current working directory. The file name begins with "_b4p_view... .html" containing the table name. The function view reset() will do the clean-up by deleting all such files created.

Call as: procedure

Restrictions

Under normal conditions, the 'Support Library' is loaded automatically, so no 'include(...)' call is needed.

Parameter count

1-2

Parameters

No.TypeDescription
1.
input
string Name of existing table

Opt. 2.
input
string Visualization tool

Tool Functionality Restrictions
here The table will be visualized on the console, providing interactive navigation features This is the default choice if the 2nd parameter is not specified.
excel Saves the table as a ".xlsx" file and opens Microsoft Excel for viewing. Windows only
csv Saves the table as a ".csv" file and opens Microsoft Excel for viewing. Windows only
html Saves the table as a ".html" file and opens Microsoft Excel for viewing. Windows only
xml Saves the table as a ".xls" file (EXCEL 2003 XML) and opens Micirosoft Excel for viewing. Depreciated format
browser Saves the table as a ".html" file and opens a web browser for direct viewing.
datatables Saves the table as a ".html" file and opens the web browser and uses the Datatable feature as provided by SpryMedia Ltd under the MIT license

Default value: here

See also

table view
table list
view reset