Export to HTML format (Db2Html)       

Description:
Db2Html allows you to export all the data from one or all tables in a database
in Html table format. Each column is written as a cell inside a html table..
Db2Html writes the output by default to "table.htm" unless you
specify with the '-o' option a different output file.
Db2Html also creates a header row with all column names
unless you specify the "-n" option to write the HTML without the header line.
Db2Html writes one row for each record.
If you don't specify a table with the "-t" option Db2Html will export all tables.
Numeric columns are exported right justified in HTML format.
Db2Html uses by default the "Arial" font, but with the -f option you can
set a different font for the HTML output.

Db2Html writes all diagnostics to a log file "logs/yyyymmdd/db2html.log"
The exported HTML data can be used in browsers to view your data.
Note that In demo mode up to 100 records can be exported.

Syntax:
-usage: db2html [-sn] [-d{db}] [-o{out}] [-t{tab}]
-d = DATABASE: Specify database input file (default Sample.mdb)
-o = OUTPUT  : Specify output filename (default Table.{xml|txt|csv|htm})
                 -o STDOUT writes directly to standard output not a file
-t = TABLE   : Specify Table name (default is all tables)
                 or table number ('#3' = 3rd table)
-f = FONT : Specify a font for Html Exports (default is Arial)
-s = SILENT  : Dont show diagnostics (XX Records written..)
-n = NOHEADER: Dont write DTD (XML), header line (TXT, CSV, HTML)

Example:
db2html -d sample.mdb -t Employees -f "Courier New"
9 'Employees' Record(s) written to 'Employees.htm'

Exports all data from the " Employees" table from the default database " Sample.mdb".
The output is written to "
Employees.htm".

Example HTML Table Output (Employees.htm)
EmployeeID LastName FirstName Title TitleOfCourtesy BirthDate HireDate Address City Region PostalCode Country HomePhone Extension Photo Notes ReportsTo
1 Davolio Nancy Sales Representative Ms. 12/08/48 05/01/92 507 - 20th Ave. E. Apt. 2A Seattle WA 98122 USA (206) 555-9857 5467 Array of VT_UI1 Education includes a BA in psychology from Colorado State University in 1970. She also completed "The Art of the Cold Call." Nancy is a member of Toastmasters International. 2
2 Fuller Andrew Vice President, Sales Dr. 02/19/52 08/14/92 908 W. Capital Way Tacoma WA 98401 USA (206) 555-9482 3457 Array of VT_UI1 Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of Dallas in 1981. He is fluent in French and Italian and reads German. He joined the company as a sales representative, was promoted to sales manager in January 1992 and to vice president of sales in March 1993. Andrew is a member of the Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association.
3 Leverling Janet Sales Representative Ms. 08/30/63 04/01/92 722 Moss Bay Blvd. Kirkland WA 98033 USA (206) 555-3412 3355 Array of VT_UI1 Janet has a BS degree in chemistry from Boston College (1984). She has also completed a certificate program in food retailing management. Janet was hired as a sales associate in 1991 and promoted to sales representative in February 1992. 2
4 Peacock Margaret Sales Representative Mrs. 09/19/37 05/03/93 4110 Old Redmond Rd. Redmond WA 98052 USA (206) 555-8122 5176 Array of VT_UI1 Margaret holds a BA in English literature from Concordia College (1958) and an MA from the American Institute of Culinary Arts (1966). She was assigned to the London office temporarily from July through November 1992. 2
5 Buchanan Steven Sales Manager Mr. 03/04/55 10/17/93 14 Garrett Hill London SW1 8JR UK (71) 555-4848 3453 Array of VT_UI1 Steven Buchanan graduated from St. Andrews University, Scotland, with a BSC degree in 1976. Upon joining the company as a sales representative in 1992, he spent 6 months in an orientation program at the Seattle office and then returned to his permanent post in London. He was promoted to sales manager in March 1993. Mr. Buchanan has completed the courses "Successful Telemarketing" and "International Sales Management." He is fluent in French. 2
6 Suyama Michael Sales Representative Mr. 07/02/63 10/17/93 Coventry House Miner Rd. London EC2 7JR UK (71) 555-7773 428 Array of VT_UI1 Michael is a graduate of Sussex University (MA, economics, 1983) and the University of California at Los Angeles (MBA, marketing, 1986). He has also taken the courses "Multi-Cultural Selling" and "Time Management for the Sales Professional." He is fluent in Japanese and can read and write French, Portuguese, and Spanish. 5
7 King Robert Sales Representative Mr. 05/29/60 01/02/94 Edgeham Hollow Winchester Way London RG1 9SP UK (71) 555-5598 465 Array of VT_UI1 Robert King served in the Peace Corps and traveled extensively before completing his degree in English at the University of Michigan in 1992, the year he joined the company. After completing a course entitled "Selling in Europe," he was transferred to the London office in March 1993. 5
8 Callahan Laura Inside Sales Coordinator Ms. 01/09/58 03/05/94 4726 - 11th Ave. N.E. Seattle WA 98105 USA (206) 555-1189 2344 Array of VT_UI1 Laura received a BA in psychology from the University of Washington. She has also completed a course in business French. She reads and writes French. 2
9 Dodsworth Anne Sales Representative Ms. 01/27/66 11/15/94 7 Houndstooth Rd. London WG2 7LT UK (71) 555-4444 452 Array of VT_UI1 Anne has a BA degree in English from St. Lawrence College. She is fluent in French and German. 5

Logfile:
If you run this command on Feb 18th, 2001 the logfile would be created in:
logs/20010218/db2txt.log
INIT    |14:39:20.034 |====== Opening C:/dbtkxml/logs/20020228/db2html.log ======
DbTkXml |14:39:20.124 |ExecCmd: opendb Sample.mdb
DbTkXml |14:39:20.204 |ExecCmd: table Employees
DbTkXml |14:39:20.264 |ExecCmd: HTMLEXPORT
DbTkXml |14:39:20.304 |9 'Employees' Record(s) written to 'Employees.htm'

DbTkXml,DbXmlTools,DbXml,Database,Export,Import,SQL,MDB,XML,DTD,HTML,CSV,Access,Toolkit,
Table,Column,Field,Record,Index,Query,External Data,Save As,merge,synchronize,explorer,
Db2XML,Db2CSV,Db2Txt,Db2Html,DbLoad,DbExplorer,DbSql,DbQuery,DbScript,
Conversion,Automate,API,Windows,Microsoft,utilities,file,management,administration,
command,line,batch scipts, shareware