Download to csv file

Hi,
Working with Download to csv file feature I realized that for one of my reports that contains an icon (with a link) in one of the columns, is not getting any value for this column in the csv file.
This behaviour is logical due to the fact that we have an image, not a string.
But, is there a way I can edit or force the Download to assign a string value for every icon I have in my report, so when I click in Download, the icon will be represented as a string in the new csv file?
Thanks
Ivo

i'd bet the easiest way to approach this would be to select both your icon and your "string value" columns out of the database and to then use column conditions to determine which columns should be rendered in which output format. so say you had a report that just showed images in one col and a description in the next. i'd write your report to select something like...
select '<img src="'||m.image_path||'">' my_image, m.image_name name, m.image_description
from my_image_table m
...and then i'd a put condition of type "PL/SQL Expression" like...
not htmldb_application.g_excel_format
...on your my_image column. i'd also put a "PL/SQL Expression" condition on your Name column like...
htmldb_application.g_excel_format
...we talked about this a bit in...
Excel Report
...but basically htmldb_application.g_excel_format is just a function that returns a boolean telling you whether or not the HTML DB engine is in the mode of show your page in csv format. anyhow, give it a shot and let us know if you need further assistance.
regards,
raj

Similar Messages

  • How to get fixed field length when download a CSV  file ?

    hi all ,
        I had downloaded a CSV file from an ALV list which created by myself. the current layout of the CSV file is :
    aaa;bbbbbbbbbb;cc;                
                                                         for example . but what i want is :
    aaa         ;bbbbbbbbbbb            ;cc     ; 
    it means these three fields are all with fixed length don't ommitting spaces when you preview the CSV file. how should i do this ?
    best regards
    Kevin

    i got the solution.

  • Downloading a .csv file as excel sheet

    hi,
    does anyone know how to ensure that when downloading a csv file, it will be opened with excel only. The browser is downloading it as a text file and not excel. how can this be prevented.
    please let me know if you have any ideas since i've been pondering over it for far too long and need help...
    thanks
    jeena

    Yes, you need to set the content type to "application/vnd.ms-excel". Of course there is no guarantee that your clients will interpret that to mean "Open with Excel", or that they will even have Excel installed on their system, but there's not much you can do about that.

  • When downloading a .csv file in Safari, it adds .xls, making the file filename.cvs.xls

    When downloading a .csv file in Safari, it adds .xls, making the file filename.cvs.xls
    If I rename the file, it opens just fine, if I don't it opens all in one column.
    I had found a fix on my old macbook, but just got a new MBP and it's happening again.
    Can't remember or find where the fix is.
    Thanks!

    Safari: Downloaded file's filename may have an additional extension
    http://support.apple.com/kb/TA24293
    That's from June 11, 2007!
    Working from my defective memory, this happened to me, but stopped if I unchecked 'Open safe files after downloading' in Safari Preferences/General.
    At least I think that's how I stopped it - it hasn't happened since!

  • Letting users download a CSV file

    I need to add a link to some html code generated by a servlet that will allow users to download a csv file. The problem is that the only other link I have seen function like that was in a static html page and it simply used a href tag to identify the csv file and the user was automatically asked whether to open it or save it to their PC. When I use such a link in the servlet, the servlet displays the contents of the file in a browser window instead of giving the user the option to save it to their PC. Can someone please help me?

    Are you generating the CSV file with a servlet? If so, try this:
    response.setContentType("text/x-csv");
    response.setHeader("Content-disposition", "inline;filename=MyOutputFile.csv");

  • How to approach for downloading a CSV file?

    I'm running the following query and  QoQ . Could you tell me how should I proceed for the "Download  CSV" file option?
        <!--- QoQ for FIRSTCONN --->
        <cfquery datasource = "XX.XX.X.XX" name="master1">
             SELECT STR_TO_DATE(date_format(Timedetail,'%m-%d-%Y'),'%m-%d-%Y') as FIRSTCONN
                    , COUNT(Timedetail) as FIRSTOccurances
                    , EVENTS
             FROM  MyDatabase
             WHERE EVENTS = "FIRST"
             GROUP BY FIRSTCONN ;
        </cfquery>
        <!--- Detail Query --->
        <cfquery dbtype="query" name="detail1">
            SELECT  *
            FROM master1
            WHERE FIRSTCONN  >= <cfqueryparam value="#form.startdate#" cfsqltype="cf_sql_varchar">
            AND   FIRSTCONN  <  <cfqueryparam value="#dateAdd('d', 1,form.enddate)#" cfsqltype="cf_sql_varchar">;
        </cfquery> 
        <!--- QoQ for SECONDCONN --->
        <cfquery datasource = "XX.XX.X.XX" name="master2">
            SELECT STR_TO_DATE(date_format(Timedetail,'%m-%d-%Y'),'%m-%d-%Y') as SECONDCONN
                   , COUNT(Timedetail) as SECONDOccurances
                   , EVENTS
            FROM  MyDatabase
            WHERE EVENTS = "SECOND"
            GROUP BY SECONDCONN ;
        </cfquery>
        <cfquery dbtype="query" name="detail2">
            SELECT  *
            FROM   master2
            WHERE  SECONDCONN  >= <cfqueryparam value="#form.startdate#" cfsqltype="cf_sql_varchar">
            AND    SECONDCONN  <  <cfqueryparam value="#dateAdd('d', 1,form.enddate)#" cfsqltype="cf_sql_varchar">;
        </cfquery> 
        <cfchart format="flash"  chartwidth="1000" chartheight="500" scalefrom="0" scaleto="50000" xAxisTitle="Dates" yaxistitle="Number of Connections">
             <cfchartseries  query="detail1" type="line" itemColumn="FIRSTCONN" valueColumn="FIRSTOccurances" >
             <cfchartseries  query="detail2" type="line" itemColumn="SECONDCONN" valueColumn="SECONDOccurances" >
             </cfchartseries>
        </cfchart>
    The cfform code I'm using is as follows:
    <cfform format="flash" preloader ="false">
    <cfformgroup type="horizontal">
      <cfinput type="dateField" name="startdate" label="Start Date" width="100" value="#form.startdate#">
      <cfinput type="dateField" name="enddate" label="End Date" width="100" value="#form.enddate#">
      <cfinput name="submitApply" type="submit" value = "Apply">
      <cfinput name="cancel" type="submit" value="Download CSV">
    </cfformgroup>
    Desired Output:
    I have attached the image for the output below. Please find it attached.
    Basically, if a date range is 21June to 21 July. The output must be as shown in the image. (I have omitted THIRDCONN etc for the sake of simplicity in my code).
    Please let me know how should I go about this problem and let me know if I can answer more questions.

    It's not built into the language. Your best bet is probably to put the CSV-Reading logic into its own class.
    Or find one of the thousands of classes that already implement such a thing.

  • I am try to download a CSV file and have it directly open in excel. It only opens in new page and not in excel. how do I get it to do that.

    In internet explorer I use to be able to click on a download link to have a csv file open in excel. I have never been able to open this download file before with Firefox. It turns out that I can no longer do it with Explorer either. I have sent this same question to them for help as I require this information. It is being downloaded from a secure site and is used for registration information.
    I need help as soon as possible.
    Thank you
    Rob

    See:
    *Firefox/Tools > Options > Advanced > General : Accessibility : [ ] "Warn me when web sites try to redirect or reload the page"
    The setting in "Tools > Options > Advanced > General" is meant as an accessibility feature, as you can see by the label of that section, so that people with disabilities or people who use screen readers do not get confused and is not meant as a safety protection to stop redirecting.
    See also:
    *https://support.mozilla.com/kb/Options+window+-+Advanced+panel#General_tab
    *http://kb.mozillazine.org/accessibility.blockautorefresh
    *http://kb.mozillazine.org/Accessibility_features_of_Firefox

  • How to download a CSV file to a shared network folder ?

    Hi Experts,
    I have created a report which exports a CSV file on application server using scheduled background job. I have used the OPEN DATASET feature to download the file on a location on the application server which is working fine.
    But my requirement is that I have to download this file to a shared folder which is situated on another location and is shared in my application server as 'N' drive. But when I give the path of this N drive in my report, its giving runtime error that the <filename> is not open.
    So pls help me how to give path to such shared network folder to download the file?
    Thanks,
    Vishal .

    Hi Guys,
    I tried alot but it didnt work.
    SO I decided to export the file on the application server only.
    I created a background job that runs periodically and exports the file to C drive of the application server.
    The job run sucessfully only the first time but gets cancelled after that.
    I ran the job for an hour but not a single time it finished successfully. Every time it was cancel with dump error shown below.
    +++++++++++++++++++++++++++++++++++++++++++
    Category               ABAP Programming Error
    Runtime Errors         DATASET_NOT_OPEN
    Except.                CX_SY_FILE_OPEN_MODE
    ABAP Program           ZBATCHSTOCK
    Application Component  Not Assigned
    Date and Time          01.08.2014 18:52:13
    Short text
         File "C:\GOOGLE_SAP\BATCH_DETAILS.CSV" is not open.
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "ZBATCHSTOCK" had to be terminated because it has
         come across a statement that unfortunately cannot be executed.
    What can you do?
         Note down which actions and inputs caused the error.
         To process the problem further, contact you SAP system
         administrator.
         Using Transaction ST22 for ABAP Dump Analysis, you can look
         at and manage termination messages, and you can also
         keep them for a long time.
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++
    And the same background job runs properly on development server without any cancelled job.
    So pls help me what should be the problem ??
    Thanks,
    Vishal

  • How to use auto fit selection when downloading to csv file

    hi,
    I am working on reports, i need to download to a .csv file. I am using GUI_DOWNLOAD is there any option for it where text fits exactly in a single cell.
    For Eg:
    I excel there is an option (Format-column-Autofitselection).
    Then the column size increases or decreased according to the text size.

    Dear Josephine,
       There is no option the way you want of autofit. Rather while opening the CSV in excel u can do the required formatting.
    Regards,
    Deva.

  • Query - Download as CSV file

    Hi,
    By using Query (SQ01), we are able to download data in Excel format, Text format, etc. But... is there an option that I can download in CSV format.
    Thanks.....
    Rgds,
    Kian

    Hi Kian,
    you could save the Excel file in CSV format, couldn't you?
    Regards
    Bernd

  • Download to CSV file using FLEX

    Hi,
    I have download to CSV working fine, but i need the filename along with extension "CSV" when filereference object opens in browser,
    though i included CSV in the filename flex is ignoring it..
    Can anybody let me know how i can accomplish what i am looking for ?
    Thank You...Anu
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
    <![CDATA[
    import sample.DataGridDataExporter;
    import flash.net.FileReference;
    import flash.net.URLRequest;
    import flash.net.URLVariables;
    import flash.net.URLRequestMethod;
    import mx.controls.Alert;
    private static const CSV_DOWNLOAD_END_POINT:String = "http://q0571478:9081/CsvFile/servlet/GetCSV";
    private var downloadFileRef:FileReference = null;
    private function exportCSV ():void
    var csvData:String = DataGridDataExporter.exportCSV (dg);
    console.text = csvData;
    if (csvData.length > 0)
    downloadCSV (csvData);
    private function downloadCSV (csvData:String):void
    if (!downloadFileRef)
    downloadFileRef = new FileReference();
    var request:URLRequest = new URLRequest();
    var fileName:String;
    fileName = "ccdownload.csv";
    request.url = CSV_DOWNLOAD_END_POINT;
    request.method = URLRequestMethod.POST;
    request.data = new URLVariables ("csvdata=" + csvData);
    downloadFileRef.download(request, fileName);
    ]]>
    </mx:Script>
    <mx:XMLList id="employees">
    <employee>
    <name>Christina Coenraets</name>
    <phone>555-219-2270</phone>
    <email>[email protected]</email>
    <active>true</active>
    </employee>
    <employee>
    <name>Joanne Wall</name>
    <phone>555-219-2012</phone>
    <email>[email protected]</email>
    <active>true</active>
    </employee>
    <employee>
    <name>Maurice Smith</name>
    <phone>555-219-2012</phone>
    <email>[email protected]</email>
    <active>false</active>
    </employee>
    <employee>
    <name>Mary Jones</name>
    <phone>555-219-2000</phone>
    <email>[email protected]</email>
    <active>true</active>
    </employee>
    </mx:XMLList>
    <mx:Panel title="DataGrid Control Example" height="100%" width="100%"
    paddingTop="10" paddingLeft="10" paddingRight="10">
    <mx:Label width="100%" color="blue"
    text="Select a row in the DataGrid control."/>
    <mx:AdvancedDataGrid id="dg" width="100%" height="100%" rowCount="5" dataProvider="{employees}">
    <mx:groupedColumns>
      <mx:AdvancedDataGridColumn dataField="name" headerText="Name"/>
      <mx:AdvancedDataGridColumn dataField="phone" headerText="Phone"/>
      <mx:AdvancedDataGridColumn dataField="email" headerText="Email"/>
    </mx:groupedColumns>
    </mx:AdvancedDataGrid>
    <mx:Button label="Export CSV" click="exportCSV ()"/>
    <mx:TextArea id="console" width="100%" height="100%" />
    </mx:Panel>
    </mx:Application>

    this opensource component has a good sample about copying datagrid data, is not CSV but is Excel compatible (it should be easy to change to CSV)...
    http://flexed.wordpress.com/2007/08/15/customgrid-v12/
    if you need help uploading the file to the server you could take a look in the Flex Documentation for fileupload or FileReference and you should get some examples
    HTH
    Gus

  • How can I download zipped CSV files in Firefox and ensure this happens automatically in future?

    When I attempt to download a zipped CSV file in Firefox, the usual pop-up window appears asking what Firefox should do with this file... even after I select "Open with" and choose my Zip File Manager and tick the box that says "Do this automatically for files like this from now on", this pop-up continues to appear every time I come to download files

    @Corel
    Thanks, I had forgotten all about potential server side problems.
    @Conners81 <br/>
    If sample problem files and links are publicly available maybe you could include an example of the link being used, preferably to one of the smaller simpler files.
    *What is the website you are using?
    For comparison an example you may like to try
    * site providing .csv data [http://www.ofcom.org.uk/static/cmr-10/WAL-3.4.html]
    ** a small few lines csv download file [http://www.ofcom.org.uk/static/cmr-10/csv/WAL-3.4.csv]
    ** similar info as a pdf chart [http://www.ofcom.org.uk/static/cmr-10/pdfs/WAL-3.4.pdf]
    Of course you have the added complication of the zipped file.

  • How to download a CSV file in AL11 to XL into diferent tabs  ?

    Hello All,
            I have a file in AL11 of type CSV.
    When I download this file into XLS from AL11 all the data is downloaded under one tab itself.
    But I want the data in separate columns wherever there is a comma in the line.
    How can I do this ?
    Regards,
    Deepu.K
    null

    Hello manoj,
           Thanks for ur reply.
    But I forgot to mention that I want this functionality when I directly download from AL11..not thru the Program.
    i.e my job is to place the files in the AL11.
    The end users will check the file name across the appropriate folder and then use the Download option in the AL11 Transaction to download it.
    Now when they see the file in AL11 it is with comma separated.
    When they download it ..it's still comma separated and in only one tab.
    I want to avoid this ..
    Is it possible ?
    Regards,
    Deepu.K

  • Time Out during Download of CSV file

    Hello everybody,
    I need some hints regarding CSV Downloads.
    In some cases I am getting just blank pages after starting a CSV Download.
    It seems to be related to the a,ount of data.
    At about 5000 rows the download works fine, but with about 10.000 rows I am getting blank page.
    It does not matter wether the download is started from an interactive report vie the menue or from a static report via the link.
    I know that the query is running at about 20 seconds for the 5.000 rows.
    A look into the Enterprise Manager tells me that the following function is using nearly all the CPU time during this session.
    declare
    rc__ number;
    simple_list__ owa_util.vc_arr;
    complex_list__ owa_util.vc_arr;
    begin
    owa.init_cgi_env(:n__,:nm__,:v__);
    htp.HTBUF_LEN := 63;
    null;
    null;
    simple_list__(1) := 'sys.%';
    simple_list__(2) := 'dbms\_%';
    simple_list__(3) := 'utl\_%';
    simple_list__(4) := 'owa\_%';
    simple_list__(5) := 'owa.%';
    simple_list__(6) := 'htp.%';
    simple_list__(7) := 'htf.%';
    if ((owa_match.match_pattern('f', simple_list__, complex_list__, true))) then
    rc__ := 2;
    else
    null;
    null;
    f(p=>:p);
    if (wpg_docload.is_file_download) then
    rc__ := 1;
    wpg_docload.get_download_file(:doc_info);
    null;
    null;
    null;
    commit;
    else
    rc__ := 0;
    null;
    null;
    null;
    commit;
    owa.get_page(:data__,:ndata__);
    end if;
    end if;
    :rc__ := rc__;
    end;
    My ApEx-Version is 3.1.2.
    Anybody any idea what might cause this problem?
    Regards, Tine.

    Hi,
    if your APEX applications are accessed from Oracle HTTP Server (OHS) you can increase the 'TimeOut' directive in the OHS configuration.
    The default value for this directive is 300 seconds.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14190/netconf.htm#sthref267
    Kind regards,
    Iloon

  • Need help to download csv file in application by writting to outputstream.

    HI All,
    Requirment of my client is donloading CSV file from portal.
    My approach  is:
    On clicking "Download" button in JSP I am calling an action in controller and from here I am redirecting call to DownloadCSV.jsp where i am writing to output stream of response.
    Action called in controller:
         @Jpf.Action(forwards = { @Jpf.Forward(name = StaticConstants.SUCCESS, redirect = true, path = "DownloadCSV.jsp") })
         public Forward gotoReports() {
              Forward forward = new Forward(StaticConstants.SUCCESS);
              return forward;
    Download jsp:
    response.resetBuffer();
         response.reset();
         response.setContentType("application/vnd.ms-excel");
         response.addHeader("Content-Disposition", "attachment;filename="+ companyId +"_Audit_Report.csv");
         ServletOutputStream os = response.getOutputStream();
              os .println();
              os .print("DATE");
              os .print("USER");
    os .println();
    os.flush();
    os.close();
    I am able to download the csv file in excel. But after that i am not able to perform any operation in portal page. Mouser pointer becomes busy and cant click on anything.
    Second approach followed:
    I wrote the code for writting to outputstream of outputresponse in controller action itself and forwarded to the same jsp where my download button resides.
    Problem:
    Download happens perfectly but the excel in csv format contains the portal framework generated content also other than content i wrote to response.
    If u have any other approach to download an excel without redirecting to JSP plz let me know. Coing is being done in 10.2 weblogic portal.
    Please help. Its very urgent.
    Plz let me know how a file can be downloded in portal context without keeping a file at server side. I need to download file by writting to outputstream.
    If it is possible plz attach one small example project also.
    Thanks a ton in advance.
    It is very important plz do reply.

    Hi Srinivas,
    For downloading binary content that is not text/html, the Oracle WebLogic Portal content management tools use javascript in an onclick event handler to set the window URL to the URL of a download pageflow controller: window.location = url. The content management tools are in a portal so it should be possible for you to do the same thing.
    The url is a custom pageflow controller that streams the bytes to the response. It sounds like you already have a pageflow you could recycle to use in that way. You don't want to stay within your portlet pageflow because then you will be streaming bytes into the middle of a portal response. You want a separate download pageflow that you invoke directly, outside of the portal framework (in other words, don't invoke it by rendering a portlet that invokes the pageflow).
    You can set the url to invoke the pageflow directly by giving the path to the pageflow controller from the web root (remember the pageflow path matches the package name of the pageflow controller class) like this: "/content/node/nodeSelected/download/DownloadContentController.jpf"
    By the way, for the case of text/html, the tools uses a standalone portlet URL so that the text/html is not rendered in the browser window, which would replace the portal markup (because the browser renders text/html by default, instead of giving you a download widget or opening some other application to deal with the bytes).

Maybe you are looking for