Discussion Locked

AUTO IMPORT OF DATA TO EXCELL

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

YOU ARE HERE > HOME > Discussion Center > Discussion

Discussion Center: Discussion

Discussion: IMPORT TO EXCELL FROM WINDOWS
Author: geoff.hall@afrox.boc.com
Date: 1/8/01

Message 1 of 1:

From: geoff.hall@afrox.boc.com
Date: 1/8/01

IMPORT TO EXCELL FROM WINDOWS
Hi
I am running Windows 95 and V7 of Excell
I am downloading an output file from oracle V7 and trying to load it onto a spreadsheet.
My objective is to do this automatically and use a macro to manipulate the data once in the spreadsheet.
I have read the help available and most of it deals with data coming from Access.
So far I can get the file loaded but not in column form.
It imports the data into a worksheet called Monitor.

monitor.sql
column tim format a10

set heading off feedback off linesize 300 pagesize 100

spool monitor.txt

select to_char(dat, 'MMDDHH24MI') tim,',',trans,',',business,',',uss,',',recursive,',',dml,',' ,commit,',',rws
frommonitor.gdhload;

spool off

exit

monitor.bat
Sqlplus monitor/monitor@ars01 @monitor
C:\MSOFFICE\EXCEL\EXCEL.EXE /r d:\geo\monitor.txt

9 replies

by melodyj

Hello,

I'm not sure how you're getting the data out of Oracle in the first place, but this might help. If you set up an ODBC connection to the Oracle database, you can connect to it and run SQL queries from Excel using MS Query. You should be able to add this to your macro.

Regards,
Melody

by geoff.hall

Thanks for your answer. I could use this at another time but at the moment I just need to pull in a file into excell using a normal bat file.

by highlander718

After you defined the ODBC to Oracle, you can import the data once, specifying all data,column and row formats using a pivot table. After that you can simply click refresh (!) every time you ned the data to be refreshed in the pivot table. I'm not sure if that's what you need but maybe it will help.

T.

by geoff.hall

Thanks for your answer. I could use this at another time but at the moment I just need to pull in a file into excell using a normal bat file.

by parier

I did this a few times for data from AIX or UNIX, to fulfill your request, I will need a copy of the document before it is imported and a copy of what you want it to look like. Please name then BEFORE and AFTER and send them to eparisek@mtga.com
Thank you.

This discussion is closed to new replies.