Problem solve Get help with specific problems with your technologies, process and projects.

Inserting data into Excel

How do I insert data from Oracle Database into an MS Excel spreadsheet? If you have Microsoft Query installed,...

you can choose Data->Get External Data->New Database Query to define a query run against an ODBC definition for your Oracle database. Typically, that takes too much time for me to set up. I typically just generate a flat file with the output from my Oracle database. In SQL*Plus, I issue something similar to the following:

set linesize 130
spool c:temporacle_query.txt
select * from my_table;
spool off

A file will be created that contains the output from SQL*Plus. I then choose File->Open in Excel and select the file that I created. Excel will recognize that this is a flat file and will start a wizard to map the data to columns in the spreadsheet. Follow along with the wizard and your data will be placed into the spreadsheet.

This was last published in May 2004

Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.