How to open a DBF File in Excel

Source: Internet
Author: User

Although Excel has become the most common data table software, it is still widely used in DBF format. In addition, Excel is not compatible with some files in DBF format. When you open them, an "unrecognized file format" error occurs. How can this problem be solved? Simply put, the software used to create DBF Files has gone through four stages: dBase, FOXBASE, Foxpro, and Visual FoxPro, although the file extensions produced by these software are DBF, but its internal format is not the same (the format mark is the first byte of the file), there are a total of eleven. Before Visual FoxPro 3.0, the DBF file is called a database, but since Visual FoxPro 3.0, the DBF file is called a data table file. Its file format is 30 or 31 (in hexadecimal format ). The DBF file that cannot be correctly opened in Excel is the latter. In practice, I found that excel only recognizes the first byte when identifying the specific format of the DBF file, so we only need to mark the file format as 30 or 31 as 03 (hexadecimal ), in Excel, you can open the DBF File correctly. The above modification method is only applicable to DBF data table files that do not include complex data types such as remark Type and general type. If the DBF data table file contains complex data types, data loss may occur when the modified file is opened in Excel. Using hexadecimal editing software such as winhex, you can easily modify files. Without such software, you can also use a smallProgram: Debug. If you feel it is a little difficult to use this tool, you can use the following method: Suppose you want to modify the table file student. DBF under C:/database/Fox. First, use the original scripts to generate the pure text file modify.txt (stored in the C:/database directory). The file content is as follows: n C:/database/Fox/student. DBF l e 100 03 w q second, enter the MS-DOS mode (command prompt in Windows 2000 and later versions), type the following command at the command prompt: Debug <C: /database/modify.txt can be easily modified. If you want to modify a table file, you must modify the two absolute paths.

 

 

More TechnologiesArticleSee Shi Changquan's personal website: http://www.joyvc.cn

 

 

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.