Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to access a database via ODBC and access this in MS Excel or OpenOffice, then exporting the database into a flat file?

The program I am accessing data only allows an ODBC connection in. Not sure what database it is.

share|improve this question
    
It's possible. What version of excel? That will change the instructions. –  JNK Aug 27 '10 at 15:09
    
It is Excel 2003 –  Daniel Aug 27 '10 at 15:41

2 Answers 2

up vote 3 down vote accepted

In Excel 2003, click on Data -> Import external Data -> Import Data.

alt text

Click on New Source, ODBC DSN and select choose your ODBC connection

alt text

share|improve this answer
    
+1 - Even with screenshots! :) –  JNK Aug 27 '10 at 17:10

I'll assume Excel 2007 and if it's different we can change the answer here. I'm also assuming MS SQL Server.

1 - Set up data connection. Data Tab -> From Other Sources -> From SQL Server

2 - Enter info into Wizard for SQL conneciton.

Your best bet to export to a flat file is to save your SQL table link to a new worksheet, then save that worksheet as a CSV or .TXT or whatever format you are after.

Let me know if you need more specifics.

share|improve this answer
    
It is Excel 2003 –  Daniel Aug 27 '10 at 15:42
    
Can I have specifics on doing this for Excel 2003? –  Daniel Aug 27 '10 at 15:44
    
Not sure what the backend database is, just that i can access it via ODBC. –  Daniel Aug 27 '10 at 15:49
    
@Sathya gave great directions here while I was at lunch! –  JNK Aug 27 '10 at 17:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.