Convert XLS and MDB file formats using Access

Source: Internet
Author: User
Tags mdb database
Recently, the Network Administrator assigned me a space on the server to show some information. In order to facilitate the query on the network, we made a simple ASP Query System, which is linked to the Access database in the MDB format, documents are summarized in Excel form. The format is XLS. Can you convert the XLS file to MD?

Recently, the Network Administrator assigned me a space on the server to show some information. In order to facilitate the query on the network, we made a simple ASP Query System, which is linked to the Access database in the MDB format, documents are summarized in Excel form. The format is XLS. Can you convert the XLS file to MD?

Recently, the Network Administrator assigned me a space on the server to show some information. In order to facilitate the query on the network, a simple ASP query system is created, in which the link is MDB.FormatBefore the network is built, the documents are summarized using the Excel table software,FormatXLS.FileConversionFor MDBFormatWhat about it? The first thing that comes to mind is to set up a table in ExcelFileSave as MDBFormatBut in the "SaveFileType, but no database MDBFormat. Can I use Access to open XLS? Although the results can be opened, a database linked to the table is created to exit the linked table.FileIt cannot be opened. It is not a real MDB database! Does XLSFormatAnd MDBFormatNo.Conversion? After some exploration, I finally found the way to understand the problem. The method is:

1. Open the Access database software. In the pop-up window, select "Empty Access Database" in "New Database", and then click"FileSet the database in the new database windowFileHere, I enter "DJMessage" as the database name.

2. Click"File"" Import... "in" Get external data "under the menu. In the" import "window that opens,FileSelect "Microsoft Excel (?. Xls), select XLS in the search rangeFileAnd then selectConversionXLSFile, Click "import", open the "Import Data wizard" window, follow this wizard to complete data import step by step, the specific steps are as follows:

Import data table wizard

Step 1. Select a worksheet: select the worksheet to store data from the displayed Worksheet (1 ). Step 2: Set the title: In Excel, the column title is usually set in the first row of the table. In this step, according to The XLS table, set whether the first row of the table contains the column title. If the first row column title is selected, select "the first row contains the column title". If the table contains multiple row and column titles, delete the headers of these columns before importing data. Otherwise, the headers are imported to the database as data. Step 3: Set Data Storage: select "new table" as the default data storage location ". Step 4. Field settings: If "First row contains Column Title" is selected in step 2, the column title is displayed in "field name, otherwise, "field name" displays "Field 1", "Field 2", and other names. You only need to enter a new name in "field name" to set the field name (2) for this column ). Step 5: Set the primary key. On the one hand, to avoid data duplication, on the other hand, it can speed up data query. The database I want to create is used in combination with ASP Web page query, of course, you must set the primary key. Here, the default setting "add a primary key with Access" is selected. Step 6: Set the table name: Create a table name under "import to table" and import the data to this table. I enter "mytable" as the table name, click "finish" to end the data import. Return to the Database window and you will see that a "mytable" data table is added, so that the generated DJMessage. mdb is a real database. Copy DJMessage. mdb to the ASP Webpage directory and debug the system. Everything is OK!

Import data table wizard

Import data table wizard

After talking so much, we finally put the XLSFileConvert to MDBFormatNow, let's talk about howConversionIs XLSFormatAfter all, the tableFileCompared with databases in terms of editing, formatting, and printingFileEasy to use. MDB to XLSFormatIt's much simpler to open the database.FileDJMessage. mdb, select the "mytable" table, and click"File"Export" in the menu. In the "Export mytable as" window, saveFileSelect "Microsoft Excel 97-2000 (?. Xls) "(3), inputFileName, and click "save" to save the database.FormatMDBFileConversionXLS in table formatFile.

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.