Query to Excel

I have a page that displays the results of a search query. I want to give users an option to export the results they see in Excel format by clicking on an icon.
How can I do?

I have a UDF that convert the query to Excel and takes the query as an argument. In any case I call after the page rendering?
Any suggestion is welcome.

Thank you

What you are looking for in this case, some form of Ajax features. There is a pile of resources out there on Ajax that you find with a little research on Google.

You could also accomplish this type of functionality using frames and 1 (or more) images invisible by setting their height 0. You can then direct action to the frame hidden - it keeps the current page visible while the hidden frame generates your excel.

Cheers.

Tags: ColdFusion

Similar Questions

  • Display of the results of query in Excel on the Web

    Hello

    I try to display data from a query in excel on the web without creating an existing file. I know I can create a CSV using UTL_FILE and post it but I was hoping there was a way to do it without actually creating the file. I have a procedure that resembles

    PROCEDURE displayAsCSV is
    cursor STUD_CURS is
    Select * from students;

    BEGIN
    for STUD_REC loop STUD_CURS
    HTP. Print (' "' |") STUD_REC. FIRST_NAME. » " , " '|| STUD_REC. LAST_NAME. » " ');
    end loop;
    END;

    Anyone know if it is possible to display these results in excel in the browser by altering the MIME types or something similar?

    Thank you

    Check Tom owa_sylk utility with the appropriate mime type.

  • Export a dynamic query to excel

    Hello

    I want to export the result to a dynamic query to Excel button.
    I have a model of search where users want to export the query results by clicking a button in an excel file.
    Is this possible?

    Hello Dan,.

    Yes, a query as session variable works fine. Thank you very much for the help!

  • Query the Excel problem

    Hello

    I have create a cfm to export the data of my query, qOrds (coming from my cfc).

    In fact, I have a button in flex that when I click, needs to export data to Excel for my request.
    My flex button calls the following function:

    My function in Flex

    public void RetrieveExcel (): void
    {
    var urll:URLRequest = new URLRequest (" http://bang:8500/dcsnew/Export2xls.cfm"); ")

    navigateToURL (url, "_blank");

    }




    TextHERE's my Exportt2xls.cfm

    < cfinvoke component = "mycfc.cfc" method = "getOrds" returnvariable = "qOrds" > "
    < name cfinvokeargument = "mydate" value = "#url.mydate #" >
    < / cfinvoke >

    < CFCONTENT TYPE = "application / vnd.ms - excel" >
    < name cfheader = "Content-Disposition" value = "filename = report.xls" >

    < cfquery name = "exportdata" dbtype = "query" >
    SELECT *.
    OF qOrds
    < / cfquery >

    < table >

    < cfoutput >
    < b >
    < cfloop list = "" #exportdata.columnlist # "index ="TDFIELD">"
    < td > #TDFIELD # < table >
    < / cfloop >
    < /tr >
    < / cfoutput >

    < cfoutput query = "exportdata" >
    < b >
    < cfloop list = "" #exportdata.columnlist # "index ="COLUMNNAME">"
    #exportdata [COLUMNNAME] [exportdata.currentrow] # < td > < table >
    < / cfloop >
    < /tr >
    < / cfoutput >

    < cfreturn > #exportdata #.




    I have an argument to date I want to spend at the MTC.
    But when running the function, it gives me the following error:

    "Mydate element is undefined in URL."

    Where I have to pass the variable "mydate" in my flex code.

    Any help would be much appreciated.



    "var urlString:String = http://bang:8500/dcsnew/Export2xls.cfm?myDate= ' + myDataVar;
    var url: URLRequest = new URLRequest (urlString);

  • Problem by querying the Excel XML spreadsheet (namespace)

    Hello

    I have a file of Excel (2003) recorded as XML spreadsheet that I wish I could query in the database (10 gr 2) using extract/extractvalue. Somehow, the definition of this file namespace is preventing me from reading the values in the file. The excerpt/extractvalue function returns empty values (NULL). Can someone help me with an example how to query individual nodes in this file?

    Here is the query/XML:
    WITH x AS
         (SELECT HTTPURITYPE ('http://www.dataliberation.nl/newnxl/docs/F2083/xmltestsheet.xml').getxml () xmldoc
          FROM   dual)
    select  extract(xmldoc,'/Workbook/DocumentProperties','xmlns="urn:schemas-microsoft-com:office:office"') doc_properties
    ,       extractValue(xmldoc, '/Workbook/DocumentProperties/Author')      author
    from   x
    Thanks in advance,
    Christian

    I originally written/tested on 11.1.0.6, but I just it ran cleanly on 10.2.0.4 as well.

  • #s around hyperlink on query related

    Hello

    I have an Access query that contains, among other things, a field that contains a hyperlink. When I have a link to this query in Excel, the address (web address for a pdf file that has been uploaded to our website) is a symbol # in the beginning and at the end of the address. Why? I tried to use the code to remove these symbols # but a type mismatch error.

    Any suggestions?

    Thanks in advance.

    Hi dcornett,

    According to your description, I would say that you re - ask your question in the MSDN forum rather than on this forum. MSDN is watched by other developers who would more than likely be able to help.

    http://social.msdn.Microsoft.com/forums/en-us/windowsgeneraldevelopmentissues

    Hope this information is useful.

  • Dynamic creation of tables based on Excel:

    Dear Experts,

    I have a requirement like this can you help me on this you can

    I have some sheets with excel data. I want to create dynamic tables based on the spreadsheets excel and that excel spreadsheets this specific data should be imported into this table. How can I achieve this?

    Is it possible to make this one

    Please help me on this

    983563 wrote:

    Can you guies give any sample format so that I can try from here

    Mukesh seems to talk about using Excel to connect to Oracle and Excel create tables and insert data, such as a client application.

    However, this is not what you're asking.

    The examples you need are in the links that Anton has provided, which describe in detail how to set up a heterogeneous service (or whatever now calls Oracle 11 g go - they have changed the name), and then you can query the Excel workbook as if each worksheet is a table, with the first line of each leaf with column names.  You can even search the workbook to see what "tables" (sheets) exist and what "column names" (first row labels), use select standard... from queries of type user_tables@excel (once you have configured your heterogeneous service).

    As Marty said well, what is the purpose to do this dynamically, as dynamically created tables will require code created dynamically for use.

    An application design and database well-designed will dictate what data formats and tables are at design time.

  • How to connect Microsoft excel to oracle database?

    version Oracle 11.2.0.3
    version of solaris 10 operating system
    Microsoft excel 2007

    any body can help me how to connect excel, oracle database, I can write my query in excel, and retrieve data from oracle database and show in excel sheet or I can write a query to insert data to the oracle database.

    Hello

    I never tried, but why not try so if you succeeded you will come to know otherwise you would need still oracle client to connect to the oracle database that is located on the other server or if you do not have to install on your local machine that you cannot connect to the oracle database oracle client.

  • Newbie: is it possible to automate export to Excel

    Hello

    In my organization, we usually export a query to Excel.

    I was wondering if there was a way to automate this step.

    My hope is to have the application on demand and then using Microsoft Access VBA, I would still be working with the
    data.

    Pls advise, thx, Sandra

    Hello

    You can automate the export to Excel by running Office to the discoverer of a VB script or .bat file. Not very well why you would use Microsoft Accesss VBA.

    Rod West

  • xlsx export fails to lines 25 526

    SQL Developer: 3.1.07.42
    JRE: Installed with above (32-bit)
    OS: Windows 7

    Hi all
    I'm trying to export a query to excel in .xlsx format.
    The query returns the 27 columns and about 55 000 lines. However, I can't export .xlsx past the 25 526 lines.
    As he approaches the bar of 20 k, it starts to get slower and slower, until it exports simple rows, then stops and breaks down.

    SQLDeveloper has to return only 50 rows of a query, but I retrieve all the rows and then perform the export.
    I have the same problem if I try to export the data after the return of the original request of the 50 line.

    See you soon,.
    Russell.

    Published by: Russell H. 14/08/2012 22:40

    Published by: Russell H. 14/08/2012 22:41

    You're more likely, short-term memory when exporting.

    There are a few things you can do to alleviate this problem. You can increase the memory allocated to the JAVA virtual machine (which I've done and works very well.)

    Or, you can use a method less memory intensive export as CSV, then open Excel and save as a XLSX.

    We're investigating optimizing Excel export for a future version.

  • Error loading data with a rule in 11.1.2.1 file loading

    When I do the dim the Parent child build and alias will not load?

    Rule reading information SQL for the database [DP]
    Rule of reading of the purpose of the database rule [DP]
    Active parallel loading: [1] block to prepare the discussions, block [1] write discussions.
    DATAERRORLIMIT reached [1000]. Rejected records will be is more connected
    No value data modified by this data file loading
    Data load time for [Accounts01.txt] with [ACCOUNT.rul]: [0.512] seconds
    There were errors, look in C:\Oracle\Middleware\EPMSystem11R1\products\Essbase\eas\client\dataload.err
    Completed import data ['RPIWORK'.'] [DP ']
    Out of the prepared columns: [0]

    Outline = measurement Demension

    Measure
    Balance sheet
    Profit & loss

    Data file

    is a SQL query
    to Excel and save it as a text (delimited by tabs)

    Account.txt

    Parent | Child | Alias
    Total assets of the balance sheet 10000
    Total liabilities of the balance sheet 20000
    Balance Sheet Total 30000 of the owner
    Profit & loss 40000 recipes
    Profit & loss 50000 cost of goods sold
    Profits & losses 60000 S.G./A.
    Profit & loss 70000 other operating income
    Profit & loss 80000 other expenses
    Profit & loss 85000 interest income/expenses
    Profit & loss 90000 taxes
    Profit & loss 99000 capitalized Contra
    10000 10100 short-term assets
    10000-14000 «wood, forest and roads land»
    10000 17000 "goods, materials and equipment.
    10000 to 19000 active other long-term
    10000 19750 deferred tax assets
    20000 20001 short-term liabilities
    20000 21200 other Long term liabilities
    20000-22000 timber contracts
    20000 25100 long-term debt
    20000-26000 deferred tax liability
    30000 Equity subsidiary 30001
    30000 30250 voting common shares
    30000 30350 according to Common Stock
    30000 30450 capital paid in additional
    30000 30550 retained earnings
    30000 30610 other comprehensive income items
    30000 30675 tax distribution to Shareholde
    40000 40055 wholesales
    40000 41500 chips recipes
    40000 43000 power sales
    40000 nursery 45000 income
    40000 46000 transfer logs
    40000 47000 Intraco sales
    40000-49000 sale deduction
    50000 Labor 51000
    50000 52000 raw
    50000 rental 52800
    50000 53000 operating expenses
    50000 53900 forestry supplies
    50000 capitalized 53999 Contra-forestry
    50000 maintenance 54000
    50000 55000 fuels & lubricants
    50000-56000 utilities
    50000 57000 cost of direct registration
    50000 57500 personalized services
    50000 impoverishment 57700
    50000 58000 cost allocations of goods sold
    fixed cost 50000 59000
    50000 59510 changes in inventories
    60000 60100 salaries
    60000 60300 maintenance of PC hardware
    60000 60400 other G & A
    61000 60000 licenses/fees/charges
    60000 61400 benefits not
    60000 61550 furniture/fixtures
    60000 legal 61750
    60000 62000 fresh office
    60000 62500 professional services
    60000 63000 activities pre & Post jobs
    60000 63200 telecommunication costs
    60000 63550 employee activities
    60000 63800 sales & Promotions
    60000 63900 banking questions
    60000 64000 Admin depreciation
    60000 64500 insurance and property taxes
    60000 65000 allowances S G & A
    60000 66000 outside management
    70000 70100 rental income
    70000 disposals of fixed assets 70200
    70000 70400 Misc income
    80000 80200 factory inactive
    85000 85001 interest expense
    85000 85200 interest income
    90000-90100 income tax charges

    error file

    ------20000 not found in the database members
    20000 25100 long-term debt

    ------20000 not found in the database members
    20000-26000 deferred tax liability

    ------Member 30000 not found in the database
    30000 Equity subsidiary 30001

    ------Member 30000 not found in the database
    30000 30250 voting common shares

    ------Member 30000 not found in the database
    30000 30350 according to Common Stock

    ------Member 30000 not found in the database
    30000 30450 capital paid in additional

    ------Member 30000 not found in the database
    30000 30550 retained earnings

    ------Member 30000 not found in the database
    30000 30610 other comprehensive income items

    ------Member 30000 not found in the database
    30000 30675 tax distribution to Shareholde

    ------Member 40000 not found in the database
    40000 40055 wholesales

    ------Member 40000 not found in the database
    40000 41500 chips recipes

    ------Member 40000 not found in the database
    40000 43000 power sales

    ------Member 40000 not found in the database
    40000 nursery 45000 income

    ------Member 40000 not found in the database
    40000 46000 transfer logs

    ------Member 40000 not found in the database
    40000 47000 Intraco sales

    ------Member 40000 not found in the database
    40000-49000 sale deduction

    ------Member 50000 not found in the database
    50000 Labor 51000

    ------Member 50000 not found in the database
    50000 52000 raw

    ------Member 50000 not found in the database
    50000 rental 52800

    ------Member 50000 not found in the database
    50000 53000 operating expenses

    ------Member 50000 not found in the database
    50000 53900 forestry supplies

    ------Member 50000 not found in the database
    50000 capitalized 53999 Contra-forestry

    ------Member 50000 not found in the database
    50000 maintenance 54000

    ------Member 50000 not found in the database
    50000 55000 fuels & lubricants

    ------Member 50000 not found in the database
    50000-56000 utilities

    ------Member 50000 not found in the database
    50000 57000 cost of direct registration

    ------Member 50000 not found in the database
    50000 57500 personalized services

    ------Member 50000 not found in the database
    50000 impoverishment 57700

    ------Member 50000 not found in the database
    50000 58000 cost allocations of goods sold

    ------Member 50000 not found in the database
    fixed cost 50000 59000

    ------Member 50000 not found in the database
    50000 59510 changes in inventories

    ------Member 60000 not found in the database
    60000 60100 salaries

    ------Member 60000 not found in the database
    60000 60300 maintenance of PC hardware

    ------Member 60000 not found in the database
    60000 60400 other G & A

    ------Member 60000 not found in the database
    61000 60000 licenses/fees/charges

    ------Member 60000 not found in the database
    60000 61400 benefits not

    ------Member 60000 not found in the database
    60000 61550 furniture/fixtures

    ------Member 60000 not found in the database
    60000 legal 61750

    ------Member 60000 not found in the database
    60000 62000 fresh office

    ------Member 60000 not found in the database
    60000 62500 professional services

    ------Member 60000 not found in the database
    60000 63000 activities pre & Post jobs

    ------Member 60000 not found in the database
    60000 63200 telecommunication costs

    ------Member 60000 not found in the database
    60000 63550 employee activities

    ------Member 60000 not found in the database
    60000 63800 sales & Promotions

    ------Member 60000 not found in the database
    60000 63900 banking questions

    ------Member 60000 not found in the database
    60000 64000 Admin depreciation

    ------Member 60000 not found in the database
    60000 64500 insurance and property taxes

    ------Member 60000 not found in the database
    60000 65000 allowances S G & A

    ------Member 60000 not found in the database
    60000 66000 outside management

    ------Member 70000 not found in the database
    70000 70100 rental income

    ------Member 70000 not found in the database
    70000 disposals of fixed assets 70200

    ------Member 70000 not found in the database
    70000 70400 Misc income

    ------Member 80000 not found in the database
    80000 80200 factory inactive

    ------Member 85000 not found in the database
    85000 85001 interest expense

    ------Member 85000 not found in the database
    85000 85200 interest income

    ------Member 90000 N
    t database
    90000-90100 income tax charges


    That's how I build my loading rules file

    Create-> rules file
    File-> opendatafile->

    account01.txt

    Field-> Dimension Build Properties properties

    Dimension =
    Field 1 measure; Type = Parent
    Measurement of field 2; Type = child
    Measurement of field 2; Type = Alais

    Click the Dimension Build field
    Click on setting Dimension build - Parent\Child
    Ok

    Validate - rule is correct

    Save as account

    Load the data file = Acciount.txt
    Rule file = account

    Ok

    Published by: level following December 11, 2011 06:24

    Published by: level following December 11, 2011 06:25

    Published by: level following December 11, 2011 06:27

    The drop-down list in the EA when you right click on the database and select load data. I have a question, the Member that already in outline? If this isn't the case, you will have problems. You would have to add it or have a line in the file to load at the top, with something like account, balance sheet in it. Also in the State of charge have you changed the load parameters of dimension for the dimension of accounts to be parent/child for the dimension of accounts. Often enough, the people don't realize they have to double-click the dimension name to make sure it gets set as the dimension that gets changed.

    I'm sure that your question is she trying to make loading the data and not the generation dim, but it might just be the first problem

  • Update issues... Request for Suggestions

    I am currently using 10Gexpress and Apex 3.2.1 with the embedded PL/SQL gateway. We have only a few users and no requirement to access internet/firewall.
    I read the 11Gexpress install documentation and the upgrade of the Apex documentation, but there was little assistance if we consider two upgrades.

    (1) is there a reason to consider the listener to Apex in this type of environment of low impact? This would provide benefits to compensate for the additional complexity?
    for example: I do not have the Forum set up to print - I didn't need, as all the reports can be downloaded to Excel. Printing requires a HTTP Server?

    (I would use a button or a link to run a 'report' query and download the result of the query in Excel... Maybe I need a web server? Separate the wire for that matter: query SQL Export link or button )

    (2) what version of the APEX comes with 11 G express?

    (3) is affected the new Mgmt DB to 11 G web interface by upgrading to the latest version of APEX?

    (2) should I upgrade Apex 4.1 first, then upgrade the DB to 11Gexpress?
    * Documents suggest that the DB Upgrade requires a data export of 10G, a complete uninstall of DB (including the APEX and the Apps I've built) and an import of data in 11 G
    * Will Exported APEX 3.2.1 Apps can be imported into APEX 4.1? -C' is why should I upgrade APEX then the DB

    (3) what should I monitor in either upgrade?

    Your comments and suggestions are requested and appreciated.

    Rich

    Hello

    (1) using the Apex listener you free up some DB resources in form of Apex static files are not displayed by database.

    (2) XE 11 G have Apex 4.0.

    (3) If you upgrade 11 G XE Apex last Apex 4.1, you lose the database management.
    Like you did lose Apex 2.1 management of the database when you move to Apex 3.2

    (4) you should not pass Apex before you update DB

    Kind regards
    Jari

  • How to truncate a decimal number to 2 places of a sum field

    Hello world

    Hope all is well,

    When you export the query to Excel, a cumulative grade point average with 2 decimal digits is list in Excel with 9 digits after the decimal point.

    Wanted to truncate the decimal to 2 positions in the disco.

    fit: TRUNC (SUM (Global Lgpa Gpa), 2) beak query uses the sum field

    the sum field shows:.89 and the calc above montre.88

    I tried to put ROUNDS around the above as this ROUND (TRUNC(SUM...))
    and got a data type error...

    Your ideas and your advice would be appreciated, tx... sandra

    Hi, Sandra
    Seems good. You may need to format the resulting in Discoverer column, if as it sometimes fails by default for the number of spaces defined by rounding and truncation.

    Best wishes
    Michael

  • Oracle OLAP: same values according to dimensions members

    We had a request from a customer who says:
    By Essbase, the same value of dimension member can exist in several dimensions. for example if we have an account with Member 1001 dimension, it is not possible to have the dimension of product with the same value of Member 1001. It is essentially because it implements Essbase as a shared member. Apparently, Essbase Excel-addin will not know what dimension to search for if both have the same values.

    According to our understanding, there is no such restriction in Oracle OLAP both during cube generation or querying through Excel add-in. that is to say we can have the size of account with 1001 members and same value member can exist in a product dimension. Please notify and if anyone has any reference to all documentation in this regard please let us know.

    Hello

    You're right - there is no such limitation in Oracle OLAP.

    A dimension value must be unique within a given dimension, but may be repeated in other dimensions.

    I have all the documentation, but it's really easy to prove using the OLAP in AWM worksheet, for example:

    AW create test
    set the text of side dim1
    maintain dim1 add 'member1 '.
    report dim1
    set the text of side dim2
    maintain dim2 add 'member1 '.
    report dim2
    AW detach test
    AW delete test

    I hope this helps

    Thank you

    Stuart Bunby

    OLAP blog: http://oracleOLAP.blogspot.com
    OLAP Wiki: http://wiki.oracle.com/page/Oracle+OLAP+Option
    OLAP OTN: http://www.oracle.com/technology/products/bi/olap/index.html
    DW OTN: http://www.oracle.com/technology/products/bi/db/11g/index.html

  • Export several query result tabs in an Excel worksheet in the form of tabs

    I want to export several "Result of the query" tabs in an Excel worksheet as individual tabs in the workbook. is this possible?

    Not today.

Maybe you are looking for

  • Favorites alphbetize

    I use Firefox 24.0 and I would like to know how to alphabetize my favorites. Right now they are in every sense.Thank youJerry

  • How can import most Hebrew fonts on mac?

    Hello I use Microsoft office on Hebrew to my documents in order to start in my office where I have a PC and continue on the road with my MacBookAir. My problem is, I have many nice Hebrew fonts on my PC and when I want to keep the converted fonts on

  • How to add a line empty

    Hello I know this is very basic, I ask, but I'm going crazy trying to find it. I want to draw a blank line between to LabelFieds. Something like: Label1 Label2. I know there is a function that does this, but I can't remember it and I am not able to f

  • BlackBerry Z30 Z30 unlocked on T-mobile USA OS upgradw

    I use a Z30 unlocked on T-mobile US. I've currently operated on 10.2.1.2102. I'm intrigued by the fact that I can't get the upgrade a.2228 on the Blackberry website itself. What is the reason for this? I am aware that I can use auto or Knowyou Charge

  • Windows 7 would not connect to your tube or itunes store

    does not automatically recognize the proxy settings