Home » Developer & Programmer » Application Express & MOD_PLSQL » Create Csv file (Oracle 11g,XP)
Create Csv file [message #613573] Thu, 08 May 2014 02:54 Go to next message
Xandot
Messages: 96
Registered: January 2014
Location: India
Member
Hello,

I have button (Download Excel) in my region so when user going to click on that button than the particular tabular form data should be downloaded in .csv file.
Please Help me out....


Thanks
Re: Create Csv file [message #613577 is a reply to message #613573] Thu, 08 May 2014 03:26 Go to previous messageGo to next message
Littlefoot
Messages: 19309
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Don't reinvent the wheel; Apex developers did that for you.

It is a tabular form, right? Open region settings, navigate to Report Attributes. Under the "Report Export" section, select "Yes" for "Enable CSV output" and - optionally - set separator, file name etc. Apply changes, and you're ready to go.
Re: Create Csv file [message #613580 is a reply to message #613577] Thu, 08 May 2014 04:16 Go to previous messageGo to next message
Xandot
Messages: 96
Registered: January 2014
Location: India
Member
Thanks for reply Littlefoot..

I totally agree with you but if my region is pl/sql(anonymous block) based than what'll be the steps for do the same ..
Re: Create Csv file [message #613582 is a reply to message #613573] Thu, 08 May 2014 04:46 Go to previous message
Littlefoot
Messages: 19309
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
In your first message you said:

Quote:

particular tabular form data should be downloaded in .csv file


Now you say that it is a PL/SQL region. How does the source look like (your PL/SQL code)?

If you can turn it into a PL/SQL function that returns SQL query, you can use Reports region (which has the export to CSV option). Otherwise, see what Scott Spendolini said in his Custom export to CSV.
Previous Topic: Hide Buttons On Region
Next Topic: dynamic action to email chart image
Goto Forum:
  


Current Time: Fri Jul 25 02:12:54 CDT 2014

Total time taken to generate the page: 0.30479 seconds