CF query save as xls file

I have a little problem and I hopw anybody could help me.
I have a normal select statement and I want to run the select
and have a SAVE AS button directly on the site to save a XLS file?
Please help me ASAP!

The code below should get you started. Place it immediately
after the <BODY> tag on your page. Place <CFOUTPUT>
before your <TABLE> tag, and </CFOUTPUT>
after your </TABLE> tag.
Within your table, each <TR> creates a new spreadsheet
row and each <TD> creates a spreadsheet cell. You may have to
do a File > Save As from your browser menu to save it as a Excel
spreadsheet.

Similar Messages

  • How to dump a query on a XLS file?

    I´m working in a stored procedure on that i can send a dinamic query and it return me the result into a xls file.
    I´ve found the way to generate that xls file from Pl/sql, but now I need be able to assing each field of each row into his corresponding cell. For this I need to put each field of each row in a variable and then work on it.
    For generate xls file, I´ve created a datatype by following the indications of Jasson Bennet´s blog.
    http://radio-weblogs.com/0137094/2006/10/26.html
    In the example, values are assigned directly to the cells. But it not is valid for me because I dont know what will be these...
    I think that if you want see the blog, you´ll can understand better what I´m refering...
    Thanks for your time...

    Strange requirement, you don't know the query, the columns and the number of rows you get, but you know that you want the value of the second column of the second row :)
    But try this
    declare
      t_c integer;
      t_r integer;
      t_v varchar2(100);
    begin
      t_c := dbms_sql.open_cursor;
      dbms_sql.parse( t_c, q''select 'Roy' name, 'sales' deptno, 25 age from dual
    union all select 'Sara', 'HHRR', 30 from dual
    union all select 'Mike', 'finances', 35 from dual'', dbms_sql.native );
      dbms_sql.define_column( t_c, 2, t_v, 100 );
      t_r := dbms_sql.execute( t_c );
      t_r := dbms_sql.fetch_rows( t_c );
      t_r := dbms_sql.fetch_rows( t_c );
      dbms_sql.column_value( t_c, 2, t_v );
      dbms_sql.close_cursor( t_c );
      dbms_output.put_line( t_v );
    end;
    /

  • Need to write query results to .xls file

    Hi All,
    My requirement is ,when i run a query from sqlplus the results should be copied to a excel sheet.But i am not able to generate the file in the correct format.Could some body please help on this..
    Thanks in advance
    Thanks
    [email protected]

    Could some body please help on this..I am sorry to see that GOOGLE, SEARCH & HELP are broken for you.
    Please be patient while repairs are completed.
    Additional information will be posted when it becomes available.

  • Saving Query as xls file (I have searched and havent found this problem)

    I am trying to save a query as a xls file. The user can
    currently save the file to there desktop but excel warns them upon
    opening it that the file is associated with a different type of
    file do you want to continue. if you choose to continue then it
    will open up fine. so it kind of works. How can i get around this?
    i can't output it as a csv because there is comma's in some of the
    data i am outputting, and if i do a tab delimited then it is
    associated with notepad by default. here is my code:
    thanks, Drew

    Try:
    <cfcontent type="application/vnd.ms-excel">
    instead of
    <cfcontent type="application/msexcel">
    Also, for future reference, you CAN create a CSV file whose
    elements contain commas if you qualify the offending fields with
    quotation marks:
    Field 1, Field 2, "Field 3, and a comma", Field 4
    Excel will be able to open those up just fine.

  • Urgent: Issue with the size of an xls file generated from a rtf template

    Hi all,
    I have a template.rtf
    In BI, when I get the file in excel format and save it, the size of the report is 32 MB. When I just "save as" the same report, without changing anything, the size of the report is 8 MB.
    Do you know how to get directly the report with the size 8 MB or would you have some guidelines to avoid this issue.
    Thank you in advance,
    Sonia.

    Thank you Kurz for your answer. I'm going to try to be more precise.
    Actually I'm not in EBS. I generate the output (xls format) direclty from BIP.
    The DB of my application can't be requested directly, then I use HTTP request.
    From BIP, I launch the report choosing excel as output - the template is an rtf template.
    I have been requested to open or save the xls file that I save (32 MB).
    I open the excel file, save it again and the size of the file is now 8 MB.
    Regards,
    Sonia.

  • How do I save a xls document in Java

    Hi!
    How do I save a xls Document from java?
    I mean, I want to specify which xls document to save and then save it.
    Any useful code would be of great help!

    This is the code!
    import java.io.*;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.util.Locale;
    import jxl.Workbook;
    import jxl.WorkbookSettings;
    import jxl.write.Label;
    import jxl.write.WritableCell;
    import jxl.write.WritableCellFormat;
    import jxl.write.WritableImage;
    import jxl.write.WritableSheet;
    import jxl.write.WritableWorkbook;
    import jxl.write.Number;
    import jxl.write.*;
    import java.io.IOException;
    import java.io.OutputStream;
      public class writeXls
            public String templateName;
            public String outputName;
          public writeXls (String t, String o)
             templateName = "c://"+t;
             outputName = "c://"+o;
          public void writeYearVolume(String []yearvolymeArray)
              WritableWorkbook workbook = null;
              try
                  // Setup workbook
                  WorkbookSettings ws = new WorkbookSettings();
                  ws.setLocale(Locale.UK);
                  ws.setEncoding("Windows-31J");
                  // Load workbook
                  Workbook template = Workbook.getWorkbook(new FileInputStream(templateName));
                  // Create new workbook
                  workbook = Workbook.createWorkbook(new FileOutputStream(outputName), template, ws);
                  // Create new sheet
                  WritableSheet sheet = workbook.getSheet(1);
                  // Create new label
                  Number amc1000= new Number(4, 1, Integer.parseInt(yearvolymeArray[0]));
                  Number amc800 = new Number(4, 2, Integer.parseInt(yearvolymeArray[1]));
                  sheet.addCell(amc1000);
                  sheet.addCell(amc800);
                  // Write wookbook
                  workbook.write();
                  workbook.close();
                catch (IOException e)
                  e.printStackTrace();
                catch (WriteException e)
                  e.printStackTrace();
                catch(Exception e)
                    e.printStackTrace();
      }The xls file is modified but not saved, how do I save the file?
    Some of the cells in the xls file contains formulas, because of that, the cells containing formulas dosen't update its value.
    if I however save the file manually then the cells are updated. I want to save the xls file automatically from Java.
    Any ideas on how to do that?

  • Excel 2013 hangs when previewing xls file made by Reporting Server 2008

    Hi all.
    I have a unusual error in excel 2013. We have a homepage that delivers statics to our users and there you can choose to export the webpage to a xls file via SQL ReportingServer 2008. The thing is when I open this exported file in Excel and hit the print
    button, excel crashes. It seems to crash during the preview of the document. If I make a document by hand that has exactly the same format as the exported document, excel will preview and print it. 
    I have tried to change default printer and printer drivers but no success. Office 2013 is also up to date.
    If I save the document from SRSS and try to print it from another computer with Excel 2013 installed, it crashes Excel.
    Any suggestions? 

    Hi,
    Did you use another Excel file to preview or print? Did the Excel crash again?
    I recommend we export a different webpage to a XLSX, then we test it again.
    I notice that you try to print the document from another compute and also crashed Excel.
    Following this, I suppose that there were some underidentified characters in the file.
    After that, I suggest we save as the file to PDF to test.
    Regards,
    George Zhao
    TechNet Community Support
    I have tried printing another excelfile without problems. Infact I can make a replica manually of the report and print it without problem. I can't narrow it down to either a RS fault or Excel fault cause the logfiles don't say much. If I export the report
    to a PDF it prints fine, but my users will complain about lack of editing :-)
    If I save the xls file to xlsx and tries to print it also hangs in print preview.
    An interesting thing is when i export the file to PDF/XPS (PDF in this case) it also hangs Excel... 
    How do I look for underidentified
    characters in the file? I don't see anything in the spreadsheet.  
     

  • How to import xls file to BPA11gR1

    I got business flow from customer,one xml and one xls file.
    I imported xml file as following:
    New a database.
    Run BPA(11gR1) and open above database.
    Right-click on the group and select Evaluate/Start macro. The Macro Wizard opens.
    Select the "Import Process Generator table (XML)" macro in the Macros field and click on Next.
    Specify the output settings.
    Click on Finish. The Open dialog opens.
    Select the XML file and click on Open. The data is imported.
    I can not found ProcessGenerator import(EXCEL)" in the macro filed.
    so that I try to import xls file with above method,however I do not see any result.
    I would like to know if any of you could help me,thanks.
    Edited by: user780419 on Mar 5, 2012 9:02 PM
    Edited by: user780419 on Mar 5, 2012 9:14 PM

    step1:save the xls file as .csv format to your oracle dir path.
    step2:create external table using below command
    CREATE TABLE EXT_TABLE(+col1 datatype,col2 datatype.....+)
    ORGANIZATION EXTERNAL
    (TYPE ORACLE_LOADER DEFAULT DIRECTORY directoryname
    ACCESS PARAMETERS (
    RECORDS DELIMITED BY NEWLINE
    FIELDS TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
    MISSING FIELD VALUES ARE NULL
    LOCATION('+filename.CSV+')
    REJECT LIMIT 0;

  • Is it possible to read "rtx" files in JAVA.. and make a "xls" files.. !!

    Hello frnds..
    I dont have any idea.. how to read rtx files.. in JAVA.. ??
    I have some data in rtx files.. which i want to read it.. and save in xls files.. !!
    Please someone help.. am new to java.. searched a lot.. abt that .. but didnt find.. anything.. !!
    gervini

    I'm not being dismissive but I think your question comes down to "is there already a package/library to do this".
    You can use POI/HSSF to generate xls using Java. As for the other end, is rtx a rich text format? Are you able to parse the information in the file by simply reading the file through the regular file reading mechanisms?

  • SAP Query : Save to file in XLS format in background

    Hello everybody,
    I used the enhancement SQUE0001 for saving result (an XLS file) of SAP query in background.
    I used also the ABAP commands 'OPEN DATASET', 'TRANSFER' and 'CLOSE DATASET' as described in the SAP note 537735.
    The execution of SAP query generated multiple columns. But when I go to see my downloaded file (.xls), all generated columns are condensed into 1  !!!
    How to save the file (.xls) and keep the separated columns, please?
    Thanks for your answers.

    For saving the file in Excel format in the App server you have to first convert the data in XLS format and then use the transfer statement.
    You can either use FM SAP_CONVERT_TO_XLS_FORMAT for that.
    OR
    Create a comma sepreated file which will open in excel.
      open dataset file for output in text mode.
      loop at itab.
        concatenate itab-field1 itab-field2 itab-field2 into str
                      separated by ','.
        transfer str to file.
      endloop.
      close dataset file.

  • How do I save a Spreadsheet generated by Reportserver as xls file

    Hi to all,
    I have to implement a form that is able to generate 3 or 4 or even more Excel files (depends which one the user has chosen)and I have some Problems, so I hope any one can help me here.
    1. I want to start the reports sequential. I tried like
    if 1 then
         WEB.SHOW_DOCUMENT('http://nts027:7780/reports/rwservlet?report=test1&envid=test_EW&desformat=spreadsheet&destype=cache&userid=xxx/yyyyy@xxxx&desname=d:\tmp\\test1.xls&P_REPORTING_ID=73', ' _blank');
    elsif 2 then
    WEB.SHOW_DOCUMENT('http://nts027:7780/reports/rwservlet?report=test2&envid=test_EW&desformat=spreadsheet&destype=cache&userid=xxx/yyyyy@xxxx&desname=d:\tmp\test2.xls&P_REPORTING_ID=74', ' _blank');
    when I start it, it opens just the first one and the i- explorer window doesn't close as usual. And when I choose for each own a button then it works proper.
    2.how du I save these files automaticly as a xls file? I did try but could save it just as PDF.
    3 and how can i put all results from all Reports to one spreadsheet?
    4 how can I force it to save the file in a specific directory?
    5. how do I hide all the database connection inforamation in the browser?
    Kind regards
    SIar

    I am able to answer my own question;
    Under the file tab, go to export!

  • How to save query result on the file server as excel file?

    Hi everyone,
    I need to save the the query result on the file server as excel file.
    Do you have any idees how can I do it?
    Regards
    Erwin

    i dont think you can save as excel file but you can save it as CSV use APD or RSCRM BAPI for this

  • Steps to save a Query/Report as Excel file in Share folder

    Hi,
    I have a requirement where i need to schedule a BI report automatically on a daily basis and save it in a Sharepoint folder as a excel file.  I have gone through the Forums but didnt get a clear idea on how to proceed this with.  I read about RSCRM_BAPI transaction but i hope we need to do this manually to save the file each time.  Also, in Broadcaster there are options only to send Email & save in Portal. 
    So, if anybody have idea on saving a Query/Report as excel file in a Share folder automatically, kindly help me in suggesting the steps to do this activity.
    Regards,
    Murali

    Hi
    1. Create Three Floders in AL11 i.e. in Apllication Server. Eg Name it F1, F2 and F3.
    2. First dump the .csv files into F1. (Name xyz.csv).
    3. Then using UNIX/WINDOWS (depends on your OS) script , first check the file is there are not in F1, if yes then rename the file with date and time or date and transfer the files from F1 to F2 i.e xyz06032010.csv.
    4. Then Create a small ABAP program to check the file in F2, if it is there then Trigger the Event, and using that event you execute teh PC.
    5. Then using UNIX/WINDOWS (depends on your OS) script , transfer the files from F2 to F3 i.e xyz06032010.csv
    6. Next day morning F1 and F2 are empty and F3 is having the backup files.
    So use this method, I used the similar logic and it is working fine.
    Timinings are importent i.e what time you need to dump the fule in F1 and what time you need to run UNIX/WINDOWS (depends on your OS) script , transfer the files from F1 to F2 and what time UNIX/WINDOWS (depends on your OS) script , transfer the files from F2 to F3.
    OR
    1. Create Two Floders in AL11 i.e. in Apllication Server. Eg Name it F1 and F2
    2. First dump the .csv files into F1. (Name xyz.csv)
    3. Then load the data using InfoPackage, through PC.
    4. At the end of the load Attach a simple Program to Move the xyz.csv file from F1 to F2.
    5. So next day the file will come to F1 and the it will load and at the end it will move to F2.
    Else  you can use simple one or two lines of UNIX/WINDOWS (depends on your OS) script to move the file from F1 to F2 , once you load is over.
    While moving the file from F1 to F2 you can append the date at the end of the file and then move to F2, it is use full for future reference.
    See Blogs and Article, similar logic...
    https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    How to transfer the Data from SAP-System to Non-SAP system without additional Cost/License
    /people/surendrakumarreddy.koduru/blog/2009/03/11/how-to-transfer-the-data-from-sap-system-to-non-sap-system-without-additional-costlicense
    To Check the Files/Reports in Application Server and Trigger Mail Alerts.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/4096bf2d-bcea-2b10-4ab4-e0683830d9b2&overridelayout=true
    Thanks
    Reddy
    Edited by: Surendra Reddy on Mar 12, 2010 6:41 AM

  • How do I save my new data into a new .xls file? i am running my VI in a continious mode

    I am using a Data Acquisition Board to get my pressure and displacement signals. Have to measure it continiously. I am able to save the data continiously but not in new XLS file for new experiment. If any of you could hepl me with it

    This depends upon how you are writing it to file. If you are using the "Export Waveforms to Spreadsheet File" VI, then you can actually just open this file with Excel and you will see all of the data fine. That's the easiest way to do it. If you are wanting to write to Excel directly, you can use ActiveX calls to do this. If you choose the latter, I would suggest purchasing the Report Generation for Microsoft Office Toolset for LabVIEW. It provides VIs which write your data directly to Excel files.
    J.R. Allen

  • Unable to save xls file from website in the "Microsoft Office Excel 97-2003 Worksheet" format. The browser is saving in unrecognized "File" Type

    The version I am using is 3.6.11
    The file is stored in the server in the format "Microsoft Office Excel 97-2003 Worksheet"
    But when I download it, it gets saved in the unrecognized format type "File"
    The servlet code written to download the file sets the content type to "application/vnd.ms-excel"
    I am able to save the file in Microsoft Office Excel 97-2003 Worksheet format using Internet Explorer Browser without any issues.
    But it does not work with the Mozilla Firefox. Any plug-in needed to make it work?

    Did you try to add the .xls file extension yourself to those files?

Maybe you are looking for

  • How can I disable an annoying character popup?

    I keep getting popups like this (http://i785.photobucket.com/albums/yy131/redknight680/ScreenShot2013-11-24at7325 9PM_zps5ef04998.png) whenever I play Flash games.  It's rather irritating, as it blocks part of the screen, and I have no idea how to di

  • Lens correction Lightroom vs DxO Viewpoint

    Does anyone know if Lightroom's lens correction is any better than that of Viewpoint 2 (or 2.5)?  I am trying to decide whether I need Viewpoint to do lens correction on my Sony a5100 with the 16-50 kit lens.  The lens produces a lot of barreling dis

  • Simple JFrame Doubt

    Why is the jextfield on the jframe so small. Also How do I update the textField of MyButton JFrame from JButtonActionListener? import java.awt.FlowLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JTextField; public cl

  • Same song starts playing without my starting it and song isn't in my itunes

    Hi, Please Help, A guy from my Church created a website. I went there and actually copied a couple of pictures off of it. The site apparently has a song embedded into it that plays while You're on the site. Now somehow the song is embedded in my Mac.

  • SSH sessions over Putty die unexpectedly & commandline entry is slow

    I have a Sun Ultra-60 running Solaris 9 at patch level 118558-05. Users of this server report that their ssh sessions over Putty to this server die unexpectedly anywhere from one to two times per week. The users are usually in a vim session at the ti