Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Convert Oracle data to EXCEL
Hi,
Yes, that will work well. For another, free "no strings attached" ODBC solution, you can consider XLODBC which allows retrieving data thru a macro and works well if you are a programmer. This solution works well with Pivot tables as well. Here's an example of a subroutine that's called from a "spreadsheet open" event handler:
Dim Chan As Variant
Dim SqlString As Variant ' A variant instead of string allows for
larger SQL queries
' Establish a connection to DBNAME given user ID and password Chan = SQLOpen("DSN=<DBNAME>;UID=<USER>;PWD=<PASS>")
' If there was a problem establishing a connection, ' SQLOpen will return an error to the variable Chan. If ' Chan is an error then call the procedure ' XLODBCErrHandler to display the error message. If IsError(Chan) Then XLODBCErrHandler Exit Sub
'Call GetSQLQuery to get an SQL query string SqlString = GetSQLQuery
Debug.Print SqlString
' Execute a query to retrieve the data SQLExecQuery Chan, SqlString
' Return the data to cell A1 on the active sheet. SQLRetrieve Chan, ActiveSheet.Range("A1"), , , True
' Close the connection to the data source. SQLClose (Chan)
End Sub
Good day,
Sal Elkadiki
sal_at_canterex.com
In article <91qa15$s4n$1_at_nnrp1.deja.com>,
gjlinker_at_my-deja.com wrote:
> To avoid all the hassles to plonk the data into csv files and read
them
> back in I wrote SQL*XL, the Oracle to Excel link.
>
> SQL*XL adds a new menu item to Excel. In a dialog box you type your
SQL
> and the data flows directly into your spreadsheet. All nicely
formatted
> and fully integrated with Excel. You can use Excel cells in queries,
> prepare your SQL on spreadsheets, etc, etc.
>
> SQL*XL is available from www.oraxcel.com
>
> Download your free copy now! http://www.oraxcel.com/projects/sqlxl
>
> Kind regards, Gerrit-Jan Linker
>
> In article <91bmro$mks$1_at_nnrp1.deja.com>,
> elkadiki_at_my-deja.com wrote:
> > You can separate your results with a comma, i.e.:
> >
> > select col1, ",", col2, "," col3 from table .....
> >
> > Then you can rename your output to <file_name>.csv and Excel will be
> > able to open as a "Comma Delimited File" or CSV.
> >
> > So, SQL*Plus will work with this solution. Also, if you can get
SQL-
> > Navigator by Quest software you can export to a file in CSV.
> >
> > Good luck,
> >
> > Sal Elkadiki
> > E-mail: elkadiki_at_hotmail.com
> >
> > In article <919fnh$sn5$1_at_nnrp1.deja.com>,
> > amycooley_at_my-deja.com wrote:
> > > Anyone knows how you can convert Oracle data to Excel ? SQL Plus
is
> > > not very user friendly. Thanks.
> > >
> > > Amy Cooley
> > >
> > > Sent via Deja.com
> > > http://www.deja.com/
> > >
> >
> > Sent via Deja.com
> > http://www.deja.com/
> >
>
> Sent via Deja.com
> http://www.deja.com/
>
Sent via Deja.com
http://www.deja.com/
Received on Thu Dec 21 2000 - 16:10:00 CST