How to send html table to Excel in PSP?

Hi,
I am writing a plsql server page program that produces multiple tables. I only want to export only one of the tables to Excel by pressing a button/link if possible. How to do that? Currently, if i right clicked on that table, then choose "Export to Excel" it will prompt me for the username/password to log into my application before exporting to Excel. How can I avoid the username/pw portion and export only that table to Excel.
If I use the owa_util.mime_header, I can pass the url to it but it will export all the tables in my psp.
Thanks in advance!
kwong

user464216 wrote:
I am writing a plsql server page program that produces multiple tables. I only want to export only one of the tables to Excel by pressing a button/link if possible. How to do that? Currently, if i right clicked on that table, then choose "Export to Excel" it will prompt me for the username/password to log into my application before exporting to Excel. How can I avoid the username/pw portion and export only that table to Excel.That is a web server authentication issue - not a PL/SQL issue. The web server deems the URL (for the export) as being unauthorised and thus request authentication details from the web browser. This happens before your PL/SQL code is executed. So you cannot deal with this in PL/SQL itself. That base URL is a location definition in the Apache config file - and that is where access to it is configured, together with authentication details.
Please note that there's also a difference between exporting data in a Microsoft Excel format and exporting data in a CSV (Comma Separated Values) format. CSV is not an Excel format. Never was. It has been around long before Excel existed. So please make sure that you use the correct technical terminology when describing a technical problem. Thanks.

Similar Messages

  • How to convert html table with all its css properties into excel , by javascript or jQuery

    hi,
    <script type="text/javascript">
    //working java script
    function CreateExcelSheet()
    var x = Table1.rows
    var xls = new ActiveXObject("Excel.Application")
    xls.Workbooks.Add
    for (i = 0; i < x.length; i++) {
    var y = x[i].cells
    for (j = 0; j < y.length; j++) {
    xls.Cells(i + 1, j + 1).Value = y[j].innerText
    } xls.visible = true
    function write_to_excel()
    str = "";
    debugger;
    var mytable = document.getElementsByTagName("table")[0];
    var rowCount = mytable.rows.length;
    var colCount = mytable.getElementsByTagName("tr")[0].getElementsByTagName("td").length;
    var ExcelApp = new ActiveXObject("Excel.Application");
    var ExcelSheet = new ActiveXObject("Excel.Sheet");
    debugger;
    ExcelSheet.Application.Visible = true;
    for (var i = 0; i < rowCount; i++)
    for (var j = 0; j < colCount; j++)
    str = mytable.getElementsByTagName("tr")[i].getElementsByTagName("td")[j].innerText;
    ExcelSheet.ActiveSheet.Cells(i + 1, j + 1).Value = str;
    //new funtion
    function ExportToExcel(mytblId) {
    debugger;
    var htmltable = document.getElementById('Table1');
    var html = htmltable.innerHTML;
    window.open('data:application/vnd.ms-excel,' + encodeURIComponent(html));
    //new funtion 2
    function write_to_excel2() {
    str = "";
    debugger;
    var mytable = document.getElementById("Table1");
    var rowCount = mytable.rows.length;
    var colCount = mytable.getElementsByTagName("tr")[0].getElementsByTagName("th").length;
    var ExcelApp = new ActiveXObject("Excel.Application");
    var ExcelSheet = new ActiveXObject("Excel.Sheet");
    //ExcelSheet.Application.Visible = true;
    for (var i = 0; i < rowCount; i++)
    for (var j = 0; j < colCount; j++)
    debugger;
    // if (i == 0) {
    // str = mytable.getElementsByTagName("tr")[i].getElementsByTagName("th")[j].innerText;
    str = mytable.getElementsByTagName("tr")[i].getElementsByTagName("td")[j].innerText;
    ExcelSheet.ActiveSheet.Cells(i + 1, j + 1).Value = str;
    ExcelSheet.autofit;
    ExcelSheet.Application.Visible = true;
    DisplayAlerts = true;
    CollectGarbage();
    //csss
    function excelExportHtml(Table1, css1)
    debugger;
    if (css1) {
    var styles = [];
    //grab all styles defined on the page
    $("style").each(function(index, domEle) {
    styles.push($(domEle).html());
    //grab all styles referenced by stylesheet links on the page
    var ajaxCalls = [];
    $("[rel=stylesheet]").each(function() {
    ajaxCalls.push($.get(this.href, '', function(data) {
    styles.push(data);
    return $.when.apply(null, ajaxCalls)
    .then(function() {
    return "<html><style type='text/css'>" + styles.join("\n") + "</style>\n" + table.outerHTML + "</html>";
    else {
    return $.when({ owcHtml: Table1.outerHTML })
    .then(function(result) {
    return "<html>" + result.owcHtml + "</html>";
    //new
    function ExportToExcel() {
    $(document).ready(function() {
    $("#btnExport").click(function(e) {
    window.open('data:application/vnd.ms-excel,' + $('#Table1').html());
    alert("jhhklhhklhklh");
    //new
    $(document).ready(function() {
    debugger;
    $("[id$=myButtonControlID]").click(function(e) {
    window.open('data:application/vnd.ms-excel,' + $('div[id$=divTableDataHolder]').html());
    e.preventDefault();
    alert("k");
    function excel()
    {debugger;
    var tableToExcel = (function() {
    var uri = 'data:application/vnd.ms-excel;base64,'
    , template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>'
    , base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) }
    , format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p]; }) }
    return function(table, name) {
    if (!table.nodeType) table = document.getElementById(table)
    var ctx = { worksheet: name || 'Worksheet', table: table.innerHTML }
    window.location.href = uri + base64(format(template, ctx))
    </script>
    i have tried all the above java script and jquery to convert an html table to excel, data are exporting correctly but i want that css of the table should also implent to excel thats not happening,even the property defined inside td and tr aare not implementing
    in excel

    Hi avinashk89,
    Welcome to post in MSDN forums.
    This is not the right forum for your question. Please post in
    ASP.NET forums where you could get better support.
    Thanks for your understanding.
    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.

  • How to insert html table inside java code

    Hi,
    I want to send an email with data in table format(with rows and columns) .Please tell me how to achieve this in java code .I just want to know the code for making the table in java
    Please help me
    Thanks in advance

    NewUser7 wrote:
    Please tell me how to generate html tables in java. .. Do you know how to produce an HTML table in HTML?
    ..i dont have jspI did not mention JSP. Pure J2SE code can produce HTML, though if done in a web-app., it would generally be done using JSP or Servlets.
    Here is an example of producing HTML in J2SE.
    import javax.swing.*;
    class HtmlTable {
         public static void main(String[] args) {
              int[][] values = {
                   {1,3894,5387},
                   {2,4112,4459},
                   {3,4886,6076}
              String prefix = "<html><body><table>\n";
              final StringBuilder sb = new StringBuilder(prefix);
              sb.append("<tr>");
              sb.append("<th>");
              sb.append("Month");
              sb.append("</th>");
              sb.append("<th>");
              sb.append("Unit A<br>Sales");
              sb.append("</th>");
              sb.append("<th>");
              sb.append("Unit B<br>Sales");
              sb.append("</th>");
              sb.append("</tr>\n");
              for (int ii=0; ii<values.length; ii++) {
                   sb.append("<tr>");
                   for (int jj=0; jj<values[ii].length; jj++) {
                        sb.append("<td>");
                        sb.append("" + values[ii][jj]);
                        sb.append("</td>");
                   sb.append("</tr>\n");
              sb.append("</table>");
              sb.append("</body>");
              sb.append("</html>");
              Runnable r = new Runnable() {
                   public void run() {
                        JOptionPane.showMessageDialog(
                             null,
                             new JTextArea(sb.toString(),20,10) );
                        JOptionPane.showMessageDialog(
                             null,
                             new JLabel(sb.toString()) );
              SwingUtilities.invokeLater(r);
    As an aside, those terms are HTML (an abbreviation) Java (a proper name) & JSP (an abbreviation). Please try to use correct upper/lower case when using technical terms.

  • How to Send Internal table to SAP Spool using Function Modules or Methods?

    Hi Experts,
    How to Send Internal table to SAP Spool using Function Modules or Methods?
    Thanks ,
    Kiran

    This is my code.
    I still get the no ABAP list data for the spool, even tho I can see it sp01?
    REPORT  Z_MAIL_PAYSLIP.
    * Declaration Part *
    tables: PERNR, PV000, T549Q, V_T514D, HRPY_RGDIR.
    infotypes: 0000, 0001, 0105, 0655.
    data: begin of ITAB occurs 0,
      MTEXT(25) type C,
      PERNR like PA0001-PERNR,
      ABKRS like PA0001-ABKRS,
      ENAME like PA0001-ENAME,
      USRID_LONG like PA0105-USRID_LONG,
    end of ITAB.
    data: W_BEGDA like HRPY_RGDIR-FPBEG,
          W_ENDDA like HRPY_RGDIR-FPEND.
    data: RETURN like BAPIRETURN1 occurs 0 with header line.
    data: P_INFO like PC407,
          P_FORM like PC408 occurs 0 with header line.
    data: P_IDX type I,
          MY_MONTH type T549Q-PABRP,
          STR_MY_MONTH(2) type C,
          MY_YEAR type T549Q-PABRJ,
          STR_MY_YEAR(4) type C,
          CRLF(2) type x value '0D0A'.
    data: W_CMONTH(10) type C.
    data: TAB_LINES type I,
          ATT_TYPE like SOODK-OBJTP.
    data: begin of P_INDEX occurs 0,
            INDEX type I,
    end of P_INDEX.
    constants: begin of F__LTYPE, "type of line
       CMD like PC408-LTYPE value '/:',  "command
       TXT like PC408-LTYPE value 's',   "textline
    end of F__LTYPE.
    constants: begin of F__CMD, "commands
      NEWPAGE like PC408-LINDA value '',
    end of F__CMD.
    data: P_LIST like ABAPLIST occurs 1 with header line.
    *data: OBJBIN like SOLISTI1 occurs 10 with header line,
    data: OBJBIN like  LVC_S_1022 occurs 10 with header line,
          DOCDATA like SODOCCHGI1,
          OBJTXT like SOLISTI1 occurs 10 with header line,
          OBJPACK like SOPCKLSTI1 occurs 1 with header line,
          RECLIST like SOMLRECI1 occurs 1 with header line,
          OBJHEAD like SOLISTI1 occurs 1 with header line,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_buffer type string,
          l_no_of_bytes TYPE i,
          l_pdf_spoolid LIKE tsp01-rqident,
          l_jobname     LIKE tbtcjob-jobname.
    data: file_length  type int4,
          spool_id     type rspoid,
          line_cnt     type i.
    *-------------------------------------------------------------------* * INITIALIZATION *
    OBJBIN = ' | '.
    append OBJBIN.
    OBJPACK-HEAD_START = 1.
    data: S_ABKRS like PV000-ABKRS.
    data: S_PABRP like T549Q-PABRP.
    data: S_PABRJ like T549Q-PABRJ.
    * SELECTION SCREEN                                                  *
    selection-screen begin of block BL1.
    parameters: PAY_VAR like BAPI7004-PAYSLIP_VARIANT default 'ESS_PAYSLIPS' obligatory.
    selection-screen end of block BL1.
    START-OF-SELECTION.
      s_ABKRS = PNPXABKR.
      S_PABRP = PNPPABRP.
      s_pabrj = PNPPABRJ.
      w_begda = PN-BEGDA.
      w_endda = PN-ENDDA.
    get pernr.
    *                                 "Check active employees
      rp-provide-from-last p0000 space pn-begda  pn-endda.
      CHECK P0000-STAT2 IN PNPSTAT2.
    *                                 "Check Payslip Mail flag
      rp-provide-from-last p0655 space pn-begda  pn-endda.
      CHECK P0655-ESSONLY = 'X'.
      rp-provide-from-last p0001 space pn-begda  pn-endda.
    *                                 "Find email address
      RP-PROVIDE-FROM-LAST P0105 '0030' PN-BEGDA PN-ENDDA.
      if p0105-usrid_LONG ne ''.
        ITAB-PERNR      = P0001-PERNR.
        ITAB-ABKRS      = P0001-ABKRS.
        ITAB-ENAME      = P0001-ENAME.
        ITAB-USRID_LONG = P0105-USRID_LONG.
        append itab.
        clear itab.
      endif.
      "SY-UCOMM ='ONLI'
    END-OF-SELECTION.
    *------------------------------------------------------------------* start-of-selection.
      write : / 'Payroll Area        : ', S_ABKRS.
      write : / 'Payroll Period/Year : ',STR_MY_MONTH,'-',STR_MY_YEAR. write : / 'System Date : ', SY-DATUM.
      write : / 'System Time         : ', SY-UZEIT.
      write : / 'User Name           : ', SY-UNAME.
      write : / SY-ULINE.
      sort ITAB by PERNR.
      loop at ITAB.
        clear : P_INFO, P_FORM, P_INDEX, P_LIST, OBJBIN, DOCDATA, OBJTXT, OBJPACK, RECLIST, TAB_LINES.
        refresh : P_FORM, P_INDEX, P_LIST, OBJBIN, OBJTXT, OBJPACK, RECLIST.
    *                                                  Retrieve Payroll results sequence number for this run
        select single * from HRPY_RGDIR where PERNR eq ITAB-PERNR
                                        and FPBEG ge W_BEGDA
                                        and FPEND le W_ENDDA
                                        and SRTZA eq 'A'.
    *                                                  Produce payslip for those payroll results
        if SY-SUBRC = 0.
          call function 'GET_PAYSLIP'
            EXPORTING
              EMPLOYEE_NUMBER = ITAB-PERNR
              SEQUENCE_NUMBER = HRPY_RGDIR-SEQNR
              PAYSLIP_VARIANT = PAY_VAR
            IMPORTING
              RETURN          = RETURN
              P_INFO          = P_INFO
            TABLES
              P_FORM          = P_FORM.
          check RETURN is initial.
    *                                                 remove linetype from generated payslip
          loop at p_form.
            objbin = p_form-linda.
            append objbin.
            line_cnt = line_cnt + 1.
          endloop.
          file_length = line_cnt * 1022.
    *                                                 create spool file of paylsip
          CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL'
            EXPORTING
              i_file_length = file_length
            IMPORTING
              e_spoolid     = spool_id
            TABLES
              it_textdata   = objbin.
          IF sy-subrc EQ 0.
            WRITE spool_id.
          ENDIF.
          DESCRIBE table objbin.
          DATA PDF LIKE TLINE OCCURS 100 WITH HEADER LINE.
          CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
            EXPORTING
              SRC_SPOOLID                    = spool_id
              NO_DIALOG                      = ' '
              DST_DEVICE                     = 'MAIL'
    *      PDF_DESTINATION                =
    *    IMPORTING
    *      PDF_BYTECOUNT                  = l_no_of_bytes
    *      PDF_SPOOLID                    = l_pdf_spoolid
    *      LIST_PAGECOUNT                 =
    *      BTC_JOBNAME                    =
    *      BTC_JOBCOUNT                   =
            TABLES
              PDF                            = pdf
            EXCEPTIONS
              ERR_NO_ABAP_SPOOLJOB           = 1
              ERR_NO_SPOOLJOB                = 2
              ERR_NO_PERMISSION              = 3
              ERR_CONV_NOT_POSSIBLE          = 4
              ERR_BAD_DESTDEVICE             = 5
              USER_CANCELLED                 = 6
              ERR_SPOOLERROR                 = 7
              ERR_TEMSEERROR                 = 8
              ERR_BTCJOB_OPEN_FAILED         = 9
              ERR_BTCJOB_SUBMIT_FAILED       = 10
              ERR_BTCJOB_CLOSE_FAILED        = 11
              OTHERS                         = 12
          IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    *Download PDF file C Drive
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename = 'C:\itab_to_pdf.pdf'
          filetype = 'BIN'
        TABLES
          data_tab = pdf.
    * Transfer the 132-long strings to 255-long strings
    *  LOOP AT pdf.
    *    TRANSLATE pdf USING ' ~'.
    *    CONCATENATE gd_buffer pdf INTO gd_buffer.
    *  ENDLOOP.
    *  TRANSLATE gd_buffer USING '~ '.
    *  DO.
    *    it_mess_att = gd_buffer.
    *    APPEND it_mess_att.
    *    SHIFT gd_buffer LEFT BY 255 PLACES.
    *    IF gd_buffer IS INITIAL.
    *      EXIT.
    *    ENDIF.
    *  ENDDO.
          OBJHEAD = 'Objhead'.
          append OBJHEAD.
    * preparing email subject
          concatenate W_ENDDA(6)
                    ' Payslip-'
                    ITAB-ENAME+0(28)
                    ITAB-PERNR+4(4) ')'
                 into DOCDATA-OBJ_DESCR.
          DOCDATA-OBJ_NAME = 'Pay Slip'.
          DOCDATA-OBJ_LANGU = SY-LANGU.
          OBJTXT = 'Pay Slip.'.
          append OBJTXT.
    *prepare email lines
          OBJTXT = DOCDATA-OBJ_DESCR.
          append OBJTXT.
          OBJTXT = 'Please find enclosed your current payslip.'.
          append OBJTXT.
    * Write Attachment(Main)
    * 3 has been fixed because OBJTXT has fix three lines
          read table OBJTXT index 3.
    *    DOCDATA-DOC_SIZE = ( 3 - 1 ) * 255 + strlen( OBJTXT ).
          clear OBJPACK-TRANSF_BIN.
          OBJPACK-HEAD_START = 1.
          OBJPACK-HEAD_NUM = 0.
          OBJPACK-BODY_START = 1.
          OBJPACK-BODY_NUM = 3.
          OBJPACK-DOC_TYPE = 'RAW'.
          append OBJPACK.
    * Create Message Attachment
          ATT_TYPE = 'PDF'.
          describe table OBJBIN lines TAB_LINES.
          read table OBJBIN index TAB_LINES.
    *    OBJPACK-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + strlen( OBJBIN ).
          OBJPACK-TRANSF_BIN = 'X'.
          OBJPACK-HEAD_START = 1.
          OBJPACK-HEAD_NUM = 0.
          OBJPACK-BODY_START = 1.
          OBJPACK-BODY_NUM = TAB_LINES.
          OBJPACK-DOC_TYPE = ATT_TYPE.
          OBJPACK-OBJ_NAME = 'ATTACHMENT'.
          OBJPACK-OBJ_DESCR = 'Payslip'.
          append OBJPACK.
    * Create receiver list refresh RECLIST.
          clear RECLIST.
          RECLIST-RECEIVER = itab-USRID_long.
          translate RECLIST-RECEIVER to lower case.
          RECLIST-REC_TYPE = 'U'.
          append RECLIST.
    * Send the document
    *SO_NEW_DOCUMENT_ATT_SEND_API1
          call function 'SO_DOCUMENT_SEND_API1'
            exporting
              DOCUMENT_DATA = DOCDATA
              PUT_IN_OUTBOX = 'X'
              COMMIT_WORK = 'X'
    * IMPORTING
    *   SENT_TO_ALL =
    *   NEW_OBJECT_ID =
            tables
              PACKING_LIST  = OBJPACK
              OBJECT_HEADER = OBJHEAD
              CONTENTS_BIN  = pdf
              CONTENTS_TXT  = OBJTXT
    *   CONTENTS_HEX =
    *   OBJECT_PARA =
    *   OBJECT_PARB =
              RECEIVERS = RECLIST
            exceptions
              TOO_MANY_RECEIVERS = 1
              DOCUMENT_NOT_SENT = 2
              DOCUMENT_TYPE_NOT_EXIST = 3
              OPERATION_NO_AUTHORIZATION = 4
              PARAMETER_ERROR = 5
              X_ERROR = 6
              ENQUEUE_ERROR = 7
              others = 8.
          if SY-SUBRC NE 0.
            ITAB-MTEXT = 'Message Not Sent to : '.
          else.
            ITAB-MTEXT = 'Message Sent to : '.
          endif.
    *    else.
    *      ITAB-MTEXT = 'Message Not Sent to : '.
    *    endif.
        else.
          "SY-SUBRC Not = 0
          ITAB-MTEXT = 'Payroll data not found : '.
        endif.
        "end of SY-SUBRC = 0.
        modify ITAB.
      endloop. "end loop at ITAB
      sort ITAB by MTEXT PERNR.
      loop at ITAB.
        at new MTEXT.
          uline.
          write : / ITAB-MTEXT color 4 intensified on.
          write : / 'Emp. Code' color 2 intensified on,
                 12 'Emp. Name' color 2 intensified on,
                 54 'Email ID' color 2 intensified on.
        endat.
        write : / ITAB-PERNR, 12 ITAB-ENAME, 54 ITAB-USRID_LONG.
      endloop.

  • 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

  • How to send HTML mail with images multipart/related message

    Hi,
    Could any body tell me how to send HTML mail with images in "multipart/related" message,if any body can give the code ,it would be helpful.
    Thanks

    Hi,
    Could any body tell me how to send HTML mail with
    ith images in "multipart/related" message,if any body
    can give the code ,it would be helpful.
    ThanksHi!
    Refer to
    http://developer.java.sun.com/developer/onlineTraining/JavaMail/index.html
    I've found it very helpful.
    Look at the last part for a code showing how to send HTML mail!
    Regards

  • How to send HTML Format Mail using Java Mail in oracle 9i Forms

    Dear All
    could you please tell me how to send HTML Format Mail using Java Mail in oracle 9i Forms and how to implement the java mail ?
    if it is possible, could you please send me the sample code? please very urgent
    Thanks
    P.Sivaraman

    Hello,
    <p>Here is a Form sample.</p>
    Francois

  • How to send html email made in dreamweaver

    how to send html email made in dreamweaver

    Make sure you upload all of the images used in your email to a server you control. Then, change your image paths to point to those uploaded images with absolute links.
    You will get marked as spam if you attempt to send images as attachments to a large list of recipients and most email clients won't download images to begin with, so make sure your html email makes sense with broken pictures.
    CSS support is spotty across email clients, if you use css, make sure it's inline, not embedded in the <head> or externally linked in the <head>. Some email clients strip out the <head> section entirely.
    Basically, you need to design your html email as if you haven't moved out of the 90's yet, as far as web design is concerned, in order to get maximum cross client compatibility.
    Then, when you're ready, I would suggest using a service like www.icontact.com or www.constantcontact.com if your subscriber list is anywhere over 100 or so recipients.

  • How to send html newsletter via Mail app

    I want crystal and clear instruction as all the ones I have found either old fashioned and not relevant or skip that interesting part.
    I have already done html page (newsletter). Now I want to transform it somehow and send via Mail app so my contacts could receive it as html newsletter. If I need to attach txt message please add it to the instruction. I need complete how to send html newsletter.

    alabanco wrote:
    thanks. Now we've got to the most interesting part and intriguing one. Why should I upload html page to the server. I do understand uploading the images to server which will be used as links in my html mail. But why and how should I store that page in my server if I have CMS post instead from which I used pictures as links. SHould I create yet another type of post in CMS that is my html newsletter? That's not cool. What is the industry standard approach for that?
    By the way Mail.app uses that baby design templates for your messages. Why don't we have an option to delete all these creepy childish templates and store solid bold corporate style templates for newsletters and send it somehow? Or will it just attach the images to the message then? If so then it is not what I want and it is really depressing.
    The industry convention/"standard" is not to use html in email. Wheteher or not your html newsletter displays as you intended is at the mercy of the recipient and their email client settings.
    If you want to preserve your html layout and styles, save your newsletter as a pdf document and attach the pdf document to your email. Or, as already suggested, use a web server to serve your html newsletter.

  • How to send HTML DOM to Servlet?

    How to send HTML DOM to Servlet?

    What exactly you mean by sending DOM to servlet?? if you want to post the entire html to servlet use XMLHttp object and post the entire html to servlet. You can get more info on XMLHttp at microsoft's MSDN site.

  • How to send database table

    how to send database table one sever to another server in the form of  tms request.
    i want send a particular database table one server to another as a request.
    give solution plz
    Message was edited by:
            mahesh

    Hi Mahesh,
    Technically it is possible to transport entries of every table in SAP even if changes dont prompt for a transport request. Do the following. Create a customising/workbench request. It depends of the table whose entires you wish to transport. .If you wish you can just  use workbench transport for all tables.
    After you have created the transport click on the request and in menu bar choose Request/Task and then Display object list. Goto change mode.
    Click on Inset line icon in application tool bar. A new line for input will come up.
    In PGMID give the value R3TR
    In Obj give value TABU
    In Object Name give the name of the table.
    After that double click on table name entry. You will come to the screen: Transport organizer:Change Key List.
    Here again choose insert line. A new line with table  name and key as the column headers will come up.
    Double click on the empty input field for the key. In the next screen you will get options to fill in the key.
    You can insert key as per your choice. However one thing needs to be remembered. If you put * in any field SAP wont allow you fill in value in later fields as only a final asterisk can be used as a generic entry.
    Please try out this option. I use this option to transport RFC destinations as well profile parameters across systems.
    Please award points if the answer was of help to you.
    Regards.
    Ruchit.

  • How to extract HTML table contents

    Does someone know how to extract HTML table contents? I want to download a html file which contains table from internet and extract the table contents. Finally, insert the table contents into database.

    To do this you have to user a Parser to parse your html file and retrieve the information you want.
    Please have a look at the following classes:
    HTMLEditorKit.ParserCallback
    ParserDelegator()
    Here is an example which retrives the FRAMSET src of an html file. The purpose here is to find if the html file describes a multi-frame page or not. If so it add the frame src name to a Vector
    HTMLEditorKit.ParserCallback callback =
    new HTMLEditorKit.ParserCallback() {                      public void handleSimpleTag(HTML.Tag t,      MutableAttributeSet a, int pos)
         if (t.equals(HTML.Tag.FRAME))
    {                                          Logger.debug(this, "Frame tag found in "+f.getURL());                      Enumeration e = a.getAttributeNames();
    while (e.hasMoreElements())
                             Object name = e.nextElement();
                             if (name.toString().equals("src"))
                                  Object ob = a.getAttribute(name);                     
                                  Logger.debug("found an src "+ob);
                                  currentFrameSrc.add(new String(ob.toString()));
                   Reader reader = new FileReader(aFile);
                        new ParserDelegator().parse(reader, callback, false);
    It's not clean but I hope it will help :-)
    Stephane

  • To Send HTML Format and excel file attachment  in same mail

    Dear All,
            Have requerment ,to send a mail options HTML table format and same data in excel file attachement.have capable to do the html format using methods BCS .but how to send excel format attachment in same  mail.
    Please guide me how to do it.
    Regards ,
    Santhu
    Edited by: santosh jajur on Apr 9, 2010 1:54 PM

    Santhosh,
    please check the code:
    report bcs_example_7.
    This report provides an example for sending an Excel
    attachment in Unicode Systems
    constants:
      gc_tab  type c value cl_bcs_convert=>gc_tab,
      gc_crlf type c value cl_bcs_convert=>gc_crlf.
    parameters:
      mailto type ad_smtpadr
       default 'ur mail id'.                    "#EC *
    data send_request   type ref to cl_bcs.
    data document       type ref to cl_document_bcs.
    data recipient      type ref to if_recipient_bcs.
    data bcs_exception  type ref to cx_bcs.
    data main_text      type bcsy_text.
    data binary_content type solix_tab.
    data size           type so_obj_len.
    data sent_to_all    type os_boolean.
    start-of-selection.
      perform create_content.
      perform send.
    form send.
      try.
          send_request = cl_bcs=>create_persistent( ).
        create document object from internal table with text
          append 'Hello world!' to main_text.                   "#EC NOTEXT
          document = cl_document_bcs=>create_document(
            i_type    = 'RAW'
            i_text    = main_text
            i_subject = 'Test Created By BCS_EXAMPLE_7' ).      "#EC NOTEXT
        add the spread sheet as attachment to document object
          document->add_attachment(
            i_attachment_type    = 'xls'                        "#EC NOTEXT
            i_attachment_subject = 'ExampleSpreadSheet'         "#EC NOTEXT
            i_attachment_size    = size
            i_att_content_hex    = binary_content ).
        add document object to send request
          send_request->set_document( document ).
        --------- add recipient (e-mail address) -----------------------
        create recipient object
          recipient = cl_cam_address_bcs=>create_internet_address( mailto ).
        add recipient object to send request
          send_request->add_recipient( recipient ).
        ---------- send document ---------------------------------------
          sent_to_all = send_request->send( i_with_error_screen = 'X' ).
          commit work.
          if sent_to_all is initial.
            message i500(sbcoms) with mailto.
          else.
            message s022(so).
          endif.
      endtry.
    endform.                    "send
    form create_content.
      data lv_string type string.
      data ls_t100 type t100.
    columns are separated by TAB and each line ends with CRLF
      concatenate 'This Is Just Example Text!'                  "#EC NOTEXT
                  gc_crlf gc_crlf
                  into lv_string.
    header line
      concatenate lv_string
                  'MSGID'    gc_tab
                  'MSGNO'    gc_tab
                  'Language' gc_tab                             "#EC NOTEXT
                  'Text'     gc_crlf                            "#EC NOTEXT
                  into lv_string.
    data lines
      select * from t100 into ls_t100
        where arbgb = 'SO' and msgnr = '182'.
        concatenate lv_string
                    ls_t100-arbgb gc_tab
                    ls_t100-msgnr gc_tab
                    ls_t100-sprsl gc_tab
                    ls_t100-text  gc_crlf
                    into lv_string.
      endselect.
      select * from t100 into ls_t100
        where arbgb = 'SO' and msgnr = '316'.
        concatenate lv_string
                    ls_t100-arbgb gc_tab
                    ls_t100-msgnr gc_tab
                    ls_t100-sprsl gc_tab
                    ls_t100-text  gc_crlf
                    into lv_string.
      endselect.
      try.
          cl_bcs_convert=>string_to_solix(
            exporting
              iv_string   = lv_string
              iv_codepage = '4103'  "suitable for MS Excel, leave empty
              iv_add_bom  = 'X'     "for other doc types
            importing
              et_solix  = binary_content
              ev_size   = size ).
        catch cx_bcs.
          message e445(so).
      endtry.
    endform.                    "create_content
    Thanks.

  • How to download internal table to excel sheet

    I have a requirement to download nearly 8 to 10 internal tables to excel sheets(for each internal table one excel sheet) without displaying the diolog box showing open and save buttons.
    scenario :
      I will enter the path name like this -   C:\myfolder\Custom_programs.xls.
                                                            C:\myfolder\Custom_tables.xls.
                                                            (File name does not exit..it has to created inside the    
                                                                specified folder)
      in submit button I populate 2 internal tables say it1 and it2. then I need to move the tables contents to the path I have specified above.
    attach_file_to_response method is not working for the above reqt since it is showing the dialog box.
    Please provide a suitable solution...

    Please ignore all the responders that are stating that you can use GUI_DOWNLOAD from Web Dynpro ABAP.  As you found out, this absolutely will not work, since this function module and other download logic like it depends upon a connection to the SAPGUI. People posting to use the GUI_DOWNLOAD from WDA need to learn a little more about the architecture of WDA before they go posting incorrect repsonses in the forum. I have little tollerance for people posting outright incorrect information in the WDA Forum.
    What you want to do - download silent - is not easily done from WDA.  There are rules about how web applications must behave in a browser.  Normal HTML/JavaScript does not allow silent downloads for security reasons.  Obviously there are many untrustworthy websites on the internet that you wouldn't want to allow to directly access your local machine.  WDA must live within these same browser limitations.
    SAP has done some work using a Java Applet to get around some of these security issues.  This funcitonality comes in NetWeaver 7.01.  It is the AcfUpDownload UI element:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/b9157c878a2d67e10000000a42189c/frameset.htm
    However it is designer for usage with the Content or KPro server - so even it might not meet your needs.

  • ADF Desktop Integration : How to delete the table in Excel?

    Hi,
    I am using Jdev 11.1.1.3.0 and Excel 2007 for Oracle ADF DI, I had created an ADF table using pageDef file in the excel. Now I wanted to delete that table and use a different pageDef file.
    I could not find a way to delete that table.
    I deleted full row of tables and then I used different pageDef file and created a new adf table. But when I am running this version of excel, I am getting runtime exception and excel is getting corrupted.
    My question how to delete the table not corrupting the Excel.
    Thanks
    Pavan

    Pavan,,
    Welcome to OTN.
    You can delete the table by selecting the top left column (of the table) and then select delete from the ADFdi tab.
    Refer the documentation for more info.
    http://docs.oracle.com/cd/E17904_01/web.1111/e10139/get_start_dev_tools.htm#ADFDI608
    -Arun

Maybe you are looking for

  • How to install Acrobat Reader in a different drive?

    Hello!, I was just wondering if anyone out there knows how can I install Acrobat Reader in a different drive than just directly in C:. It goes by default there whenever I try to download it from the site, and there's no option anywhere to choose wher

  • How to calculate a KPI

    Hello. I'm using Essbase Administration Services 9.3.1 and I've a problem. I would like to calculate a KPI with a formula like this: (percent variance between actual and budget * weight) / (# of indicators * sum of weights) I translate it in this way

  • Import package into Eclipse?

    I've downloaded a package. It is a file called extra.jar. I've placed the file in my workspace along with all my other files in my current project. When I write import extra.*; it says that 'extra can not be resolved'. How do I fix this?

  • Jampack Symphony / keyboard issue. . .

    I am really loving Symphony JamPack to bring full strings to overlay over guitar and vocal tracks. (I'm using real instruments controlled by a fairly simple keyboard (M-Audio). I am having some trouble doing certain things, like a slide of trombone o

  • What is the DebugTmp.txt that showed up on my computer?

    In my documents folder I found a file called DebugTmp.txt, what is this? Is it a virus? What should I do about it?