Need help in writing data from JSP to excel

Hi ,
I need help in writing the data from JSP to excel.I somehow able to retrieve the data into excel but unable to get the required format.
For eg: The amount should be displayed in 0.00 format .when i am exporting it to excel it is displaying as 0 :( .
I am using the following code in JSP.
"out.print(amt + '\t');"
Would like to know if there is any otherway where in i can get my requirement.
Thanks
Tom

Hi,
Try using format part of the JSTL tag libs.
Syntax :
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<fmt:formatNumber value="40" pattern="$#,##0.00"/>
I need help in writing the data from JSP to excel.I
somehow able to retrieve the data into excelHow do u convert the jsp to excel?
One way to convert the jsp page to excel, is to render it as an excel appl instead of html. Set the content type of the response to application/ms-excel.
response.setContentType("application/ms-excel")Hope this Helps....

Similar Messages

  • Gurus..need help in reading data from virtual infocube

    Gurus,
    I have to read data from an virtual infocube...I am trying to use FM RSDRI_INFOPROV_READ to read data but it doesn't work..
    I am doing exactly what has been done in the demo program RSDRi_INFOPROV_READ_DEMO...
    Please help me...its really URGENT...
    Thanks
    sam

    Check out this thread....
    must be helpful
    Re: Read data from 0BWTC_C02 via ABAP

  • Need help in passing data from one page to other page in oaf

    Dear All,
    I have a requirement as below.
    I am doing some selection in one page and populating the data in another page table region, next time when i am selecting another row and pressing the button i need to display the previous row as well as new row, how can i achieve this, currently i am able to see only the first row what i selected first.
    Ex: 1 st scenario: after passing the selected data from one page to base page the data looks like below in base page.
    1 test desc
    2nd scenarios: when i am again selcting data and passing to the base page it should be like that
    1 test desc
    2 test desc
    but currently it is showing
    1 test desc only for the 2nd case, can any one please help me on thsi , its little bit urgent
    Thnaks

    How are you passing the values to the base page? Are you using setting the retainAM parameter to true while doing a forward.

  • Need Help in reading data from URLConnection in servlets

    hi i created GUI which sends d username n password to the servlets via URLConnection.n am sending the same to Server program via sockets.but when i read d data in the servlet am getting only null value...need help here....
    This is my button's ActionPerformed code
    private void LoginActionPerformed(java.awt.event.ActionEvent evt) {
    String uname = UserName.getText();
    char [] pwd = PassWord.getPassword();
    String pword = new String(pwd);
    try
    String url = "http://localhost:8080/MIMServlets/hit";
    URL ucon = new URL(url);
    URLConnection conn = ucon.openConnection();
    conn.setDoOutput(true);
    conn.setDoInput(true);
              conn.setUseCaches (false);
    conn.setDefaultUseCaches (false);
    conn.setRequestProperty("Content-Type", "text/plain");
    System.out.println(uname);
         System.out.println(pword);
         PrintWriter out = new PrintWriter( conn.getOutputStream() );
    BufferedReader in = new BufferedReader(
    new InputStreamReader(
    conn.getInputStream()));
         out.print(uname);
    out.print(pword);
         out.close();
    String inputLine = in.readLine();
    Status.setText(inputLine);// TODO add your handling code here:
    }catch(MalformedURLException e)
    System.out.println("Exception"+e);
    catch(IOException e1)
    System.out.println("Exception"+e1);
    This is my Servlet code........
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class MIMServlets extends HttpServlet
    PrintWriter out,out1;
         BufferedReader in,in1;
         String host = "localhost";
         String fromServer = "";
         String username,password;
         int a;
         public void init()
    out=null;
    out1=null;
    public void doPost(HttpServletRequest request,HttpServletResponse
                   response)throws ServletException,IOException
              response.setContentType("text/html");
              out=response.getWriter();
              try{
              InetAddress address = InetAddress.getByName(host);
    Socket theSocket = new Socket(address, 4444);
    out1 = new PrintWriter(theSocket.getOutputStream(),true);
    in = new BufferedReader(new InputStreamReader(theSocket.getInputStream()));
    in1 = new BufferedReader(new InputStreamReader(request.getInputStream()));
              String username = in1.readLine();
              String password = in1.readLine();
    System.out.println(username);
              System.out.println(password);
    out1.println(username);
              out1.println(password);
              out1.println("Yahoo");
              out1.flush();
    while ((fromServer = in.readLine()) != null)
    out.println("From Server: " + fromServer);
              break;
         out1.close();
    in.close();
    theSocket.close();
         }catch(IOException e)
    System.out.println("Exception");
    System.exit(-1);
              public void destroy()
         out.close();
    thanks in advance.......

    Follow below example to using FM 'READ_TEXT'
    DATA  BEGIN OF i_tlines OCCURS 0.
            INCLUDE STRUCTURE tline.
    DATA  END   OF i_tlines.
    DATA: w_textname(70) TYPE c.
      w_textname = vbdkr-vbeln.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          client                        = sy-mandt
          id                            = 'Z006'
          language                      = 'E'
          name                          = w_textname
          object                        = 'VBBK'
        TABLES
          lines                         = i_tlines.
      IF sy-subrc = 0.
        READ TABLE i_tlines INDEX 1.
        t_in-m1 = i_tlines-tdline.   "Now t_in_m1 will have the value
      ENDIF.
    Regards,
    SaiRam

  • Need help in transferring data from flatfiles to SAP R/3 tables

    Hi,
    I need to *transfer data in the flatfiles (NON SAP SYSTEM) to SAP R/3 tables*. Can we do it with a help of program ?
    Please help me out
    Thanks and regards,
    Shiva shekar k

    Hi Shiva,
        This code will be helpful to you.
    *Code used to create BDC
    *& Report  ZBDC                                               *
    *& Example BDC program, which updates net price of item 00010 of a     *
    *& particular Purchase order(EBELN).                                   *
    REPORT  ZBDC  NO STANDARD PAGE HEADING
                          LINE-SIZE 132.
    Data declaration
    TABLES: ekko, ekpo.
    TYPES: BEGIN OF t_ekko,
        ebeln TYPE ekko-ebeln,
        waers TYPE ekko-waers,
        netpr TYPE ekpo-netpr,
        err_msg(73) TYPE c,
    END OF t_ekko.
    DATA: it_ekko  TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko  TYPE t_ekko,
          it_error TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_error TYPE t_ekko,
          it_success TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_success TYPE t_ekko.
    DATA: w_textout            LIKE t100-text.
    DATA: gd_update TYPE i,
          gd_lines TYPE i.
    *Used to store BDC data
    DATA: BEGIN OF bdc_tab OCCURS 0.
            INCLUDE STRUCTURE bdcdata.
    DATA: END OF bdc_tab.
    *Used to stores error information from CALL TRANSACTION Function Module
    DATA: BEGIN OF messtab OCCURS 0.
            INCLUDE STRUCTURE bdcmsgcoll.
    DATA: END OF messtab.
    *Screen declaration
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME
                                        TITLE text-001. "Purchase order Num
    SELECT-OPTIONS: so_ebeln FOR ekko-ebeln OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK block1.
    SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME
                                        TITLE text-002. "New NETPR value
    PARAMETERS:  p_newpr(14)   TYPE c obligatory.  "LIKE ekpo-netpr.
    SELECTION-SCREEN END OF BLOCK block2.
    *START-OF-SELECTION
    START-OF-SELECTION.
    Retrieve data from Purchase order table(EKKO)
      SELECT ekkoebeln ekkowaers ekpo~netpr
        INTO TABLE it_ekko
        FROM ekko AS ekko INNER JOIN ekpo AS ekpo
          ON ekpoebeln EQ ekkoebeln
       WHERE ekko~ebeln IN so_ebeln AND
             ekpo~ebelp EQ '10'.
    *END-OF-SELECTION
    END-OF-SELECTION.
    Check data has been retrieved ready for processing
      DESCRIBE TABLE it_ekko LINES gd_lines.
      IF gd_lines LE 0.
      Display message if no data has been retrieved
        MESSAGE i003(zp) WITH 'No Records Found'(001).
        LEAVE TO SCREEN 0.
      ELSE.
      Update Customer master data (instalment text)
        LOOP AT it_ekko INTO wa_ekko.
          PERFORM bdc_update.
        ENDLOOP.
      Display message confirming number of records updated
        IF gd_update GT 1.
          MESSAGE i003(zp) WITH gd_update 'Records updated'(002).
        ELSE.
          MESSAGE i003(zp) WITH gd_update 'Record updated'(003).
        ENDIF.
    Display Success Report
      Check Success table
        DESCRIBE TABLE it_success LINES gd_lines.
        IF gd_lines GT 0.
        Display result report column headings
          PERFORM display_column_headings.
        Display result report
          PERFORM display_report.
        ENDIF.
    Display Error Report
      Check errors table
        DESCRIBE TABLE it_error LINES gd_lines.
      If errors exist then display errors report
        IF gd_lines GT 0.
        Display errors report
          PERFORM display_error_headings.
          PERFORM display_error_report.
        ENDIF.
      ENDIF.
    *&      Form  DISPLAY_COLUMN_HEADINGS
          Display column headings
    FORM display_column_headings.
      WRITE:2 ' Success Report '(014) COLOR COL_POSITIVE.
      SKIP.
      WRITE:2 'The following records updated successfully:'(013).
      WRITE:/ sy-uline(42).
      FORMAT COLOR COL_HEADING.
      WRITE:/      sy-vline,
              (10) 'Purchase Order'(004), sy-vline,
              (11) 'Old Netpr'(005), sy-vline,
              (11) 'New Netpr'(006), sy-vline.
      WRITE:/ sy-uline(42).
    ENDFORM.                    " DISPLAY_COLUMN_HEADINGS
    *&      Form  BDC_UPDATE
          Populate BDC table and call transaction ME22
    FORM bdc_update.
      PERFORM dynpro USING:
          'X'   'SAPMM06E'        '0105',
          ' '   'BDC_CURSOR'      'RM06E-BSTNR',
          ' '   'RM06E-BSTNR'     wa_ekko-ebeln,
          ' '   'BDC_OKCODE'      '/00',                      "OK code
          'X'   'SAPMM06E'        '0120',
          ' '   'BDC_CURSOR'      'EKPO-NETPR(01)',
          ' '   'EKPO-NETPR(01)'  p_newpr,
          ' '   'BDC_OKCODE'      '=BU'.                      "OK code
    Call transaction to update customer instalment text
      CALL TRANSACTION 'ME22' USING bdc_tab MODE 'N' UPDATE 'S'
             MESSAGES INTO messtab.
    Check if update was succesful
      IF sy-subrc EQ 0.
        ADD 1 TO gd_update.
        APPEND wa_ekko TO it_success.
      ELSE.
      Retrieve error messages displayed during BDC update
        LOOP AT messtab WHERE msgtyp = 'E'.
        Builds actual message based on info returned from Call transaction
          CALL FUNCTION 'MESSAGE_TEXT_BUILD'
               EXPORTING
                    msgid               = messtab-msgid
                    msgnr               = messtab-msgnr
                    msgv1               = messtab-msgv1
                    msgv2               = messtab-msgv2
                    msgv3               = messtab-msgv3
                    msgv4               = messtab-msgv4
               IMPORTING
                    message_text_output = w_textout.
        ENDLOOP.
      Build error table ready for output
        wa_error = wa_ekko.
        wa_error-err_msg = w_textout.
        APPEND wa_error TO it_error.
        CLEAR: wa_error.
      ENDIF.
    Clear bdc date table
      CLEAR: bdc_tab.
      REFRESH: bdc_tab.
    ENDFORM.                    " BDC_UPDATE
          FORM DYNPRO                                                   *
          stores values to bdc table                                    *
    -->  DYNBEGIN                                                      *
    -->  NAME                                                          *
    -->  VALUE                                                         *
    FORM dynpro USING    dynbegin name value.
      IF dynbegin = 'X'.
        CLEAR bdc_tab.
        MOVE:  name TO bdc_tab-program,
               value TO bdc_tab-dynpro,
               'X'  TO bdc_tab-dynbegin.
        APPEND bdc_tab.
      ELSE.
        CLEAR bdc_tab.
        MOVE:  name TO bdc_tab-fnam,
               value TO bdc_tab-fval.
        APPEND bdc_tab.
      ENDIF.
    ENDFORM.                               " DYNPRO
    *&      Form  DISPLAY_REPORT
          Display Report
    FORM display_report.
      FORMAT COLOR COL_NORMAL.
    Loop at data table
      LOOP AT it_success INTO wa_success.
        WRITE:/      sy-vline,
                (10) wa_success-ebeln, sy-vline,
                (11) wa_success-netpr CURRENCY wa_success-waers, sy-vline,
                (11) p_newpr, sy-vline.
        CLEAR: wa_success.
      ENDLOOP.
      WRITE:/ sy-uline(42).
      REFRESH: it_success.
      FORMAT COLOR COL_BACKGROUND.
    ENDFORM.                    " DISPLAY_REPORT
    *&      Form  DISPLAY_ERROR_REPORT
          Display error report data
    FORM display_error_report.
      LOOP AT it_error INTO wa_error.
        WRITE:/      sy-vline,
                (10) wa_error-ebeln, sy-vline,
                (11) wa_error-netpr CURRENCY wa_error-waers, sy-vline,
                (73) wa_error-err_msg, sy-vline.
      ENDLOOP.
      WRITE:/ sy-uline(104).
      REFRESH: it_error.
    ENDFORM.                    " DISPLAY_ERROR_REPORT
    *&      Form  DISPLAY_ERROR_HEADINGS
          Display error report headings
    FORM display_error_headings.
      SKIP.
      WRITE:2 ' Error Report '(007) COLOR COL_NEGATIVE.
      SKIP.
      WRITE:2 'The following records failed during update:'(008).
      WRITE:/ sy-uline(104).
      FORMAT COLOR COL_HEADING.
      WRITE:/      sy-vline,
              (10) 'Purchase Order'(009), sy-vline,
              (11) 'Netpr'(010), sy-vline,
              (73) 'Error Message'(012), sy-vline.
      WRITE:/ sy-uline(104).
      FORMAT COLOR COL_NORMAL.
    ENDFORM.                    " DISPLAY_ERROR_HEADINGS

  • Need Help: Generate Customer Data from Prod Database

    Hi All,
    My company have an Oracle Financial System, with and old version Oracle Application 11.0.3 and Oracle Database 8.0.5. The database name PROD. This system has been use for more than 7 years and in between there were many stuff resigned without handover and therefore many records and supporting steps cannot be trace back. However the system is still keep running and updated daily.
    Recently we have a user request to generate out a list of customer company name, and their related products purchase from the database, this is because they does not have any methods to print out the list from application. Unfortunately, we do not know which tables or index is actualy storing the name of the customer and products. We have the list of below users accounts that able to log in to the database.
    PA/PA
    APPLSYS/APPS
    APPS/APPS
    ALR/ALR
    AX/AX
    AK/AK
    GL/GLRG/RG
    FA/FAHR/HR
    SSP/SSP
    HXT/HXT
    OTA/OTA
    RLA/RLA
    VEH/VEH
    QA/QA
    ICX/ICX
    AZ/AZ
    AP/AP
    AR/AR
    OE/OE
    OSM/OSM
    NSM/NSM2020
    CN/CN
    MFG/MFG
    INV/INV
    PO/PO
    BOM/BOM
    ENG/ENG
    MRP/MRP
    CRP/CRP
    WIP/WIP
    CZ/CZ
    PJM/PJM
    FLM/FLM
    MSC/MSC
    CS/CS
    CE/CE
    EC/EC
    JG/JG
    APPS/APPS
    All the reference documents is no longer exist. I am able to use SQL Plus to generate the list of tables with the command : select table_name from user_tables. Each user accounts will return different kind of table names. But still I cant locate which table that actually storing the name of the customers and products.
    Is that anybody got hands on this case before? Urgent

    We have this table: And need to unload this table data in flat file format.
    Need help with unload SQL file with these two columns:
    AMT_PAID_ORIG, AMT_PAID_ADJ
    SQL> desc flconv.claim_adj_less
    Name Null? Type
    SAK_CLAIM_ADJ_LESS NUMBER(10)
    SAK_CLAIM_ADJ NUMBER(10)
    ADJ_CLAIM_ICN NUMBER(13)
    ORIGINAL_CLAIM_ICN NUMBER(13)
    DATE_PAID_ORIG NUMBER(8)
    DATE_PAID_ADJ NUMBER(8)
    AMT_PAID_ORIG NUMBER(10,2)
    AMT_PAID_ADJ NUMBER(10,2)
    SAK_PROV_LOC NUMBER(9)
    SAK_FUND_CODE NUMBER(9)
    CHECK_SAK NUMBER(9)
    SAK_PUB_HLTH NUMBER(9)

  • Need help in storing data from JList into a vector

    need help in doing the following.-
    alright i click a skill on industryskills Jlist and press the add button and it'll be added to the applicantskills Jlist. how do i further store this data that i added onto the applicantskills JList into a vector.
    here are the codes:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.text.*;
    import java.util.*;
    import java.util.Vector;
    import javax.swing.JScrollPane.*;
    //import javax.swing.event.ListSelectionListener;
    public class Employment extends JFrame
            //declare class variables
            private JPanel jpApplicant, jpEverything,jpWEST, jpCENTRE, jpEAST, jpAddEditDelete,
                                       jpCentreTOP, jpCentreBOT, jpEastTOP, jpEastCENTRE, jpEastBOT,
                                       jpBlank1, panel1, panel2, panel3, panel4,jpBottomArea,
                                       jpEmptyPanelForDisplayPurposes;
            private JLabel jlblApplicantForm, jlblAppList, jlblName, jlblPhone,
                                       jlblCurrentSalary, jlblPassword, jlblDesiredSalary,
                                       jlblNotes, jlblApplicantSkills, jlblIndustrySkills,
                                       jlblBlank1, jlblBlank2, ApplicantListLabel,
                                       NotesListLabel, ApplicantSkillsLabel,
                                       IndustrySkillsLabel,jlblEmptyLabelForDisplayPurposes;  
            private JButton jbtnAdd1, jbtnEdit, jbtnDelete, jbtnSave, jbtnCancel,
                                            jbtnAdd2, jbtnRemove;
            private JTextField jtfName, jtfPhone, jtfCurrentSalary, jtfPassword,
                                               jtfDesiredSalary;
              private JTabbedPane tabbedPane;
            private DefaultListModel /*listModel,*/listModel2;
              String name,password,phone,currentsalary,desiredsalary,textareastuff,NotesText;
              String selectedname;
            final JTextArea Noteslist= new JTextArea();;
            DefaultListModel listModel = new DefaultListModel();
            JList ApplicantSkillsList = new JList(listModel);
           private ListSelectionModel listSelectionModel;
            JList ApplicantList, /*ApplicantSkillsList,*/ IndustrySkillsList;
            //protected JTextArea NotesList;    
                    //Vector details = new Vector();
                  Vector<StoringData> details = new Vector<StoringData>();             
                public static void main(String []args)
                    Employment f = new Employment();
                    f.setVisible(true);
                    f.setDefaultCloseOperation(EXIT_ON_CLOSE);
                    f.setResizable(false);
                }//end of main
                    public Employment()
                            setSize(800,470);
                            setTitle("E-commerce Placement Agency");
                                  Font listfonts = new Font("TimesRoman", Font.BOLD, 12);
                            JPanel topPanel = new JPanel();
                            topPanel.setLayout( new BorderLayout() );
                            getContentPane().add( topPanel );
                            createPage1();
                            createPage2();
                            createPage3();
                            createPage4();
                            tabbedPane = new JTabbedPane();
                            tabbedPane.addTab( "Applicant", panel1 );
                            tabbedPane.addTab( "Job Order", panel2 );
                            tabbedPane.addTab( "Skill", panel3 );
                            tabbedPane.addTab( "Company", panel4 );
                            topPanel.add( tabbedPane, BorderLayout.CENTER );
            public void createPage1()//PAGE 1
                 /*******************TOP PART********************/
                            panel1 = new JPanel();
                            panel1.setLayout( new BorderLayout());
                                  jpBottomArea = new JPanel();
                                  jpBottomArea.setLayout(new BorderLayout());
                            jpApplicant= new JPanel();
                            jpApplicant.setLayout(new BorderLayout());
                            Font bigFont = new Font("TimesRoman", Font.BOLD,24);
                            jpApplicant.setBackground(Color.lightGray);
                            jlblApplicantForm = new JLabel("\t\t\t\tAPPLICANT FORM  ");
                            jlblApplicantForm.setFont(bigFont);
                            jpApplicant.add(jlblApplicantForm,BorderLayout.EAST);
                            panel1.add(jpApplicant,BorderLayout.NORTH);
                            panel1.add(jpBottomArea,BorderLayout.CENTER);
           /********************************EMPTY PANEL FOR DISPLAY PURPOSES*************************/
                               jpEmptyPanelForDisplayPurposes = new JPanel();
                               jlblEmptyLabelForDisplayPurposes = new JLabel(" ");
                               jpEmptyPanelForDisplayPurposes.add(jlblEmptyLabelForDisplayPurposes);
                               jpBottomArea.add(jpEmptyPanelForDisplayPurposes,BorderLayout.NORTH);
           /*****************************************WEST*********************************/             
                            jpWEST = new JPanel();                 
                            jpWEST.setLayout( new BorderLayout());
                            //Applicant List
                                  listModel2=new DefaultListModel();
                                  ApplicantList = new JList(listModel2);
                                listSelectionModel = ApplicantList.getSelectionModel();
                                listSelectionModel.addListSelectionListener(new SharedListSelectionHandler());
                                JScrollPane scrollPane3 = new JScrollPane(ApplicantList);
                                  ApplicantList.setPreferredSize(new Dimension(20,40));
                                 scrollPane3.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);                                             
                                scrollPane3.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
                            ApplicantListLabel = new JLabel( "Applicant List:");
                            jpWEST.add(ApplicantListLabel,"North"); 
                            jpWEST.add(scrollPane3,"Center");
                            jpBottomArea.add(jpWEST,BorderLayout.WEST);
                            /*********CENTRE*********/
                            jpCENTRE = new JPanel();
                            jpCENTRE.setLayout(new GridLayout(2,1));
                            jpCentreTOP = new JPanel();
                            jpBottomArea.add(jpCENTRE,BorderLayout.CENTER);
                            jpCENTRE.add(jpCentreTOP);
                            jpCentreTOP.setLayout(new GridLayout(6,2));
                              //Creating labels and textfields
                            jlblName = new JLabel( "Name:");
                            jlblBlank1 = new JLabel ("");
                            jtfName = new JTextField(18);
                            jlblBlank2 = new JLabel("");
                            jlblPhone = new JLabel("Phone:");
                            jlblCurrentSalary = new JLabel("Current Salary:");
                            jtfPhone = new JTextField(13);
                            jtfCurrentSalary = new JTextField(7);
                            jlblPassword = new JLabel("Password:");
                            jlblDesiredSalary = new JLabel("Desired Salary:");
                            jtfPassword = new JTextField(13);
                            jtfDesiredSalary = new JTextField(6);
                              //Add labels and textfields to panel
                            jpCentreTOP.add(jlblName);
                            jpCentreTOP.add(jlblBlank1);
                            jpCentreTOP.add(jtfName);
                            jpCentreTOP.add(jlblBlank2);
                            jpCentreTOP.add(jlblPhone);
                            jpCentreTOP.add(jlblCurrentSalary);
                            jpCentreTOP.add(jtfPhone);
                            jpCentreTOP.add(jtfCurrentSalary);
                            jpCentreTOP.add(jlblPassword);
                            jpCentreTOP.add(jlblDesiredSalary);
                            jpCentreTOP.add(jtfPassword);
                            jpCentreTOP.add(jtfDesiredSalary);
                            //Noteslist
                            jpCentreBOT = new JPanel();
                            jpCentreBOT.setLayout( new BorderLayout());
                            jpCENTRE.add(jpCentreBOT);
                            jpBlank1 = new JPanel();
                             //     Noteslist = new JTextArea(/*Document doc*/);
                            JScrollPane scroll3=new JScrollPane(Noteslist);
                                scroll3.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);                                             
                                scroll3.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
                            NotesListLabel = new JLabel( "Notes:");
                            jpCentreBOT.add(NotesListLabel,"North"); 
                            jpCentreBOT.add(scroll3,"Center");
                            jpCentreBOT.add(jpBlank1,"South");
                            jpBottomArea.add(jpCENTRE,BorderLayout.CENTER);
                            /**********EAST**********/
                            //Applicant Skills Panel
                            //EAST ==> TOP
                            jpEAST = new JPanel();
                            jpEAST.setLayout( new BorderLayout());
                            jpEastTOP = new JPanel();
                            jpEastTOP.setLayout( new BorderLayout());
                            ApplicantSkillsLabel = new JLabel( "Applicant Skills");
                            JScrollPane scrollPane1 = new JScrollPane(ApplicantSkillsList);
                               scrollPane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);                                             
                              scrollPane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);                                             
                            ApplicantSkillsList.setVisibleRowCount(6);
                            jpEastTOP.add(ApplicantSkillsLabel,"North"); 
                            jpEastTOP.add(scrollPane1,"Center");
                            jpEAST.add(jpEastTOP,BorderLayout.NORTH);
                            jpBottomArea.add(jpEAST,BorderLayout.EAST);
                            //Add & Remove Buttons
                            //EAST ==> CENTRE
                            jpEastCENTRE = new JPanel();
                            jpEAST.add(jpEastCENTRE,BorderLayout.CENTER);
                            jbtnAdd2 = new JButton("Add");
                            jbtnRemove = new JButton("Remove");
                            //add buttons to panel
                            jpEastCENTRE.add(jbtnAdd2);
                            jpEastCENTRE.add(jbtnRemove);
                            //add listener to button
                           jbtnAdd2.addActionListener(new Add2Listener());
                           jbtnRemove.addActionListener(new RemoveListener());
                            //Industry Skills Panel
                            //EAST ==> BOTTOM
                            jpEastBOT = new JPanel();
                            jpEastBOT.setLayout( new BorderLayout());
                           String[] data = {"Access97", "Basic Programming",
                           "C++ Programming", "COBOL Programming",
                           "DB Design", "Fortran programming"};
                           IndustrySkillsList = new JList(data);
                           JScrollPane scrollPane = new JScrollPane(IndustrySkillsList);
                           scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);                                             
                           scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
                           IndustrySkillsLabel = new JLabel( "Industry Skills:");
                           jpEastBOT.add(IndustrySkillsLabel,"North"); 
                           jpEastBOT.add(scrollPane,"Center");
                           jpEAST.add(jpEastBOT,BorderLayout.SOUTH);
                            //BOTTOM
                            jpAddEditDelete= new JPanel();
                            jbtnAdd1=       new JButton("Add");
                            jbtnEdit=       new JButton("Edit");
                            jbtnDelete=     new JButton("Delete");
                            jbtnSave=       new JButton("Save");
                            jbtnCancel=     new JButton("Cancel");
                            jpAddEditDelete.add(jbtnAdd1);
                            jpAddEditDelete.add(jbtnEdit);
                            jpAddEditDelete.add(jbtnDelete);
                            jpAddEditDelete.add(jbtnSave);
                            jpAddEditDelete.add(jbtnCancel);
                               jbtnEdit.addActionListener(new EditListener());
                               jbtnDelete.addActionListener(new DeleteListener());
                                jbtnEdit.addActionListener(new EditListener());
                            jbtnAdd1.addActionListener(new Add1Listener());
                            jbtnCancel.addActionListener(new CancelListener());
                            jpBottomArea.add(jpAddEditDelete,BorderLayout.SOUTH);
            public void createPage2()//PAGE 2
                    panel2 = new JPanel();
                    panel2.setLayout( new GridLayout(1,1) );
                    panel2.add( new JLabel( "Sorry,under construction" ) );
            public void createPage3()//PAGE 3
                    panel3 = new JPanel();
                    panel3.setLayout( new GridLayout( 1, 1 ) );
                    panel3.add( new JLabel( "Sorry,under construction" ) );
            public void createPage4()//PAGE 4
                    panel4 = new JPanel();
                    panel4.setLayout( new GridLayout( 1, 1 ) );
                    panel4.add( new JLabel( "Sorry,under construction" ) );
            public class Add1Listener implements ActionListener
            public void actionPerformed(ActionEvent e)
                    name = jtfName.getText();
                    password = jtfPassword.getText();
                    phone = jtfPhone.getText();
                    currentsalary = jtfCurrentSalary.getText();
                    int i= Integer.parseInt(currentsalary);
                    desiredsalary = jtfDesiredSalary.getText();
                    int j= Integer.parseInt(desiredsalary);
                       StoringData person = new StoringData(name,password,phone,i,j);
                   //     StoringData AppSkillsList = new StoringData(listModel);
                    details.add(person);
                 //     details.add(AppSkillsList);
                  listModel2.addElement(name);
                    jtfName.setText("");
                    jtfPassword.setText("");
                    jtfPhone.setText("");
                    jtfCurrentSalary.setText("");
                    jtfDesiredSalary.setText("");
    //                NotesList.setText("");
            public class Add2Listener implements ActionListener
                    public void actionPerformed(ActionEvent e)
                           String temp1;
                           temp1 = (String)IndustrySkillsList.getSelectedValue();
                           listModel.addElement(temp1);
            public class RemoveListener implements ActionListener
                    public void actionPerformed(ActionEvent e)
                            int index = ApplicantSkillsList.getSelectedIndex();
                                listModel.remove(index);
            public class EditListener implements ActionListener
                    public void actionPerformed(ActionEvent e)
                            jtfName.setEditable(true);
                            jtfPassword.setEditable(true);
                            jtfPhone.setEditable(true);
                            jtfCurrentSalary.setEditable(true);
                            jtfDesiredSalary.setEditable(true);
                            Noteslist.setEditable(true);
                            jbtnAdd2.setEnabled(true);               
                            jbtnRemove.setEnabled(true);
                            jbtnSave.setEnabled(true);
                            jbtnCancel.setEnabled(true);                     
            public class DeleteListener implements ActionListener
                    public void actionPerformed(ActionEvent e)
                        int index1 = ApplicantList.getSelectedIndex();
                            listModel2.remove(index1);
            public class SaveListener implements ActionListener
                    public void actionPerformed(ActionEvent e)
            public class CancelListener implements ActionListener
                    public void actionPerformed(ActionEvent e)
                    jtfName.setText("");
                    jtfPassword.setText("");
                    jtfPhone.setText("");
                    jtfCurrentSalary.setText("");
                    jtfDesiredSalary.setText("");                         
            public class SharedListSelectionHandler implements ListSelectionListener
            public void valueChanged(ListSelectionEvent e)
             selectedname =ApplicantList.getSelectedValue().toString();
             StoringData selectedPerson = null;
             jtfName.setEditable(false);
             jtfPassword.setEditable(false);
             jtfPhone.setEditable(false);
             jtfCurrentSalary.setEditable(false);
             jtfDesiredSalary.setEditable(false);                                 
             Noteslist.setEditable(false);
             jbtnAdd2.setEnabled(false);               
             jbtnRemove.setEnabled(false);
             jbtnSave.setEnabled(false);
             jbtnCancel.setEnabled(false);
                   for (StoringData person : details)
                          if (person.getName1().equals(selectedname))
                                 selectedPerson = person;
                                 jtfName.setText(person.getName1());
                                 jtfPassword.setText(person.getPassword1());
                              jtfPhone.setText(person.getPhone1());
                              //String sal1 = Integer.parseString(currentsalary);
                             // String sal2 = Integer.parseString(desiredsalary);
                             // jtfCurrentSalary.setText(sal1);
                             // jtfDesiredSalary.setText(sal2);
                                 break;
                   //     if (selectedPerson != null)
    }

    Quit posting 300 line programs to ask a question. We don't care about your entire application. We only care about code that demonstrates your current problem. We don't want to read through 300 lines to try and find the line of code that is causing the problem.
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.
    Here is a simple SSCCE. Now make your changes and if you still have problems you have something simple to post. If it works then you add it to your real application.
    Learn to simplify your problem by simplifying the code.
    import java.awt.*;
    import javax.swing.*;
    public class ListTest2 extends JFrame
         JList list;
         public ListTest2()
              String[] numbers = { "one", "two", "three", "four", "five", "six", "seven" };
              list = new JList( numbers );
              JScrollPane scrollPane = new JScrollPane( list );
              getContentPane().add( scrollPane );
         public static void main(String[] args)
              ListTest2 frame = new ListTest2();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.setSize(200, 200);
              frame.setLocationRelativeTo( null );
              frame.setVisible( true );
    }

  • Need help in loading data from a csv file to a table in Oracle DB

    Hi,
    I am using sqlplus as a client to connect to the server.
    I am trying to load data from a csv file from a client to a table in Oracle DB server.
    I am trying to use the below command
    " LOAD DATA INFILE 'test.csv' INTO TABLE testTable FIELDS TERMINATED BY ',' (test1,test2,testc3,testc4); "
    But, I am encountered with the following error
    "SP2-0042: unknown command "load data" - rest of line ignored."
    Thanks in advance.
    SB

    Hey Frostmann,
    That was a nice post....
    I changed my mind to use an 'Insert into' statement from a shell script.
    I created a DB table named test and I tried using the below shell script to insert a row in the table.
    sqlplus test/test@test <<ENDOFSQL
    INSERT INTO test VALUES('test1',123,'test2','test3');
    exit
    ENDOFSQL
    A row is succesfully inserted into the table when I run the script manually, but it does not insert rows when a cron job is scheduled.
    Could you please help me with this?
    Thanks in advance.
    SB

  • Need help pulling correct data from MAS90

    I am trying to pull data from payroll and am not getting the correct amounts.  Part of the information is for the current pay period and the other information is for year to date data.  The current information is coming from one file and the year to date from another file.  I can get the correct information to pull if I insert only the current period fields or year to date fields, but when I have both in the report, I don't get the correct amounts to pull.  I asssume this has to do with the linking of the fields.  I have played with this and can't get it to work.
    Thank you,
    Deb

    MAS90 is an OEM partner of ours. For database connectivity issues please contact them. Once connected if you have issues designing reports then we can help.

  • Need help in migrating data from SQL Server to Oracle

    Hi,
    I've created a database link in my Oracle Database 11g Express Edition connecting to our SQL Server 2005 Enterprise Database. Now, I'm having issues on migrating some fields. Mostly Text field in SQL Server to CLOB in Oracle. I've created a PL/SQL Procedure to do this but somehow these columns don't get all the value.
    For example:
    In my sql server, I have a table SQLTBL with a field REMARKS of TEXT data type. It has the following value.
    This is line 1.
    This is line 2.
    This is line 3.
    Now I created a table ORCLTBL in oracle with field REMARKS of CLOB data type.
    In my procedure I do something like.
    begin
      for i in ( select "remarks" rem from "dbo"."sqltbl"@sqldb )
      loop
        insert into orcltbl ( remarks ) values (i.rem);
      end loop;
      commit;
    end;
    /When I select the data from oracle it will only show "This is line 1" and disregard the values after the new line character.
    Is there a way to make this work?
    Thanks,
    Allen

    Allen Sandiego wrote:
    Hi,
    I've created a database link in my Oracle Database 11g Express Edition connecting to our SQL Server 2005 Enterprise Database. Now, I'm having issues on migrating some fields. Mostly Text field in SQL Server to CLOB in Oracle. I've created a PL/SQL Procedure to do this but somehow these columns don't get all the value.
    For example:
    In my sql server, I have a table SQLTBL with a field REMARKS of TEXT data type. It has the following value.
    This is line 1.
    This is line 2.
    This is line 3.
    Does the above mean, you have Three records or it is One record spanning in Three lines?
    Now I created a table ORCLTBL in oracle with field REMARKS of CLOB data type.
    In my procedure I do something like.
    begin
    for i in ( select "remarks" rem from "dbo"."sqltbl"@sqldb )
    loop
    insert into orcltbl ( remarks ) values (i.rem);
    end loop;
    commit;
    end;
    /When I select the data from oracle it will only show "This is line 1" and disregard the values after the new line character.
    Probably, assuming that there is only One record, SQL server is sending the data as separate rows as opposed to a Single Row.
    Can you provide the Output of below when executed from Oracle terminal? (I hope you understand the motive of query, and pardon my knowledge of SQL Server if the query below does not work :) )
    select count("remarks"), "remarks" rem from "dbo"."sqltbl"@sqldb group by "remarks";

  • Download data from jsp to Excel

    Originally, when I was using tomcat as the web server (installed at my local machine), I wrote a jsp which allows users to download Oracle table data to a Excel file. When the user clicks "Download" data, a "File Download" dialog box pops up and asks whether the user want to "Open this file from its current location" or "Save this file to disk". That is what I want.
    Now, I migrate the application to OC4J (installed at Sun Solaris Server), the same program is not working as the same way as above. If the user clicks the link, then the program simply display the jsp page. In order to download data, the user needs to right click the link and selects "Save Target as".
    How to make the application work just like it works on tomcat? Is this a programming issue or a server configuration issue?
    Thanks.
    Jingzhi

    Hi,
    I am having the same exact problem that you had months ago. Would love to hear if you came up with a solution? Original post included below...
    Thanks,
    Andres
    ORIGINAL POST:
    Hi
    I could successfully send the data from a jsp file to a excel file. But, I have a problem with the data. The data i pass is normally alpha numeric, but some times the data is something like '00123456'. In such cases, i am loosing the leading zeros and get '123456'. Is there any way i can get around with this problem?
    Help is greatly appreciated.
    Bharat

  • Writing data from Java to Excel

    Hi,
    I am trying to writhe data from Java to an Excel Sheet by using JACOB.
    This is my code :
    import java.util.*;
    import java.io.*;
    //import cost.util.*;
    import com.jacob.com.*;
    import com.jacob.activeX.*;
    class XLStock
         public static void main(String argv[])
              XLStock xls = new XLStock();
              xls.main2(argv);
         public void main2(String argv[])
              System.setSecurityManager(null);
              System.runFinalizersOnExit(true);
              Vector v = new Vector();
              XLSPutItem pi;
              String sheetfile = null;
              ActiveXComponent xl;
              Object xlo=null;
              Object workbooks;
              Object workbook;
              Object sheets;
              Variant vOptn = new Variant();
              vOptn.noParam();
              try
                   xl = new ActiveXComponent("Excel.Application");
                   xlo = xl.getObject();
                   Dispatch.put(xlo, "Visible", new Variant(true));
                   xl.setProperty("Visible", new Variant(true));
                   workbooks = xl.getProperty("Workbooks").toDispatch();
                   Variant vTemp = new Variant(argv[0]);
                   workbook = Dispatch.invoke(workbooks, "Open", Dispatch.Method,
                        new Variant[] {vTemp, vOptn, vOptn, vOptn, vOptn, vOptn, vOptn, vOptn, vOptn, vOptn, vOptn, vOptn, vOptn},
                        new int[1]).toDispatch();
                   sheets = Dispatch.get(workbook,"Sheets").toDispatch();
                   pi = new XLSPutItem();
                   if (pi.Parse("1:A1;ciao;6"))
                        v.addElement(pi);
                   for (int i=0; i<v.size(); i++)
                        pi = (XLSPutItem)v.elementAt(i);
                        pi.sheet = Dispatch.invoke(sheets, "Item", Dispatch.Get, new Object[] {new Variant(pi.sheetNumber)}, new int[1]).toDispatch();
                        pi.cell = Dispatch.invoke(pi.sheet, "Range", Dispatch.Get, new Object[] {pi.cellName}, new int[1]).toDispatch();
              catch (Exception e)
                   e.printStackTrace();
              pi = (XLSPutItem)v.firstElement();
              Dispatch.put(pi.cell, "Value", "ciao");
    What happen is that my code always fail at this line :
    xl = new ActiveXComponent("Excel.Application");
    whit this error :
    C:\VJWorks\JNI\jxls>java jxls.XLStock
    com.jacob.com.ComFailException: Can't co-create object
    at com.jacob.com.Dispatch.createInstance(Native Method)
    at com.jacob.com.Dispatch.<init>(Dispatch.java)
    at com.jacob.activeX.ActiveXComponent.<init>(ActiveXComponent.java)
    at jxls.XLStock.main2(XLStock.java:53)
    at jxls.XLStock.main(XLStock.java:28)
    Exception in thread "main" java.util.NoSuchElementException
    at java.util.Vector.firstElement(Vector.java:450)
    at jxls.XLStock.main2(XLStock.java:79)
    at jxls.XLStock.main(XLStock.java:28)
    I task that something is wrong in my system configuration.
    I work on a Win2000 platform and Office 97.
    Someone knows the reason of this error and can suggest what to make.
    Thanks in advance.
    Antonio M.

    Antonio, maybe you can post this back to the Jacob list. As an alternative to Jacob, what about Apache POI or writing the data as comma-delimited and opening the file using Runtime?
    Hope that may help.
    Good luck.

  • Export data from JSP to Excel on click on button

    Hi,
    I want to display the table data in my Jsp to Excel on click of "Export to Excel" icon, The data in my jsp table is dynamic, only click of "export to Excel" icon i want the contents of the table needs to be exported to Excel. Can pls anyone help me in doing this..
    Thanks & Regards
    Sowmya.J

    On click of the button, you will have to reuse the same java code which you used to populate the table in the JSP except that you will have to create an excel file with the data you got using suitable excel api's (look for POI api). Write the stream to the response and the browser will take care of opening a dialog to save/open the file.

  • Writing data from labview to excel

    Hi, currently I'm trying to get an array of data from labview into a specific excel file everytime.
    The attachment i have is a program creating a new worksheet everytime it runs. I couldn't figure out how to make it work. Anyone can help me? 
    Attachments:
    Excel Copy Example.vi ‏19 KB

    So what is the specific problem? What is it doing that is incorrect? If the problem is that it is creating a new file every time its because the first subVI is opening a spreadsheet template file. Or at least I think it is since all of the subvis are missing...
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Need help in writing NVARCHAR2 column to an excel sheet

    Hi All,
    I have a NVARCHAR2 column in my table. I want to store the data present in the column into an excel file. When i write the data to an excel file the data is getting converted to some other form. It's not in human readable form.
    Language is not fixed for the column.
    I need help in storing the NVARCHAR2 data into an excel file without any implicit conversion done by the oracle.
    Please help.
    Thanks,
    Girish G
    Edited by: Girish G on Jul 14, 2011 2:02 AM

    Export data to BLOB (csv)

Maybe you are looking for

  • MR11 Modification

    Friends, In MR11 TC.. input selection Only PO date is available, Our User requires GRN Date as additional option, Is it possible to add the fields in the Standard Report throgh any Enhanchments Please help. Thanks & Regards BK

  • Exchange rate difference while posting ME21N MIGO and MIRO

    Hi All, I am facing one problem with exchange rate type between M and EURX  and EURX is maintanined in the SPRO>SAP Netweaver>General Settings>currencies>Check Exchange rate types EXRT :  EURX Usage    :  EMU Reg,fixed                        Ref.Curr

  • Making a DVD from iMovie 8

    I have read some of the earlier posts and replies, so I think I know some of the answers to my question (and I'm not encouraged). I have made an hour long movie in iMovie 8 based on video taping I did for business using miniDV. I need to make a DVD o

  • Problem in structure start with charecter type

    i am doing a upgrade of an abap program which is written in 4.6 to  ecc 6.0 i am facing a unicode error problem in the old program there is  a sap standrad structure called arc_buffer  so in this program they have used the structure  as below code   

  • Using "calc' function to show if the cell is editable(EVDRE Reports)

    Hello All, I have a question regarding using the "calc' property in my dimension 'ACCOUNT' in a EvDRE report to display the rows as calculated or input ready cells. I have developed an input template by opening a blank workbook and typing in EVDRE().