Turn the FoxPro database into an HTML table

Source: Internet
Author: User
Tags date chr
Data | database
The WWW web page of the Internet has a large number of two-dimensional tables, some of which are converted from a database. The author has written a program to automatically realize the database file into the Hypertext table, which is very efficient and is introduced to readers. The design idea of the program is simple: open. DBF database, which reads each field of the database in record order, and then adds the table control character of the HTML file to the. html file in hypertext format. The author's program is written in Visual FoxPro5.0 and can be used under FoxPro versions. The sample database is TAXED.DBF, the source program list and the generated hypertext file tax.htm list are appended.

*pragram:dbf2htm.prg
* Table structure: TAXED.DBF
* Field Name type width decimal *swdjzh character type 9
(Tax registration certificate number) *QYMC character 20 (Enterprise name) *tbrq Date type 8
(Date of filling out) *sz character Type 10 (tax) *ynsk numeric type 8 2 (taxable species)
Set Talk off
Set Safe off
CR=CHR (+CHR) (10)
Text=″〈!--a HTML table convented from taxed.dbf--〉
″+cr
Text=text+″〈html〉″+cr
Text=text+″〈head〉″+cr+″〈title〉 Tax Situation Statistics
〈/TITLE〉″+CR;
+″〈/head〉″+cr
Text=text+″〈body〉″+cr+″〈table BORDER=1〉″+CR
Text=text+″〈caption〉 Tax situation Statistics 〈/CAPTION〉″+CR
TEXT=TEXT+″〈TR〉″+CR;


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.