XLS and MDB file format interchange full Raiders

Source: Internet
Author: User
Tags contains mdb database query save file table name first row access database
Introduction recently, the network administrator on the server to give me a space, used to show some information. In order to facilitate the query on the network, they made a simple ASP query system, which is linked to an MDB format Access database, and before the network, data is used in Excel spreadsheet software to summarize the format for XLS, can the XLS file into MDB format? The first thought is to save the table file as an MDB format in Excel, but there is no database MDB format in the Save file type. So can you open xls with access? Although the result can be opened, but the establishment is a link to the table database, leaving the linked form file can not be opened, not a real MDB database! is the XLS format and MDB format not convertible? After some groping, finally found a solution to the way:

First, open Access database software, in the pop-up window, select "New Database" in the "Empty Access database", and then in the File New Database window set the database file name, where I enter "Djmessage" as the database name.

Click "Import ..." in "Get External data" under the "File" menu, and in the Open Import window, first select file type as Microsoft Excel . XLS), select the location of the XLS file in the look in range, then select the XLS file to convert, click "Import", open the Import Data Wizard window, according to this wizard, step-by-step to complete the import of data, specific steps are as follows:

First step, worksheet selection: From the worksheet that appears, select the worksheet (Figure 1) where you want to store the data. The second step, heading settings: In Excel, you will typically set column headings in the first row of the table, in this step, to set whether the first row of the table contains column headings, depending on the XLS table, or if the first row contains column headings, or if there are multiple row headings in the table, To delete these column headings before importing the data, the headers are imported into the database as data. The third step, data Save settings: This step by default settings, select the location of the data saved as "new table." Step fourth, field settings: If the first row contains column headings is checked in the second step, the column headings are displayed in field name, otherwise the names "Field 1", "Field 2" are displayed in field name. You can set the field name of the column as long as you re-enter the new name in field name (Figure 2). Fifth, primary key settings: Set the primary key on the one hand to avoid duplication of data, on the other hand can speed up the data query speed, and I want to build a database with ASP Web page query with, of course, to set the primary key, here is the "Use access to add primary key" default setting. Step sixth, table name setting: Create a table name under "Import to Table", import data into this table, I entered "mytable" as the table name, and then click "Finish" to end the data import. When you return to the Database window, you see that you have added a "mytable" datasheet so that the generated djmessage.mdb is a real database. Copy the Djmessage.mdb to the ASP page directory, debug the query system, all ok!

Figure 1

Figure 2

Said so much, finally the XLS file into an MDB format, and then, again, how to convert the MDB to XLS format, after all, table files in editing, typesetting, printing and so on, than the database files easy to start. The MDB XLS format is relatively simple, open the database file Djmessage.mdb, select the "MyTable" table, and then click Export in the File menu, and in the Open the Export Table MyTable to window, select the Save file type as " Microsoft Excel 97-2000 (.xls) (Figure 3), enter a filename, and then click Save to convert the MDB file in the database format to an XLS file in tabular form.

Figure 3



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.