Article View: borland.public.cppbuilder.database.ado
Article #114Re: import excel file to access database
From: Vassiliev V. V.
Date: Mon, 03 Sep 2007 09:54
Date: Mon, 03 Sep 2007 09:54
26 lines
2069 bytes
2069 bytes
Connect to Access database and execute: INSERT INTO MyTable(Col1, Col2) SELECT Col1, Col2 FROM [Sheet1$] IN ""[Excel 8.0;Database=c:\myxls.xls] [Sheet1] - named diapason, [Sheet1$] - sheet (if it does not work, try [$Sheet1]), [Sheet1$B5:C10] - cells range. //------------------------------------------ Regards, Vassiliev V. V. http://www.managed-vcl.com - using .Net objects in Delphi for Win32 + ADO.Net http://www.oledbdirect.com - The fastest way to access MS SQL Server, MS Jet (Access) and Interbase (through OLEDB) "Tomislav Hundric'" <rifnet@gmail.com> �������/�������� � �������� ���������: news:46dae1d4$1@newsgroups.borland.com... > Please help, > I need to populate database table from excel file. My database table has > same fields as excel file has columns. I use ADO connection to connect to > database. Can anyone give me some guide lines or example how to do this. > > Thanks in advance.
Technical Details
Message-ID:
<46dbd9c5@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<46dae1d4$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,da0a6137b1dabb49 X-Google-Attributes: gid10698b,public,usenet X-Google-Language: ENGLISH,ASCII From: "Vassiliev V. V." <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <46dae1d4$1@newsgroups.borland.com> Subject: Re: import excel file to access database Date: Mon, 3 Sep 2007 13:54:09 +0400 Lines: 28 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-RFC2646: Format=Flowed; Response X-Antivirus: avast! (VPS 000771-2, 02.09.2007), Outbound message X-Antivirus-Status: Clean NNTP-Posting-Host: 85.93.138.132 Message-ID: <46dbd9c5@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1188813253 85.93.138.132 (3 Sep 2007 02:54:13 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail