Query on Export to Excel- Help needed
Hi All,
I wanted to know if we can set a hidden field value when user clicks on the "export to excel" link in the reports.
I am using the Apex Export feature itself. Is it possible to set an item value when user clicks on the link?
If yes then how can we do it? If no can you please let me know the other options available?
Thanks,
Sumana
Thanks Denes!
I understood how to trigger the process on click of the export to csv link. As of now i will implement that in my application..
I just wanted to know if "the" dialog box could be controlled.
But later maybe,( if my client really needs it...), I will have to use my custom export to excel option. I have even downloaded your download-excel.
But it says that it cant be used for pl/sql returning function....
Is there a workaround on that?
And I will tell you the difference it makes to my application.
Current Requirement: I need to track the information (for e.g say user id's) that have been sold to a customer. I am doing this by inserting the data exported by user to the table. This must happen only when user saves the file. Only when user saves the file, the information is considered as "Slod".
Now if the user click on export to csv link but simply opens or cancels the file download, that information is not considered as "Sold"
Hence my need, that i could control the dialog box. Hope this clears your doubt.
Regards,
Sumana
Similar Messages
-
XML Generation using a sql query in an efficient way -Help needed urgently
Hi
I am facing the following issue while generating xml using an sql query. I get the below given table using a query.
CODE ID MARK
==================================
1 4 2331 809
2 4 1772 802
3 4 2331 845
4 5 2331 804
5 5 2331 800
6 5 2210 801
I need to generate the below given xml using a query
<data>
<CODE>4</CODE>
<IDS>
<ID>2331</ID>
<ID>1772</ID>
</IDS>
<MARKS>
<MARK>809</MARK>
<MARK>802</MARK>
<MARK>845</MARK>
</MARKS>
</data>
<data>
<CODE>5</CODE>
<IDS>
<ID>2331</ID>
<ID>2210</ID>
</IDS>
<MARKS>
<MARK>804</MARK>
<MARK>800</MARK>
<MARK>801</MARK>
</MARKS>
</data>
Can anyone help me with some idea to generate the above given CLOB messagenot sure if this is the right way to do it but
/* Formatted on 10/12/2011 12:52:28 PM (QP5 v5.149.1003.31008) */
WITH data AS (SELECT 4 code, 2331 id, 809 mark FROM DUAL
UNION
SELECT 4, 1772, 802 FROM DUAL
UNION
SELECT 4, 2331, 845 FROM DUAL
UNION
SELECT 5, 2331, 804 FROM DUAL
UNION
SELECT 5, 2331, 800 FROM DUAL
UNION
SELECT 5, 2210, 801 FROM DUAL)
SELECT TO_CLOB (
'<DATA>'
|| listagg (xml, '</DATA><DATA>') WITHIN GROUP (ORDER BY xml)
|| '</DATA>')
xml
FROM ( SELECT '<CODE>'
|| code
|| '</CODE><IDS><ID>'
|| LISTAGG (id, '</ID><ID>') WITHIN GROUP (ORDER BY id)
|| '</ID><IDS><MARKS><MARK>'
|| LISTAGG (mark, '</MARK><MARK>') WITHIN GROUP (ORDER BY id)
|| '</MARK></MARKS>'
xml
FROM data
GROUP BY code) -
Hi All,
I need some suggestions in using "Export to CSV"
Situation is as follows:
I have a report that gets dispalyed based on many search condiitions. Once the report is dispalyed, and the user clicks on Export to CSV link, i set a hidden item value as 1. My CSV link looks like this(I use this instead of the custom #CSV_LINK#) -
href="f?p=&APP_ID.:&APP_PAGE_ID.:&APP_SESSION.:FLOW_EXCEL_OUTPUT_#REGION_ID#_en-us:::P0_capture_export:1:" >Export to Spreadsheet
Based on this value I have written a pl/sql process that inserts data into table. If this has to be executed, the page needs to be submitted if i select process point as "On Submit". Or the page needs to be reloaded if i select process point as "On Load".
But the problem is that, when user clikcs on "export to csv link" the page is not submitted, and neither is it reloaded.
I need the page to be submitted only after the file dialog box appears.
Any idea how this can be achieved? I tried Javascript reload. This only reloads the page and ignores the "Export request".
Please help. Any suggestions are welcome.
Thanks,
Sumana
Message was edited by:
SumanaSumana,
What you may want to try is to have your custom link submit the page, run your onSubmit process, and then re-direct to another page where you could roll your own CSV export procedure and execute that in a before header process.
You can use the same item references on the second page, so that your exported report has the same data as your displayed report.
See my blog posting on creating custom CSV exports here: http://spendolini.blogspot.com/2006/04/custom-export-to-csv.html
Thanks,
- Scott - -
Script for export in datapump -- help needed !!!
hello all,
i am using the following script as batch file in my database for export
script:
=========
exp name/password file=d:\exp\%date%.dmp full=y log=d:\exp\exp.log an this will replace the first file(monday) on next monday.
similar way i need a script for data pump for full database export using datapump
thanks ,
goldlogin to database as a dba and create directory for your dumpfile path.
create directory dpump_dir as 'd:\exp';
and then use the below script for export.
expdp username/password full=y directory=dpump_dir dumpfile=%date%.dmp logfile=exp.log -
Automate query that export to excel
Hi,
I'm not sure if this is the right place to post this question... but....
I run some queries every day and export to an excel file and send by email every day, there is any way to make it automatic?
Do anyone have any suggestion?
Thanks,
Leandro TakedaYou can use Dump_Csv developed by tom kyte. Below is the code that i modified for my requirement.
create or replace function dump_csv( p_query in varchar2,
p_separator in varchar2
default ',',
p_dir in varchar2 ,
p_filename in varchar2 )
return number
AUTHID CURRENT_USER
is
l_output utl_file.file_type;
l_theCursor integer default dbms_sql.open_cursor;
l_columnValue varchar2(2000);
l_status integer;
l_colCnt number default 0;
l_separator varchar2(10) default '';
l_cnt number default 0;
l_colDesc dbms_sql.DESC_TAB;
begin
l_output := utl_file.fopen( p_dir, p_filename, 'w' );
dbms_sql.parse( l_theCursor, p_query, dbms_sql.native );
for i in 1 .. 255 loop
begin
dbms_sql.define_column( l_theCursor, i,
l_columnValue, 2000 );
l_colCnt := i;
exception
when others then
if ( sqlcode = -1007 ) then exit;
else
raise;
end if;
end;
end loop;
dbms_sql.define_column( l_theCursor, 1, l_columnValue, 2000 );
l_status := dbms_sql.execute(l_theCursor);
dbms_sql.describe_columns(l_theCursor,l_colCnt, l_colDesc);
l_separator := '';
for lColCnt in 1..l_colCnt
loop
utl_file.put( l_output, l_separator || '"' || Upper(l_colDesc(lColCnt).col_name) || '"');
l_separator := p_separator;
end loop;
utl_file.new_line( l_output );
loop
exit when ( dbms_sql.fetch_rows(l_theCursor) <= 0 );
l_separator := '';
for i in 1 .. l_colCnt loop
dbms_sql.column_value( l_theCursor, i,
l_columnValue );
utl_file.put( l_output, l_separator || '"' ||
l_columnValue || '"');
l_separator := p_separator;
end loop;
utl_file.new_line( l_output );
l_cnt := l_cnt+1;
end loop;
dbms_sql.close_cursor(l_theCursor);
utl_file.fclose( l_output );
return l_cnt;
end dump_csv;Thanks,
Karthick. -
3-d array to xlsx file (excel) - help needed
Hi guys,
i've a question for you...
i would save an excel file (.xlsx) having as input my 3-d array...i would that first dimension are my excel worksheets and then the other 2 dimensions are the data inside each worksheet.
I know that there is the report generation toolkit, and i would use it....but i don't know in which way
could you help me?
Many thanks and nice holidays!
PS: i use labview 2009Gianluca1985 wrote:
Many thanks and nice holidays!
Curious... what holidays?
Go here and click the Download button.
It's pretty easy to use and the VIs are very straightforward. You probably want the Excel Specific VIs Excel Easy Table and Excel Add Worksheet.
Report back after you've played around with the toolkit a bit.
As far as the 3D array goes, you're going to want the first subarray to be the worksheets (it will actually be a 1D array of worksheet names, right?), so you would index your array twice to get a 1D array of strings.
Next to get each set of data, you're going to get the Index 1 value from the array and so on. Index 1 will be a 2D array data for the first worksheet, Index 2 will be the next 2D array and so on. -
Query about previous days..Help needed
Hi,
I have a scneario in which I want to get the sunday's date for 5 weeks after today's date as
expiry date.
i.e., If this sunday is '14-Sep-08' expiry date will be '19-Oct-08'
(As it is 5 weeks ahead of the present sunday)
I am getting this as NEXT_DAY(SYSDATE,'SUNDAY')+35;
Now, I need to get the expiry date for the previous sunday.
How can I acheive this.
Thanks in advance.
Regards
RaghuNo, because it's easily doable with next day:
-- Next Sunday (excluding today if today is Sunday):
select trunc(next_day(sysdate, 'SUNDAY')) next_sunday from dual;
NEXT_SUNDAY
14/09/2008
-- Last Sunday (= today if today is Sunday):
select trunc(next_day(sysdate-7, 'SUNDAY')) last_sunday from dual;
LAST_SUNDAY
07/09/2008NB: If you're wanting next sunday to display today's date if today is Sunday, then subtract 1 from the date you're doing the next_day on, eg:
select next_day(to_date('14/09/2008', 'dd/mm/yyyy'), 'SUNDAY') next_sun_excl_today,
next_day(to_date('14/09/2008', 'dd/mm/yyyy') -1, 'SUNDAY') next_sun_incl_today
from dual;
NEXT_SUN_EXCL_TODAY NEXT_SUN_INCL_TODAY
21/09/2008 14/09/2008 -
QuickTime - Save Export Settings - script help needed
Currently I am using Panther 10.3.9 - with QT PRO 7.02 - ( I do not want to
upgrade to Tiger at this time unfortunately)...
* MY GOAL: to be able to save export preferences in QuickTime pro.
Since QuickTime does not seem to be able to save export presets... I
downloaded the the script collection from
From: Scriptable Applications: Quicktime Player
Location: http://www.apple.com/applescript/quicktime/
and created export settings and tried ....
Save Export Settings.scpt
... but the file that got saved will not open in QT PRO - OSX and wants to
open something from old os9....
what do I do?= = = (see scripts below)
* here is my basic workflow ...
- load a QuickTime movie
- adjust the QuickTime movie export settings
- save a test copy ( validating the settings)
- run the "save export settings.scpt" with name "set1test"
Then
- open and run the "Export QuickTime movie.scpt" with the name " test movie"
- run the new test movie - and when I check info - it does NOT reflect the desired settings...
= = =
One issue is - this line...
export movie 1 to new_file as QuickTime movie using settings "set1test"
... It doesn't seem to care what the settings file name is - and if I change that name to a nonexistent name - it still exports the movie without an error.... Therefore it leads me to believe that it's not using it to begin with....
- another issue is that the settings file "set1test" says it is the kind = "QuickTime settings document" - however it has a blank icon in the Finder - and there does not seem to be any way to open the file with QuickTime 7.02 - and it can to open something classic mode when I double click on it.
= = = the Save settings script...
tell application "QuickTime Player"
activate
try
if not (exists movie 1) then error "No movies are open."
stop every movie
set the target_file to choose file name with prompt "name & location for the QT settings file:"
save export settings movie 1 for QuickTime movie to target_file with replacing
end try
end tell
=== the Export QuickTime movie.scpt
tell application "QuickTime Player"
activate
try
if not (exists movie 1) then error "No movies are open."
stop every movie
set the movie_name to "mytest.mov"
if (can export movie 1 as QuickTime movie) is true then
set the new_file to ¬
choose file name with prompt "Enter a name:" default name movie_name
export movie 1 to new_file as QuickTime movie using settings "set1test"
end if
end try
end tell -
Export to Excel - data with leading zeros
Does anyone have any tips or tricks for running a query then exporting to Excel without dropping leading zeros from the data?
Examples: numeric Item codes with leading zeros, telephone numbers that have been entered with no spaces.
Regards,
Douglas McDove< Font Color="RED" Size = 3 Face=Verdana>
I liked the challenge and therefore.......I got this for you
</Font>
SELECT CHAR(28) + T0.CardCode [BP Code\] FROM [dbo\].[OCRD\] T0
SELECT CHAR(29) + T0.CardCode [BP Code\] FROM [dbo\].[OCRD\] T0
SELECT CHAR(30) + T0.CardCode [BP Code\] FROM [dbo\].[OCRD\] T0
SELECT CHAR(31) + T0.CardCode [BP Code\] FROM [dbo\].[OCRD\] T0
Any of the above 4 should work. T0.CardCode is the database field I tested, you can substitute this with any database field and it should work.
Regards
Suda -
Help needed in Export to Excel
Hi All,
I needed some clarifications/suggestions on using the export to excel.
1) When I click on export to excel, a <div> tag also gets exported. I came to know that this is becuse of selecting the "Enable Partail Page Refresh" to Yes. Now, I have pagination in my reports and I also need to export to CSV/Excel. Is there no way where in I can use PPR as well as export the report without the DIV tag?
2) I have a number column to which I have given APEX inbuilt hyperlinks. When I do an export the columns where I have given these links do not get Exported. Any way to overcome this? I cant give links in SQL query as then all number formatting would be lost.
3) In my report display I have colspan = "2" for some alternate rows. In my excel output I obtain these correctly but without colspan. Is it possible to merge the cells in excel output wherever there is colspan="2"? Or am I asking too much?
Any suggestions would be welcome. Please let me know what can be done to solve this.Hi
One solution which I've used before is to have a separate page for the export. Have a report on that page that uses the same query as the actual report (including any filters based on page items) and set the report to use the Export: CSV template. The Export link on the original page needs to be removed and replaced with a link to the new page. When you click the new link, the page opens as a download file automatically.
This way, you don't need to worry about pagination and you can use different fields on your export.
Andy -
Hyperion Workspace Financial Reporting Export to Excel Query-Ready Missing
Hyperion Workspace Financial Reporting Export to Excel "Query-Ready" option is Missing in the dropdown when you go to File>Export>Excel
Only the "Fully Formatted" option is available.
From what I recall this option for a "query-ready" export should be available from the HTML preview?
Is there something in configuration that needs to be enabled or something that needs to be checked on to get this option?
We are running 11.1.1.3
The Query-Ready option is available when exporting forms in Planning.
When opening Financial Reports in Smartview the option for "Query-Ready" is available.
For some reason this is not showing up in workspace, does it not exist in 11.1.1.3? Is this a bug?
TIAHi,
The option to export the financial report output in "Query-Ready" format is actually at the bottom right hand corner of the report page (look at the report footer) instead of File>Export>Excel.
Hope this helps
Genti -
Hi,
I am filtering SharePoint list view web part based on Query string parameter and I am doing Export to Excel by using following code.
<a href="#" onclick="javascript:window.location='../_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=0DC67399-BE11-48F3-ADFC-E911FB8B5845&View=54671412-3EFE-4281-835A-9EF747AE774E&CacheControl=1'"><img
alt="Excel" src="/_layouts/images/icxlsx.gif" border="0"/> Export to Excel</a>
Issue: Able to do Export to Excel when there are no filters applied on list view web part but if applied filters on web part and do export to excel , only header fields are displaying in the excel sheet.
I don't know why owssvr.dll is behaving like that .
Please share your ideas.
Thanks in Advance.Hi,
According to your post, my understanding is that you wanted to create hyperlink to export to excel.
The URL to execute the export is as follows:
{Site URL}/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List={List GUID}&View={View GUID}&CacheControl=1
After getting the GUID, you need to “decode” the list GUID.
Replace %7B with {
Replace %2D with –
Replace %7D with }
More information:
Create Link to Export Library Contents to Excel
SharePoint - Create a link to export to Excel
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
Please Help --Export to excel time out issue
500 Connection timed out
Hi Friends,
We have a query which runs about 3 minutes on web and brings bach 54000 rows , but when the user tries to export to excel It give timeout error as below.
Connection timed out (-5)
Error: -5
Version: 6020
Component: ICM
Module: icxxthr_mt.c
Line: 2467
Server: tepas0_abc_00
Detail: Connection to partner timed out
Please help me out.
Thanks a lot!Hi,
Check the info here:
https://forums.sdn.sap.com/click.jspa?searchID=5203764&messageID=959490
There are also a lot of other threads on time out issue...
Hope this helps... -
WAD Export to Excel, PDF parameters query export
Hi,
I solve the problem with export to excel in WAD. Customer want to see all parameters (and also filters in query) with which are query execute in query in export to MS Excel or PDF.
Any advices?
Thanks
PetrHi,
Take a copy of template 0ANALYZER, it will have all the components which have the web analyzer.
Check the below link for the same:
http://help.sap.com/saphelp_nw04/helpdata/en/0d/af12403dbedd5fe10000000a155106/frameset.htm
Hope this helps........
Rgs,
Ravikanth -
Need a query for export table data .....
Hi,
I need a query for exporting the data in a table to a file.
Can anyone help me ?
Thanking You
JeneeshSQL> spool dept.txt
SQL> select * from dept;
DEPTNO DNAME LOC
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
SQL> spool off
SQL> ed dept.txt
Maybe you are looking for
-
ASA 5505 rookie - can't ping remote site or vice versa
Hi, I'm trying to setup an ipsec from an ASA 5505 (8.4) to a Sophos UTM (9.2) Internet etc is up and accessible. Ipsec tunnel is up also but I can't pass traffic through it. I get this message in the logs: 3 Aug 05 2014 22:38:52 81.111.111.156 82.222
-
Purchase & Tax releated Report
Dear MM Gurus, From which T-Code I can get the report of Input VAT 1. (Local Purchase, Central Purchase, Import, Tax Exempted Purchase, Trading Purchase, Purchase Return) 2. Viewing - Stock Transfer Outward Register, ie, all details releted to Local
-
Problems with RAW files from Nikon D4
At the moment I'm using LR 4.1 rc and PS CS 6 beta. I tried to send a D4 raw file from LR to PS, but PS didn't open it. The next thing I tried was to open D4 raws directly with PS CS 6, no success either. The raw files from my D200 aren't any problem
-
My apple mobile phone was stolen, found in the repair station to change how to do
My apple mobile phone was stolen, found in the repair station to change how to do
-
Can I read a .msg file on the Mac?
I received a file with a .msg ending, which I gather is Microsoft Outlook. When I clicked on it, my Parallels opened, but I am having no luck opening the file in Parallels, and everything freezes up and is very slow when I try to open Microsoft Outlo