Export excel - name query columns headers

Howdy - I would like to SEE basically import a SQL table in EXCEL without creating an HTMl page. I want CF to create the Excel from scratch on the fly - without the help of models.

I want to SEE to appoint the excel column headers, and then export all the records in the excel file.

I have about 150 names of columns that might change over time, so I don't want to create a html page - I want CF to create the columns based on the columns in the SQL table names.

I could then save or open the file

Someone at - it ideas - thank you!

This is the exact code that now works perfectly! -Thank you very much - I was really stuck trying to make the order in the order by clause of the query, which was totally wrong - cool to have cfloop list all the order.


SELECT Column_Name
FROM INFORMATION_SCHEMA. Columns
WHERE Table_Name = 'fields '.
AND Table_Catalog = '... »


SELECT #ValueList (getColumns.Column_Name) #.
Fields









#column_Name #.
#getData [columnName] [currentRow] #.


<>
name = "Content-Type".
value = "application/ms-excel" >

<>
name = "Content-Disposition".
value = "attachment; filename = Report.xls">

Tags: ColdFusion

Similar Questions

  • SQL Developer: How to copy the data with the output grid column headers?

    Hello

    I use the 2.1.1.64 Version.

    I run a SQL query, down the results grid in the "Query result" window below. Say that I get 10 rows returned, with 5 columns.

    I want to copy this whole grid, as well as the names/column headers to the Clipboard. If I can stick under the original query to document the results of this query.

    I can't find any way to do this. I can copy/paste the results grid, but it does not copy the headers.

    The only way I think to do is to go through many steps to export in a TXT file, then paste that. Unfortunately, that's a lot of steps wasted if I need to do it again and again, and more, the output is pasted in an ugly format with double quotes, etc..

    It seems that the easiest feature is copy and paste the entire grid of the results, and of course, you could the headers. Why is it so difficult/impossible to do?

    (I think that the toad has the same problem. DBArtisan lets you copy and paste the results together, as well as headers, however.)

    Any help would be appreciated!

    Thank you
    John

    Shift-Ctrl-C will copy the headers of columns as well as the selected data.

  • Display the data in the form of column headers

    I am trying to achieve in Apex 4.2

    My table is like (example)

    Identification number

    date of date_a

    value_1 number

    Value_2 number

    Value_2 number

    I have my sql like

    SELECT id, date_a, value_1, value_2, value_3

    from my_table

    If the report displays in the form

    ID date_a value_1 value_2 value_3

    1 01/01/2012 10 20 30

    15/03/2012 2 12 14 24

    Can anyone show me an example of how to create such a report

    01/01/2012-15/03/2012

    1                           2

    10                        12

    20                        14

    30                         24

    I took a look at pivot, but doesn't seem to be the thing

    See you soon

    Gus

    Gus,

    First of all you must understand SQL itself cannot change the names of the columns for a query, as Frank has said.

    Columns in a SQL query are the 'projection' and the number of columns, the names of them and the data types must be determined before all data are extracted.

    See the following article: 101 PL/SQL: cursors and Projection of SQL

    Apex is simply based on the queries that you write, and even there not magically be able to change the names of columns in report based on your data.

    This is not to say what you want is impossible... it's possible... but not easily...

    See: how a function having a dynamic number of columns in the pipeline?

    Essentially the data itself have be questioned or known, before the data is retrieved, so that requires only the generated columns dynamically based on known data (for example, the criteria entered by a user) or you can do a query of two passes... questioning the data only once to get the values and then dynamically generating a second query to extract data with dynamically generated column headers.

    In the Apex of reports you will usually have the problem report attributes are defined as part of the update and are determined when the query is assigned to the report (that you can manually override the headers)... but the apex will not allow lines dynamically the changes based on the data, for standard reports, it allows.  I have not tried to do in the Apex, but you can maybe try and generate the report results using a two-pass method, to put in an HTML region, but it depends on what user interaction is required with the report, that you far built-in report functions.

  • Y at - it an option to print the names of columns?

    Hi developers out there!

    Problem:
    When I try to print the data in the table, the names of columns like "COL01', 'COL02' and so on.
    But initially, they have other names.
    Am I missing something?

    Best regards
    Ruslan.

    If you go to your report and click on the 'Report Attributes' tab. You will see all the names of your column headers. and a group of radio buttons at the top of the page. Select custom, and then change the names of your column headers.

    In addition, it seems that on your 'Definition of the region' tab in the Source box, you checked the option button "use generic column names (analysis of query runtime only). Try to select the other radio button "use query column names-specific query and validate.

    Good luck.

  • Export Excel in DIAdem 15

    Hello

    I use 15 DIAdem and trying to export values in the data portal to a XLS (Excel) file.

    I tried to look for similar tasks a previously in this forum and found a few directions.

    (1) ExcelExport function - appears to be eliminated in the recent version of DIAdem,

    (2) extension IPM: gfsexcel (?). DLL - also absent in my files DIAdem

    (3) export TDM/CSV using instead...

    ((3) seems to be possible, from now, but it would be great if I can use Excel export directly (as 3) needs a few extra clicks..)

    In detail, I want to export values in my data portal (not much data; 1 rank & max. 20 columns) for the excel file, and it would be better if exported excel file opens automatically (I assume that this was possible with the function ExcelExport before).

    If there is no idea, please let me know.

    Thanks in advance,

    Young.

    If you want to try the CSV export, it is possible to configure it to match your local excel import.

    If it responds, it automatically loads to Excel.

    Option Explicit

    Call DataFileSave (CsvParameters ("C:\temp\out_ger.csv", "ger"), "CSV")
    Call DataFileSave (CsvParameters ("C:\temp\out_eng.csv", "eng"), "CSV")

    function CsvParameters (byval filePath, byVal lang)
    Select the lang case
    case "ger".
    "CsvParameters =""& replace (filePath," & ","&") &", JJ. "Mr. YYYY HH: mm:"
    case "eng".
    "CsvParameters =""& replace (filePath," & ","&") &". , " MM/DD/YYYY HH: mm: pp.
    other cases
    CsvParameters = filePath
    select end
    EndFunction

    Classically, there are three things that you have to adapt to the local context

    • decimal point

    • seperator

    • TimeFormat

  • column headers dynamically change the date filter-based selection? in obiee 11g Analytics

    Hello

    I work an analytic of obiee 11g.

    I have my report coulmns five... who are the branch, district, DS, current year, the previous year.

    based on the article on the query filter, column headings change dynamically.

    column headings are current, previous year Yes r;

    current month, previous month;

    current week and the previous week.

    for example, if I select the year 2016.

    column headings are Branch, district, DS, 2016, 2015 will change dynamically in the analytical report...

    Please help me,

    I tried, but I do not have...

    Please help me,

    A.Kavya.

    I'm not really sure what you have, but assuming that you have a command prompt of dashboard with the year of the column, define a variable presentation for this column (pv_year) and then in the report, for the columns you want, set the column as header @{pv_year} and @{pv_year-1}.

    He must pick up the values from the command prompt and dynamically set in the column headers.

  • How to extract the names of columns in dynamic SQL

    Hi all

    Is it possible to extract all the names of columns in a dynamic query?

    In my case according to the user selections that my query will get changed (number of the column, column name and tables that everything can vary).

    So now, is it possible to retrieve all the column names of the dynamic query generated?

    I am using Oracle 11g (11.2.0.4)

    Thank you

    Shaz

    Re: Dynamic Extraction on dynamic Sql

  • I need to convert PDF to Excel, however, the columns and tabs make many merged cells and the number of columns empty. In addition to not separate the columns properly, I see many not separate lines together in the same cell. I think same as Adobe Acrobat

    I need to convert PDF to Excel, however, the columns and tabs make many merged cells and the number of columns empty. In addition to not separate the columns properly, I see many not separate lines together in the same cell. I even think that Adobe Acrobat Pro DC has limits. There is no way to set what points in columns to force the column break? Or create several columns that are unnecessary? How column in Excel, size fixed when import us text and define where breaks have columns of text?

    Google Tradutor para empresas:Google para appsTradutor sitesGlobal market Finder traducao Toolkit

    Acts traducao Instantaneasobre o Google TradutorCelularComunidadePrivacidade e TermosAjudaEnviar comments

    PDF does not contain columns, lines, formats, styles or other aspects of word processing or spreadsheet file formats.

    This is because the PDF is decidedly not a file format of word processor or a spreadsheet or something 'like' one of these.

    (see ISO 32000 for what PDF "is")

    Which allows to optimize the export of the content of a page PDF is to start with that tag well formed PDF (ISO 14289-1, PDF/UA-1).

    Without that export is what it is and we performs the cleanup of any necessary content using the native application for the export of files (MS Word or Excel).

    Be well...

  • SQL Developer 4.0 column headers

    I give!  Uncle, uncle, uncle!

    I've migrated Developer SQL 3. xxx to 4.0.  My questions appear more column headers.  I looked in 'preferences' and have not found the answer.  I tried the SQL commands that work in SQL * more.

    What Miss me?  How can I get my column headers in the output?

    Result of 'show all' include pagesize-1 and linesize-1.

    Ah, sorry!   I forgot that the rule is a bit more complicated in my first post.  PageSize 0 and road remove column headers.  In addition (from a few notes of discussion)...

    In SQLDeveloper, we decided to have the LINESIZE and PAGESIZE-1 value default if the table is printed without any restrictions on the dimensions (LINESIZE & PAGESIZE).  Yes does not print the columns of labels for = - 1 PAGESIZE and LINESIZE > 0 and any indented for data.

    In SQLPlus, we cannot set PageSize-1, but when we set the PAGESIZE = 0 and LINESIZE > 0 will not print labels, but the results of line indentation will be same in

    SQLDeveloper.

    So, for your case, make sure as leave on and pagesize and linesize either at their default value of-1, or both the value greater than 0.  If you want to automatically set to the default values, then in...

    Tools > Preferences > Database (don't forget to expand the database, and then click on it, so it has the focus) > name of the connection startup script file

    provide a specification file for a script that contains these SET statements.  A concept similar to SQL * more check the existence of a login.sql script.

    Best wishes

    Gary

  • How to export Excel dashboard reports in OBIEE 11.1.1.6.0?

    Hi Experts,

    How to export Excel dashboard reports in OBIEE 11.1.1.6.0?
    For example:
    Dashboard contains more than one report and add an export button for downloading these reports to Excel.

    Is it possible to implement this requirement? Thank you.

    There is no direct option, you can try the following workaround.

    Option-> Print-> page printable Html

    Then the file-> Save Page as

    Pharmasset Save as type as it is-> all files
    File name as Report.xls

    When you open the xls file, if you get a pop up saying problem during a load simply omit it and move forward.
    The report opens in excel.

    Or save the page as html /mht and open it with Excel, it works too.

    Note: I tested this in Mozilla

    Thank you
    Vino

  • Export Excel with text containing commas and transport returns

    I am trying to export the result to a query of discoverer to Excel.
    The text field has many characters, including commas and spans multiple lines.

    Text in the cell is
    "The list of companies that are domiciled in an eligible country.

    Eligible countries are: Brazil, Chile, China, Colombia, Czech Republic, Egypt, Hong Kong, Hungary, India, Indonesia, South Korea, Malaysia, Mexico, Morocco, Peru, Philippines, Poland, Russia, Singapore, South Africa, Taiwan, Thailand and Turkey.

    Companies are known to be constituents of the countries where they are legally registered. »


    Export excel sheet is cropping of text characters.
    and only the following text is exported to Excel
    "The list of companies that are domiciled in an eligible country.

    "Eligible countries are: Brazil, Chile, China, Colombia, Czech Republic, Egypt, Hong Kong, Hungary, India, Indonesia, Malaysia, Mexico, Morocco, South Korea,

    Any idea what is the problem?

    Hello

    Excel has a limit of 256 characters for each cell, so you'll need to export to a different type of export such as html or silk.

    Rod West

  • How to reference the names of columns, if you use select *.

    Hello

    How to reference the names of columns to get out of the data, when you use select * and not aware of the column names (and number of columns) in advance.

    Even if I could get the column names in the other variables. I am new to CF so question may be stupid.

    getting column names: -.

    < cfquery datasource = "RTW_ORA" name = "cn" >
    SELECT COLUMN_NAME
    OF ALL_COL_COMMENTS
    WHERE TABLE_NAME = ' #meas #
    < / cfquery >

    obtain data: -.

    < cfquery datasource = "RTW_ORA" name = "cd" >
    SELECT *.
    To #meas #.
    < / cfquery >

    How do all the output data?

    Any help would be much appreciated!

    Thank you

    Tushar Saxena

    How to reference the names of columns to get out of the data, when you use select * and not aware of the column names (and number of columns) in advance.

    Even if I could get the column names in the other variables. I am new to CF so question may be stupid. getting column names: -.


    SELECT COLUMN_NAME
    OF ALL_COL_COMMENTS
    WHERE TABLE_NAME = ' #meas #

    obtain data: -.


    SELECT *.
    To #meas #.

    How do all the output data?

    Your question is not stupid. You can use the concept of a query requestand their properties cfquery attributes name and result.


    SELECT *.
    To #meas #.






    column names: #column_names #.

    number of columns: #no_of_columns #.



    SELECT #column_names #.
    FROM the cd



    A SQL query: #resQoQ.sql #.

    Query:


       
       
    #column #: #cd [column] [currentrow] #.
       


    T/t:


       
    #column #: #QoQ [column] [currentrow] #.
       


  • change the names of columns in the automatic process line fetch, edit the code

    Hello

    I created the master detailed form of two tables, and then I changed one of the names of columns in the table which is the detail.

    of course the extraction process could not recognize the name of this column (as it is no longer exist), so I need to change the column name in the query of in the current name.

    Ditto for line process transformation, to insert a new line.

    I guess it's easy, but I don't know where to find the ASR process query request,
    suggestions please!

    Kind regards.

    Published by: user8784111 on September 14, 2009 12:53 AM

    Hello:

    The detail rows are rendered in tabular form. This tabular presentation is implemented in a region of "report". You can change the query for the report region explain the column names.

    CITY

  • Can't export Excel 2007

    Team,

    Environment: OBIEE 11.1.1.14075, Windows OS.

    For export to Excel:

    Configured, instanceconfig.xml, config.xml and opmn.xml for export excellent 2007 problem. Account required privileges to all users, however not able export excel 2007 but able to export excellent 2003.

    All entries are appreciated...

    TIA

    Team,

    The problem got solved by changing the value of the parameter to 'temp' in opmn.xml, xdo.cfg files.

    Thanks for the support.

  • No Visible column headers

    Hi all

    I'm under APEX 5.0.0.00.31.  I created a page that contains a radio button group with 7 columns, 7 interactive reports (migrated from classic reports) and 7 dynamic actions.

    When loading the page, the only thing visible is the Group of radio buttons, because reports are hidden by the DAs.  When you select a year in the radio unit, the corresponding international registration is displayed.  Select another year, a new report shows, and the previous report is hidden.  This part works fine, except for one thing.  The column headers are not visible.  If I go to the Actions Menu, select lines per page and select any number of rows, the column headers are displayed.  If I click on a radio button, the new report appears, but without the column headers.  Selecting a value of lines per Page causes the column headings appear.  I tried to run the application in Firefox and IE edge with the same results.

    Any thoughts?

    Bob

    wisers wrote:

    I'm under APEX 5.0.0.00.31.  I created a page that contains a radio button group with 7 columns, 7 interactive reports (migrated from classic reports) and 7 dynamic actions.

    When loading the page, the only thing visible is the Group of radio buttons, because reports are hidden by the DAs.  When you select a year in the radio unit, the corresponding international registration is displayed.  Select another year, a new report shows, and the previous report is hidden.  This part works fine, except for one thing.  The column headers are not visible.  If I go to the Actions Menu, select lines per page and select any number of rows, the column headers are displayed.  If I click on a radio button, the new report appears, but without the column headers.  Selecting a value of lines per Page causes the column headings appear.  I tried to run the application in Firefox and IE edge with the same results.

    Any thoughts?

    Looks like it could be related to error in foldable interactive report 5.0 of Apex.

    The elephant in the room is the reason why you use 7 interactive reports to view information for different years. Why not use one and set up the SQL report?

Maybe you are looking for

  • Why is Firefox 39 past due?

    I was clicking ' Firefox' several times yesterday to update to Firefox 38.0.5 Firefox 39. He went from 12: 00 a.m. EDT, and Firefox 39 is not found everywhere on the site of Mozilla or "about Firefox". He was released June 30. I was able to update th

  • How to disable the start page promotions?

    Whenever I start Firefox, I am taken to the Start Page of Mozilla Firefox. By default, the page displays the Firefox logo, a search bar and the footer of downloads, bookmarks, session of previous restore button button, etc. However, Firefox logo occa

  • Impossible to use the Satellite L350 recovery disk

    I bought the recovery disc for my Satellite L350-370 followed instructions beginning now stopped program to "waiting for odd vacancies" moment for this strange worked perfectly. Laptop only if off now and no keys work. Help!

  • Cannot delete emails on iMac

    Suddenly I'm unable to delete e-mails.  I use OS x El Capitan on an iMac 2009.

  • ACS 5.2 authorization policy

    Hello is there a method to control access to the WLAN (PEAP) different on the same ACS 5.2 and WLC? In other words, ago 14:00 one of the groups have access to the domain network only the other group only have access to the internetand maybe a third g