mdb -> xls

P

pm

hello

does anybody know how can i convert access mdb into excel xls file
(mdb table into xls sheet)

is it possible at all

i have almost 100 mdbs to convert

best regards

ps. i hope i wrote on proper newsgroup (if not, please write what
group is best to write abou this problem)
 
A

Allen Browne

This question is a bit like asking, "How do I turn a shopping centre into a
hospital?" Except that the structure of Access and Excel are more different
than the structure of the building you are trying to convert.

You can export tables from Access to Excel with the TransferSpreadsheet
action/method. But that answer does not begin to deal with converting the
relational structure in Access to the flat-file structure in Excel, what to
do with the SQL queries, how to recreate the forms in Access and even
whether that is appropriate in Excel, what to do with all the reports in
Access, how to convert the Access macros which are completely different than
Excel macros, and re-writing all the VBA code as Excel VBA is very different
with different libraries and object models.

Have you even considered whether Excel is the right tool for the job for all
of these applications? Sorry: I probably should not have answered this
question as it makes no sense to me.
 
R

Roger Smith

You can right mouse click on the table and choose EXPORT. from there you can
name file, save it where you want . to make it an XLS just change the file
type to the proper excel version you need
 
R

Rajesh V R

I had been wondering since a long time for such a solution and i had
eventually worked out one!

I may not be very good at it but i am sure posting it here would let me know
if there are any implications

This is the prototype of the function i use to export any table at any moment
in the database through the front end using command buttons. note that the
output file name when left blank in ms office xp (i dont know about other
versions) prompts file save browse dialog.


'this function takes the table name as input and returns 0 if command was
successfully completed

Public Function tbl2xls(strtblname As String) As Integer

On Error GoTo tbl2xls_Err

DoCmd.OutputTo acTable, strtblname, acFormatXLS, "", True, "", 0

tbl2xls = 0

tbl2xls_Exit:
Exit Function

tbl2xls_Err:
tbl2xls = Err.Number
Resume tbl2xls_Exit

End Function

If you want to export all the tables in your database, then use (DAO)
Application.currentdb.tabledefs collection (.connect property of it) to
browse through the current database tables and exporting can be done through
code hundreds of tables! {this logic enables retreiving all the table names
http://www.mvps.org/access/tables/tbl0007.htm )

Regards

pls post your opinions...





Roger said:
You can right mouse click on the table and choose EXPORT. from there you can
name file, save it where you want . to make it an XLS just change the file
type to the proper excel version you need
[quoted text clipped - 9 lines]
ps. i hope i wrote on proper newsgroup (if not, please write what
group is best to write abou this problem)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top