Html report or ms excel/csv

Hello i have this code to display query in a html report
i wish to put another page before this one
that contains a radio button the has a Html or CSV/excel
but first how do i output a CSV/excel
with the same query and html output i have below:
then i wish to create a page that would have a radio button
html or csv/excel
thanks in advance
<cfquery name="GetCompanies"
datasource="#Request.MainDSN#">
SELECT
CompanyID,
CompanyName,
Address,
City,
State,
ZipCode,
Comments
FROM
Company
ORDER BY
CompanyName ASC
</cfquery>
<html>
<head>
<title>ColdFusion MX Bible</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Company List</h1>
<TABLE width=100% align="left" border="4" rules="all">
<tr>
<td><b>ID</b></td>
<td><b>Name</b></td>
<td><b>Address</b></td>
<td><b>City</b></td>
<td><b>State</b></td>
<td><b>ZIP Code</b></td>
<td> </td>
</tr>
<cfoutput query="GetCompanies">
<tr>
<td>#CompanyID#</td>
<td>#CompanyName#</td>
<td>#Address#</td>
<td>#City#</td>
<td>#State#</td>
<td>#ZipCode#</td>
<td>
<a
href="EmployeeList.cfm?CompanyID=#CompanyID#">Employees</a>
<a href="CompanyAddForm.cfm">Add</a>
<a
href="CompanyEditForm.cfm?CompanyID=#CompanyID#">Edit</a>
<a
href="CompanyDeleteForm.cfm?CompanyID=#CompanyID#">Delete</a>
</td>
</tr>
</cfoutput>
</TABLE>
</body>
</html>

add this to the top of your page (when it's excel)
<cfcontent type="application/vnd.ms-excel">
<cfheader name="Content-Disposition" value="inline;
filename=<filename here>">

Similar Messages

  • How to Generate HTML Report Output in Excel

    Dear Experts,
    How to convert HTML report output in Excel.
    I have reports which output is coming in HTML format & the same I want to use in Excel.
    So tell me how I can covert the same in Excel.
    Thanks
    Sudhir

    hello,
    in your case, you might want to make the following :
    a) use DESFORMAT=HTML
    b) use MIMETYPE=application/vnd.msexcell (or whatever mimetype your excel application is bound to)
    i am nor sure if excel will understeand our HTMLCSS (which is actually HTML4.0 using layers for best possible rendering of the paper page in the browser).
    regards,
    the oracle reports team

  • Master Detail Report Export to Excel/CSV

    Hello,
    Does anybody know how one may export a master detail report page - master is a html region, detail is a report region export to a csv file.
    The only option I found i the layout and pagination - export csv option, but this generates just the report region...
    Is there any possiblility to export the report as shown on screen to csv?
    Thanx
    Johann

    Hi,
    Limit the range of data to be exported and check any row missing.
    Thanks & Regards,
    Nagarajan

  • Reports 6i into Excel 97 vs 98, 2000 etc

    Hi,
    Can anyone give the official line on which version of Excel is supported against Reports 6i.
    If I create a HTML report and import into Excel 97 the result is exceptionally poor. Nothing is aligned and it is all unusuable. However in Excel 2000 the HTML gets converted in a pretty decent fashion and my data seems to be well aligned despite a few easy to fix blank columns.
    Our client only has Excel 97 and I need an answer urgently on the compatibility between the two products. Does the client need to upgrade or is there a better way to get the report data into Excel?
    Regards,
    John

    Dear John,
    Can u tell me how to import HTML report output into Excel ?
    With brief steps.
    U can reply me on [email protected] / [email protected]
    Regards
    Sudhir

  • Output report data to excel file format or csv format

    Is there any way to save softcopy of report output to excel file format or csv format.

    Hi,
    Regarding csv file format, i have no issues. The file is generating without any issues in using oracle reports without using any PL/SQL code.
    My requirement is to design oracle reports to generate excel (.xls) file with multiple worksheets. Each sheets are having many data and graphs(chart).
    Using oracle reports alone, how to achieve this.
    In oracle reports 10g 1.2.0 version, I tried by creating .rdf file but, it is generating single worksheet only.
    In oracle reports 10g 1.2.0 ver, I tried by creating .jsp file. For this first i am creating excel template about how my ouput column headings all that going to be with one sample hard coded data and save the excel file as web page.
    Eg employee.html.
    Next open the html file in oracle reports builder and double click the websource now, you will see the jsp tags, html and xml tags. Now include the contentType="application/vnd.ms-excel " and charset also.
    Next, include the <rw:foreach id="G_EMPNO_1" src="G_EMPNO">
    here insert the fieldl for each column by removing the hard coded values.
    close the tag
    </rw:foreach>
    Save the file as .jsp and deploy it in oc4 enabled folder (say, devsuite_home/reports/j2ee/reports_ids/web
    Start the oc4J server
    Run it in the browser http://server:port/reports/emp.jsp?useride=uid/pwd@db
    It is invoking the Microsoft excel with 3 sheets default and my emp table output in the first page.
    We can save this output file as .xls file by clicking file -> save as.
    1) The question is, it is working fine with Microsoft excel 97-2003 version. But for excel 2007, i am not able to create single html file like how 2003 save web page option.
    2) I found this in oracle getting started demo
    http://www.oracle.com/technology/products/reports/htdocs/getstart/demonstrations/index.html
    Which is more useful. This is what i am looking for.
    I done that in excel 2003 as per demo. But excel 2007 with reports 10g issues.
    Is there any demo for 10g with excel 2007
    3) For most of excel issues working fine with excel 2003 and 10g. But excel 2007 with 10g reports are issues.
    I want the excel output from oracle reports with multiple worksheet similar to the above demo.
    Thank you.

  • How to make Excel 2010 save a HTML report as a file without a folder created

    We have a HTML report generated by Oracle Report with headers as below:
    <html xmlns:v="urn:schemas-microsoft-com:vml"
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:x="urn:schemas-microsoft-com:office:excel"
    xmlns="http://www.w3.org/TR/REC-html40">
    In Excel 2010, after pressing the "save" button (not "save as"), it will by default save the report as web page format instead of xls, a folder "xxx.files" containing some css, xml and html files are created
    in it. If user deletes the folder carelessly, the excel report cannot be viewed at all.
    In Excel 2003, we can save it directly in its original format simply by pressing the "save" button, without creating a folder. May I know if there are any options in office 2010, macro or registries settings that can make
    Excel 2010 to do the same as Excel 2003 when pressing the "save" button? Thanks!

    Hi,
    According to your description, you want a workaround to avoid creating a new folder when saving a html file in Excel 2010.
    In my opinion, this issue is more related to the feature of HTML format or Excel 2010 application rather and I don't think we could resort to a macro or registry settings to avoid that. I suggest you posting it in
    Excel IT pro forum for more effective responses.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Problem While exporting HTML table to Excel(.CSV) in SharePoint 2010

    Hi ,
    I was exporting HTML table to .CSV file. 
    Problem is if any field contains '>' or '<' symbol then after exporting to .CSV, it was showing like '&gt' and '&lt' and the code is  as below.
    //Export HTML table to CSV 
    function toCSV() {
          var data = document.getElementById('reportstable');
          var csvData = [];
          var tmpArr = [];
          var tmpStr = '';
          for (var i = 0; i < data.rows[0].cells.length; i++) 
            tmpArr.push((data.rows[0].cells[i].innerText || data.rows[0].cells[i].textContent));
          csvData.push(tmpArr.join('\t'));
          for (var i = 1; i < data.rows.length; i++) 
            tmpArr = [];
            for (var j = 0; j < data.rows[0].cells.length; j++) 
            tmpArr.push(data.rows[i].cells[j].innerHTML);
            csvData.push(tmpArr.join('\t'));
          var output = csvData.join('\n');
          SaveContents(output);
    //For saving the file
    function SaveContents(element) {
            if (document.execCommand) {
                var oWin = window.open("about:blank","_blank");
                oWin.document.write(element);
                oWin.document.close();
                var success = oWin.document.execCommand('SaveAs', false, "FilteredReport.xls")
                oWin.close();
    Thanks in Advance

    Hi,
    According to your post, a problem occurred when you exported the HTML table to Excel(.CSV).
    The following code for your reference:
    function toCSV() {
    var data = document.getElementById('reportstable');
    var csvData = [];
    var tmpArr = [];
    var tmpStr = '';
    for (var i = 0; i < data.rows[0].cells.length; i++)
    tmpArr.push((data.rows[0].cells[i].innerText || data.rows[0].cells[i].textContent));
    csvData.push(tmpArr.join('\t'));
    for (var i = 1; i < data.rows.length; i++)
    tmpArr = [];
    for (var j = 0; j < data.rows[0].cells.length; j++)
    tmpArr.push(data.rows[i].cells[j].innerHTML);
    csvData.push(tmpArr.join('\t'));
    var output = csvData.join('\n');
    SaveContents(output.replace(/&lt;/g, '<').replace(/&gt;/g, '>'));
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Report painter report in portal - Excel output in SAP GUI for HTML

    Dear sirs,
    I need your expertize. I would like to let my users display (Excel in place)/ save the result of my report painter reports into MS Excel. I have found notes 499262 a 314568, but didn´t understand the message (or there is no message:)). Does that mean I cannot use Excel in place together with Report painter and SAP GUI for HTML?
    Second question: is there a place (user exit in generated code? I don´t even know what I am looking for) to get the data provided by the report painter engine and send the retrieved data to some custom function (to be able to call the Adobe form, to save it as a text file or any option how to manipulate the resulting data...?).
    thank you for your time and effort,
    regards Otto

    Hi Otto,
    You can send print the report to the spool and then use RSTXPDFT4 program to convert this spool to PDF file. Alternatively, you can export the spool to spreadsheet or ASCII file via SP01 transaction.
    Additinally, I'm not aware of unability to use Excel output with SAP GUI interface.
    Regards,
    Eli

  • Sending email with HTML report through a button

    Hi,
    I've noticed in APEX 4 there is a default option (through Action Menu -> Download Formats: email) to send an email with report in HTML format...
    may I know how to accomplish it using a Button... seems like APEX is using javascript:gReport.email.show(); function to accomplish it but I don't know how to implement it...
    Please advice
    Thanks in advance

    qwe12654 wrote:
    GokhanAtil,
    I've posted a sample on APEX.ORACLE.COM... LOGIN DETAILS ARE SAME AS ABOVE...
    ON the page now I have both the SQL based report and interactive report...
    On the top right you may see 2 icons.. one for downloading report in PDF (using SQL Report as the source) and the second for sending email (using interactive report, similar logic as what you've recommended)...
    Is there a way I may be able to send report via email, using SQL report as the source (rather than interactive report)...?
    You can always use APEX_MAIL to send emails.
    http://download.oracle.com/docs/cd/E10513_01/doc/apirefs.310/e12855/apex_mail.htm
    or the alternative option would be:
    to convert all my SQL reports into interactive, would require a bit of efforts (I'll go with it if the above option is not available)... but would need to know how to download INTERACTIVE reports in PDF, excel and CSV formats using a button ... similar logic to what you've done for sending emails
    Thanks again for all your assistanceIt's very easy to make buttons for downloading the interactive reports in HTML, CSV or PDF.
    I have created a PDF button and put the link:
    http://apex.oracle.com/pls/apex/f?p=40418:11:1316531694094700:PDF
    "1316531694094700" is the value of p_instance. You can find it from HTML codes of your page:
    <input type="hidden" name="p_instance" value="1316531694094700" id="pInstance">
    You can change PDF to CSV or HTMLD (so your visitor download the report in CSV or HTML)
    Best Regards,
    Gokhan
    If this question is answered, please mark appropriate posts as correct/helpful and the thread as closed. Thanks

  • Excel csv

    hello,
    i have a html report
    i wish to have a option that generates html
    how do you do this
    tips??
    <cfloop query="westcoastCases">
    <tr>
    <td>#allcaseID#</td>
    <td>#dateform(adate_DT,"mm/dd/yyyy")#</td>
    </tr>
    </cfloop>

    What do you *actually* want? You ask for three separate
    things:
    1) Excel
    2) CSV
    3) HTML
    If the Excel requirement is just that you want values in
    cells, simply
    create an HTML table, and then return it to the browser as an
    application/xls with <cfcontent>. If it's more complex
    than that, there's
    been plenty of other threads on these forums discussing how
    to do it. Use
    "search".
    Note that a CSV file has nothing - per-se - to do with Excel,
    other than
    the fact Excel can open them.
    http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm
    If you want an HTML table, then... your sample code simply
    needs <table>
    tags around it.
    I think you're going to have to think through what your
    actual requirement
    is, and express it to us slightly more clearly.
    Adam

  • Print HTML Report.vi doesn't scale properly.

    LV 8.5.1, Report Generation Toolkit, XP.  Our application uses the Print HTML Report.vi to print an HTML report.
    We found that on some installations the resulting page does not scale properly.  Instead of being one page wide,
    the printout is about 1.5 pages wide (and proportionately longer), leading to our report being truncated.
    Tried different printers, different print drivers, no difference.
    Finally we noticed that the affected computers all had Internet Explorer 6 installed.  Updating to Internet
    Explorer 7 fixed the problem.  Don't know about IE8, I expect that will work as well.
    Hopefully this will help someone else who runs across this problem.  I couldn't find any reference to
    an IE > 6 dependency in the Report Generation Toolkit readme system requirement.
    Matt

    Hi Charlie,
    The layout option is not wired to anything in the Standard, HTML, Excel and Word Report, but it is used in the Quick Print default case.  The Help document for this VI mentions that the layout option is ignored on Standard and HTML Reports but does not mention the Excel or Word Reports.
    This was discovered a little while ago in this discussion forum.  And a report has be filed to R&D by Ben.
    Justin Parker
    National Instruments
    Product Support Engineer

  • HTML Report

    Dear All,
    i am Generate the Report in Report Builder and set the output in HTML when
    i Run the report, then i save the report in .XLS (Excel) and open in Excel it does
    not Give the Right Output in Excel,The Data are Splited in to Different Cells
    but Cell are not on Same Line .
    When This Report Run in Text Format , The Customer Name in One Line , When this report Run in HTML Format the Customer Name is Display in 2 or 3 Lines,
    i have Issue of Width ,When Report Run in HTML Format then Width of Colums is
    Shrikn.
    Please Tell me how to Solve this Problem.
    Thanks

    When you generate the HTML output you need to make sure you are also setting the width of each column.
    first of all what is your requirement? Why do you want to generate in HTML and copy it to excel? why can't you generate directly the delimited output and copy it to excel?
    Please be specific so that you get relavant answer.
    Thanks
    Prudhvi
    www.erpschools.com

  • Need to export OBIEE report in native excel format

    Dear All,
    Apologies if this issue has been discussed earlier in this forum. I am posting this afresh since I could not find a proper thread pertaining to this problem.
    Here is a snapshot of my issue:-
    While exporting a report in excel this exports this in mhtml format instead of native excel. As a result, the generated files are way bigger than expected and every day we are receiving multiple complaints from the end users. We tried to fix this by changing the messages files as mentioned in few blogs but could not make this work. Our current reporting system is on 11.1.1.6.
    In some of the online blogs I read that this issue is supposed to be resolved in 11.1.1.7. Can any one please confirm if this is indeed the case? Also, if any one can advise of any other resolutions it would be really helpful.
    Thanks in advance.
    Regards

    Vbez1,
    Thanks for your response.
    The way we are working at the moment is :-
    1. Ask users to download in .csv if they just need raw data
    2. While storing/sending the .xls files we have asked them to save the file as a excel workbook
    However no workaround could be achieved for the reports sent as excels by agents(clogging spaced in user's mailboxes) or actual download volume of the formatted excel reports (excel taking an awfully long time to open the files).
    As you mentioned, I heard that this issue was fixed on 11.1.1.7. Since this version is released for more than a quarter now, I wondered if someone out there can confirm that this has happened really.
    Regards,
    Sudarshana

  • Hyperlink to a html report

    Hi ,
    I`m using LV2009.
    I have simulated a test report of a test board and generated a HTML report in the VI. The generated HTML report is saved in the file in some folder in the hard drive.
    All I wann is the hyperlink to the HTML report in the front panel.
    I saw few posts in the forum on the hyperlink but majority dealt with the excel sheets.
    Looking forward for your solutions.
    Regards,
    Manoj
    Solved!
    Go to Solution.

    Sorry, didn't see the 2009 in your post. Attached as LV 2009
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness
    Attachments:
    About.vi ‏24 KB

  • 2 questions about my Html report

    Dear All,
    I've created this Html reporting VI as a template for future work. As you can probably see on the VI i'm saving at a set time so that i can save the report once a day. I'm doing this by comparing the current time to the time input it works but it creates 2 folders one for the right set time and one for the second later somehow i've tried various solutions but i still cannot manage to obtain only one folder. Could someone help with this please?
    Another issue is when i'm appending front panel images (in sequence 2). Is there a way to insert a space or tab between them because at the moment they are one after the other? I found the tab for reports but it doesnt work for html only for excel by the look of things.
    Thank you in advance,
    Frederic. 
    Attachments:
    html DZ 2010.vi ‏136 KB
    html DZ 8_5.vi ‏175 KB

    For your specific questions:
    The reason you are getting 2 folders is that you are comparing the time to the resolution of seconds. Your save is occurring so fast that when the loop iterates again less than a second has passed, so the comparison you are performing to test whether to generate the report is still true. Instead of doing all those conversions just compare the current time with the set time to save using a simple Greater or Equal? function.
    Normally extra spaces and tabs in HTML are ignored by browsers. If you want to insert a space you have to use a non-breaking space or create a table.
    Other comments:
    Do yourself a favor and get rid of the sequence structure. All those sequence locals just make a mess. Use a state machine or create subVIs that logically break up your report generation.
    The outermost while loop is not necessary. You can place the update of the current time in the small loop.
    Do not hard-code paths in your code as you are doing with the directory where the reports will be saved.
    Is the intention to save the report "on-demand" by allowing the user to change the time when the report will be saved, or where you intending to save this automatically once a day?
    Attachments:
    Example_VI_BD.png ‏10 KB

Maybe you are looking for