Hi,
Our company uses an Oracle driven database application (java through internet explorer).
At some point I can get reports in PDF for several predefined reports, but there isn't a way to retrieve the data from Oracle to an Excel spreadsheet, for easier post-processing.
Is there any feasable way of connecting directly to the server and grab data to an excel file (with PHP for example)?
Thanks in advance
Software/Hardware used:
Windows XP; Windows Server 2003; Apache+PHP; Oracle
ASKED:
January 10, 2011 11:18 PM
UPDATED:
February 16, 2011 4:25 AM
Through PHP code, it may possible. Though I till date I do not experience it. But I am working in PHP currently. Here is a good Resource that may help u. After opening this site, click on “Example”.
Thanks–
There could be many ways if you have the appropriate credentials, and the database can accept connections from the machine you are going to use to connect.
With Oracle client software installed you could use SQL*Plus to run your queries directly, spooling your query’s output to a CSV file.
Can you let us know why you state “there isn’t a way to retrieve the data from Oracle to an Excel spreadsheet”? Is it due to internal decisions or software restrictions? You can work directly with databases through OLE Db in Excel.
Sorry, carrying on from previous, you can also use VBA to create your dataset, without the need for setting up DSNs, and “transform” the data before populating the spreadsheet (dependant on what you want to do).
Hi,
thanks for your answers.
I basically wanted to try and have the output data in excel format, to be able to work with it easaily.
As I only have limited access to features, I don’t know if I could do it directly from Excel.
Thanks
We use Oracle10g forms the run Reports10g. The query in the report ends up as a CSV file , ready for use by Excel. Its not a difficult process to do. just create your query as a report. In the form, the REPORTS object is where you define the file and use the SET_REPORT_OBJECT_PROPERTY(v_rep_id,REPORT_DESFORMAT,’DELIMITEDDATA’)
One way i did it was to use forms10g to call a reports10g. the report had the account for the rows i needed in the Excel file. My forms10g used the SET_REPORT_OBJECT_PROPERTY (v_rep_id,REPORT_DESFORMAT,’DELIMITEDDATA’) and the SET_REPORT_OBJECT_PROPERT(v_rep_id,REPORT_DESNAME,’C:datadirectoryfilename.csv’);
This created a file with the .CSV extension that was easily imported into Excel
Our head programmer says that Discoverer can do it and that’s what we do. He builds an HTML that the end user can open. We run 10g App Server.