Click to See Complete Forum and Search --> : Convert Access to Excel Format
SAMS
Sep 8th, 1999, 02:19 PM
I need to convert two of my tables - Compare & vendor from my database named DB2.Mdb. ( Cause i got around ten tables in DB2.mdb) How can I convert two of the tables (Compare and vendor)from DB2.mdb to excel format in two separate files in let say compare.xls & vendor.xls ??
Thks for your help & regards.
See the TransferSpreadsheet method in help. It's very nice.
SmithVoice
Sep 10th, 1999, 12:43 AM
You can't call TransferDatabase/SpreadSheet unless your users have a full copy of Access on their machine.
Use the actaul Jet SQL code that TransferSpreadSheet/Database is actaully using. Full simple details are at:
http://www.smithvoice.com/vb5expt.htm
(works for VB4 and higher, VC5 and higher, Jet2 and higher, DAO or ADOX2.1SP2
you'll like it.
------------------
http://www.smithvoice.com/vbfun.htm
TMess
Sep 10th, 1999, 04:11 AM
SmithVoice, you failed to mention the syntax for exporting to an Excel spreadsheet.
SmithVoice
Sep 11th, 1999, 11:42 AM
I figured it better to point to the page where all the export details are already listed, including how to override the ISAM defaults, how to do full conversions, plus the place where step by step demos give the full source code for any Excel export/import you might want.
I suggest you hit that page so that the full informatio is right there in front of you all at once.
http://www.smithvoice.com/vb5expt.htm
(There is no advertising and there are no charges for anything on the site. The export/import/convert information is fully detailed so it's best to look at it there than to put a quarter of it here.)
Hope this understandable. I think the click will be worth it.
------------------
http://www.smithvoice.com/vbfun.htm
SmithVoice
Sep 11th, 1999, 11:58 AM
Here, how easier can I make it for you <g>:
'db.execute "SELECT tbl.fields INTO [dbms type;DATABASE=path].[unqualified
'filename] FROM [table or tables]
Excel specifiers (to be put in the dbmstype argument) are:
Excel 4.0;
Excel 5.0; (Excel 5 and 95)
Excel 8.0; (Excel 97)
Excel 9.0; (Excel 2000)
Excel versions lower than 8.0 have an integer row limit so if you try to put more than 32000 records in a worksheet you will get "SpreadSheet Is Full" errors, if so either up the Specifier to Excel 8.0; which gives you a Long row limit (2 billion rows) or use a TOP 32000 in the Select clause.
The upper limit of Excel versions is determined by your ISAM dlls and Jet versions.
To have control over headers, named ranges, etc etc you can simply override the default registry settings with a temporary Schmema.ini, otherwise you get an Excel Worksheet (or Workbook with new/updated worksheet if you export to Excel 5.0 or higher) with the defaults, which are fine for 80% of all uses.
If you have any questions on any of this, please take the time to see the mentioned webpage.
-Robert Smith
Kirkland WA
------------------
http://www.smithvoice.com/vbfun.htm
SAMS
Sep 13th, 1999, 08:45 AM
Thks for all your help.
SmithVoice
Sep 14th, 1999, 10:47 PM
Just have to mention that no offence of "Flame" was intended in my responses, hence the "<g>" so if I offended I apologize.
-Smith
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.