Export to excel in a webdynpro java app to store a excel file on the server

Hi Experts,
We have a requirement wherein we need to implement the export to excel functionality in a webdynpro java application.
The excel file created in this way should be stored in the server location.
I've implmented the export to excel functionality before but the file used to get stored on to my local desktop. But this time, I want the file to get stored on some portal server location.
Can anyone guide me with the steps for the same?
It would be really great if you can tell me what to change in my code for this new functionality as I've already implemented this functionality to store the file on my local desktop before.
Regards,
Anurag

Not Required anymore.

Similar Messages

  • Is there a way to open Excell file from the server and display in the UI and save it back on to the

    Hello there,
    Is there a way to open Excell file from the server and display in the UI and save it back on to the server? (like showing xell file as a datagrid - add rows, columns etc.)

    Hi Mike,
    Welcome you to the forum.
    You may try:
    SELECT * FROM MyDBNameHere.dbo.OUSR T0
    Thanks,
    Gordon

  • Upload an excel file in the server  with a background job

    I am trying to upload an excel file in the server, but i only can upload flat files, i can upload files in local with the function ALSM_EXCEL_TO_INTERNAL_TABLE, can i use this function reading an excel file in the server, or is there another possibility of uploadinging an excel file in the server  with a background job ?
    thanks in advance

    Hi
    First read the file from the server to some temporary place at presentation layer and then open it. And if required, save it to the server afterwards. To read/write files to application server you can use:
    1. Statements "OPEN DATASET/CLOSE DATASET".
    2. There are some FMs for server file operations, like "C13Z_FILE_UPLOAD_BINARY" and "C13Z_FILE_DOWNLOAD_BINARY".
    *--Serdar

  • Upload a excel file on the server

    Hi
    I am developing a Software and in that software in one module we have to upload the excel file on the serverand then loading in to the server Database.But i dont know howt to upload it on the server as i dont get any help from the net also...
    Thanks in advance.....
    Thanks
    Sandeep Bhalwal

    hi
    http://forum.java.sun.com/thread.jspa?threadID=518038&messageID=2471953love google
    http://www.oop-reserch.com/index.html
    http://www.google.co.in/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=G2l&q=upload+file+and+store+into+database+in+jsp+with+example&btnG=Search&meta=

  • Bitmap is not exporting to excel file

    Any kind help appreciated.
    I have added a bitmap image in my workbook but when i am exporting it into excel or html ,only text part of the title is exporting into excel file .
    The bitmap is only visible in discoverer workbook ,after exporting to excel or html, it disappears,
    i am using oracle 9i discoverer version 9.0.2.0
    thanks,

    Hi,
    Bitmaps in the workbook titles are not exported. I guess it was just too difficult to do when they added bitmaps into the titles.
    Rod West

  • Inputting an excel file to the java servlet program

    Hi,
    How can I input an excel file into the java servlet program? I am using POI HSSF programming to read the content of that excel file.I have created a form that will accept the path from the user and in the servlet program, I have called a post method to retrieve the path of the file. I am getting the path of the file as a string.Then I have to access the file to read the data. But it is not working. What should I do?.Please help me.
    I have created an html file to create a form that will ask the path of the file to be loaded into the servlet program.Please give me a solution,thanks in advance. The servlet program that receives the file is shown below. It just only take the name of the file and prints if that is ok.
    <html>
    <body bgcolor="green">
    <center>
    <form method="post"  action="http://localhost:8080/examples/servlet/Ron1">
    <table>
    <tr>
    <td><B>ENTER THE PATH OF THE FILE</td>
    <td><input type=file name="path"></td>
    </tr>
    </table>
    <input type=submit value= "submit" >
    </form>
    </body>
    </html>
    import java.io.*;
    import javax.servlet.*;
    import java.lang.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.text.*;
    import java.util.*;
    import com.oreilly.servlet.MultipartRequest;
    import org.apache.poi.hssf.usermodel.*;
    public class Ron1 extends HttpServlet
       public void doPost(HttpServletRequest request, HttpServletResponse response)   throws IOException, ServletException
            response.setContentType("text/html");
            PrintWriter out = response.getWriter();
            String u = request.getParameter("FileToUpload");
            out.println("The Path is "+u);
            System.out.println("The path is "+u);
            MultipartRequest multi = new MultipartRequest(request,u,10 * 1024 * 1024);
            System.out.println("path is "+u);
            Enumeration files = multi.getFileNames();
            File fUploadedFile = null;
            String sFileName = "";
            out.println("path is "+u);
            while(files.hasMoreElements())
                            String name = (String)files.nextElement();
                            out.println("file is "+name);
                            sFileName = multi.getFilesystemName(name);
                            String type = multi.getContentType(name);
                            fUploadedFile = multi.getFile(name);
                    FileInputStream fis= new FileInputStream(fUploadedFile);
                   HSSFWorkbook wb=new HSSFWorkbook(fis);
                    System.out.println("The path is "+u);
                    out.println("File has identified successfully\n");
                    out.close();
       }

    Hi,
    Can you try to use classes from java.net package (URL, URLConnection) to pass the contents of excel file to servlet?
    HTH
    Vishal

  • How to format the font in Cell when export to Excel file?

    Dear all,
    I am using the CRJ SDK 12 to export to Excel file, but i i want to format the font of Cells in Excel when exporting them.
    Can you help me to solve this issue?
    Thanks,
    Nha

    There's no control over per-cell formatting for Excel exports.
    Sincerely,
    Ted Ueda

  • How to dump a excel file in the mysql db?

    Hi,
    I just want to dump a excel file in the mysql db.
    Can you please tell, how it can be done?
    what steps should I taken for that?
    Please help me.
    Thanks

    gauravjlj wrote:
    Hi,
    I just want to dump a excel file in the mysql db.
    Can you please tell, how it can be done?
    what steps should I taken for that?
    Please help me.
    ThanksDoes this have anything to do with Java?

  • Error while reading excel file from application server into internal table.

    Hi experts,
    My requirement is to read an excel file from application server into internal table.
    Hence I have created an excel file fm_test_excel.xls in desktop and uploaded to app server using CG3Z tcode (as BIN file type).
    Now in my program I have used :
    OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    DO.
    READ DATASET v_filename INTO wa_tab.
    The statement OPEN DATASET works fine but I get a dump (conversion code page error) at READ DATASET statement.
    Error details:
    A character set conversion is not possible.
    At the conversion of a text from codepage '4110' to codepage '4103':
    - a character was found that cannot be displayed in one of the two
    codepages;
    - or it was detected that this conversion is not supported
    The running ABAP program 'Y_READ_FILE' had to be terminated as the conversion
    would have produced incorrect data.
    The number of characters that could not be displayed (and therefore not
    be converted), is 445. If this number is 0, the second error case, as
    mentioned above, has occurred.
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_CONVERSION_CODEPAGE', was not
    caught and
    therefore caused a runtime error.
    The reason for the exception is:
    Characters are always displayed in only a certain codepage. Many
    codepages only define a limited set of characters. If a text from a
    codepage should be converted into another codepage, and if this text
    contains characters that are not defined in one of the two codepages, a
    conversion error occurs.
    Moreover, a conversion error can occur if one of the needed codepages
    '4110' or '4103' is not known to the system.
    If the conversion error occurred at read or write of  screen, the file
    name was '/usr/sap/read_files/fm_test_excel.xls'. (further information about
    the file: "X 549 16896rw-rw----201105170908082011051707480320110517074803")
    Also let me know whether this is the proper way of reading excel file from app server, if not please suggest an alternative .
    Regards,
    Karthik

    Hi,
    Try to use OPEN DATASET v_filename FOR INPUT IN BINARY mode encoding default. instead of OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    As I think you are uploading the file in BIN format to Application server and trying to open text file.
    Regards,
    Umang Mehta

  • Read Excel File on Application Server to Internal Table

    Hi Everybody!
    Can anyone tell me how I can Read in an Excel File from the Application Server?
    I'm familiar with the OPEN DATASET Statement and I already use it to read in text files.
    Important is, that it works in the Batch / can be used as a background job
    I already tried using
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    which did not work.
    Can anybody please help me`?
    I created the file I try to read out from the Application Server Folder with the Standard upload
    in ABAP Web Dynpro and Wrote it to the Server with the following code. Does anyone know
    if maybe already the writing is to the application server is wrong?
    try.
          convt = cl_abap_conv_in_ce=>create(
            input = lv_filedata
            encoding = 'UTF-8'
            replacement = '?'
            ignore_cerr = abap_true ).
          convt->read( importing data = s_cont ).
        catch cx_sy_conversion_codepage.
          wd_comp_controller->show_error( exporting
            text = 'There occurred an error during conversioning the code page.' type = 'E' ).
      endtry.
        open dataset XLSFILEPATH for output in binary mode.
        transfer s_cont TO XLSFILEPATH.
        close dataset XLSFILEPATH.
    Best Regards and Thanks,
    Steffen

    Hi Suhan,
    I tried the following, but the output in the table doesn't look good at all
    Can you please help?
    OUTPUT:
    ??#u0871#?################>###??##############################=#######????########???????????????????????????????????????????????????????????????????????????????????????????????????????
    ####################################################################################### ###!###"#######$###%###&###'###(###)###*###+###,###-###.###/###0###1###2###3###4###5###6###7#
    #?######Z##A#r#i#a#l###3########,#####0#\# #"#? "#;#\#-###,#####0#\# #"#? "###=########,#####0#\# #"#? "#;#[#R#e#d#]#\#-###,#####0#\# #"#? "###?########,#####0#.#0#0#\# #"#? "#;#\#-
    ###?? ##?########? ?#######?? ##?########? ?#######?? ##?#P######? ?#######?? ##?#P######? ?#######?? ##?# ######? ?#######?? #################A#?#?j}#(#}############################
    ##########?########}#?#}#############*##################_#? _#-########????#,#####0########????#? _#-#;########????#"#?#?#\########????#_#-#@#_
    #######????########}#(#}#############+##################_#? _#-}#(#}#############,##################_#? _#-}#(#}#############-##################_#? _#-}#(#}#############.###########
    ##########?########}#<#}#############6#############?}#?#_#? _#-########??#?#,#####0}#<#}#############7#############?e#?#_#? _#-########????#,#####0}#?#}#############8###############
    #######????########}#?#}#############9#############????#_#? _#-########????#,#####0########????#? _#-#;########????#"#?#?#\########????#_#-#@#_
    #######????########}#(#}#############:##################_#? _#-}#-#}#############;##################_#? _#-#####}#P#}#############<##################_#? _#-#############,#####0#####
    ##Check Cell?#z#?##############?
    #C#h#e#c#k# #C#e#l#l##########?##????########????#####?##????#######?##????#######?##????#######?##????##?###+?#??# #?##############?##C#o#m#m#a#####?###,?#??#(#?##############?##C#
    #5####Input?#p#?##############?##I#n#p#u#t##########?##?u0319?#####?##??v?#####?#####?#######?#####?#######?#####?#######?#####?##?###6####Linked Cell?#F#?##############?##L#i#n#k#e#d#
    ?##N#o#t#e##########?##????#####?##????#######?##????#######?##????#######?##????##?###9####Output?#r#?##############?##O#u#t#p#u#t##########?##????#####?##????#####?##????#######?#
    #;####Title?#1#?##############?##T#i#t#l#e##############I}?%####?#
    #<####Total?#H#?##############?##T#o#t#a#l################?########O???##########O???##?###=####Warning Text?#:#?##############?##W#a#r#n#i#n#g# #T#e#x#t##########?##?##??#X#?######
    ##Commission###Health Incentive ###Housing Norm###Hypo Tax###Hypo Tax- Special Wages###Paid Time Off(##Vision Insurance- Withheld from Employee###Working Spouse/DP surcharge)##TX St
    ###########?#?#?######### #########c###?3###N##?h##?t##nu############d#################????MbP?_#####*#####+#####?#####?###########%#####?#?###?#########?#####?#####&###ffffff??'###
    #I#######}########+######}#######$
    ######}#######m###############c###################?###################?###################?###################?###################?###################?###################?##########
    CODING:
    types: begin of st_excel_parse,
              clientno type string,
              fileid type string,
              paymtreportingid type string,
              name type string,
              employee_id  type string,
              home_country type string,
              host_country  type string,
              actstartdt  type string,
              actenddt type string,
              assignment_status type string,
              paymttypenm  type string,
              paymtcategorynm  type string,
              paymtdt  type string,
              transeffdt  type string,
              amount  type string,
              currency_code type string,
      end of st_excel_parse.
      data: ls_excel_parse type st_excel_parse,
            lt_excel_parse type table of st_excel_parse.
      data l_wa_raw_data type string.
      open dataset gv_str_filename for input in text mode encoding default.
      if sy-subrc = 0.
        do.
          read dataset gv_str_filename into l_wa_raw_data.
          if sy-subrc = 0.
            "Split the file record using <TAB> and store inside the work area
            split l_wa_raw_data at cl_abap_char_utilities=>horizontal_tab into :
              ls_excel_parse-clientno
              ls_excel_parse-fileid
              ls_excel_parse-paymtreportingid
              ls_excel_parse-name
              ls_excel_parse-employee_id
              ls_excel_parse-home_country
              ls_excel_parse-host_country
              ls_excel_parse-actstartdt
              ls_excel_parse-actenddt
              ls_excel_parse-assignment_status
              ls_excel_parse-paymttypenm
              ls_excel_parse-paymtcategorynm
              ls_excel_parse-paymtdt
              ls_excel_parse-transeffdt
              ls_excel_parse-amount
              ls_excel_parse-currency_code .
            append ls_excel_parse to lt_excel_parse.
          endif.
        enddo.
      endif.

  • Read excel file in application server to internal table

    Hi,
    I have an excel file located in some folder in my application server. I don't have excel installed in the server. Now I want to read the excel file data into an internal table. I tried to use READ DATASET, but it returned junk characters.
    I have searched SDN extensively for this, but without any succesful answer.
    Regards,
    Arun.

    Hi Arun,
    Please check the code below for your reference.
    TABLES:eket.
    TYPE-POOLS truxs.
    DATA it_truxs(4056) TYPE c OCCURS 0.
    DATA:v_dt(2),filename TYPE string,
    i_temp TYPE truxs_t_text_data.
    DATA:BEGIN OF it_eket OCCURS 0,
    ebeln LIKE eket-ebeln,
    ebelp LIKE eket-ebelp,
    etenr LIKE eket-etenr,
    eindt LIKE eket-eindt,
    END OF it_eket.
    PARAMETERS: p_path TYPE rlgrap-filename.
    SELECTION-SCREEN : PUSHBUTTON /2(10) pb_but1 USER-COMMAND get.
    PARAMETERS:p_no TYPE i.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = sy-cprog
          dynpro_number = sy-dynnr
        IMPORTING
          file_name     = p_path.
    START-OF-SELECTION.
      REFRESH :it_eket,i_temp,it_truxs.
      filename = p_path.
      CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
      filename = filename
      filetype = 'ASC'
    * has_field_separator = 'X'
      TABLES
      data_tab = i_temp.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
          i_field_seperator    = 'X'
          i_tab_raw_data       = i_temp
          i_filename           = p_path
        TABLES
          i_tab_converted_data = it_eket
        EXCEPTIONS
          conversion_failed    = 1
          OTHERS               = 2.
      SORT it_eket BY ebeln.
      DELETE ADJACENT DUPLICATES FROM it_eket COMPARING ebeln.

  • Uploading Excel File in application server

    Hi,
    I am uploading data from internal table to excel file in application server.I am using Open dataset to put in appln server.(background job).But the problem is it is not sitting in different colums,all data goes to single column.I want every field in separate columns.Please suggest to proceed.

    Hi,
    save the internal table as a desktop file and then use CG3Z transaction to put the data from desktop to application server.
    then to read the application file use the logic given below:
    DATA: wa_file_data TYPE text4096,
    lv_app_server_file TYPE string.
      lv_app_server_file = pa_afile.
    To read file from Application server
      OPEN DATASET lv_app_server_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      DO.
        READ DATASET lv_app_server_file INTO wa_file_data.
        IF sy-subrc = 0.
          APPEND wa_file_data TO gi_file_data.
        ELSE.
          EXIT.
        ENDIF.
      ENDDO.
      CLOSE DATASET lv_app_server_file.
    DATA: lv_file_separator TYPE c.
      lv_file_separator = cl_abap_char_utilities=>horizontal_tab.
    To upload file in other formats(CSV, Tab delimited etc)
      CALL FUNCTION 'TEXT_CONVERT_TEX_TO_SAP'
        EXPORTING
          i_field_seperator    = lv_file_separator
          i_tab_raw_data       = gi_file_data
        TABLES
          i_tab_converted_data = gi_zhralcon_file
        EXCEPTIONS
          conversion_failed    = 1
          OTHERS               = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Hope it helps.
    Regards,
    Rajesh Kumar

  • Populate existing excel file in presentation server

    Hi,
    My requirement is to populate an existing excel file in the presentation server. After the data has been uploaded the file needs to be saved in another name .
    Could someone help me out on this.
    thanks

    hi,
    check this sample code...
    hope it works..
    data: begin of itab occurs 0,
          vbeln like vbak-vbeln,
          posnr like vbap-posnr,
          end of itab.
    select vbeln
           posnr
           from vbap
           up to 20 rows
           into table itab.
    * EXCEL sheet using OLE automation.
    INCLUDE OLE2INCL.
    * handles for OLE objects
    DATA: H_EXCEL TYPE OLE2_OBJECT,        " Excel object
          H_WORK  TYPE OLE2_OBJECT,
          H_SHEET TYPE OLE2_OBJECT,
          H_CELL  TYPE OLE2_OBJECT,
          V_COL   LIKE SY-TABIX.     " column number of the cell
    DATA:
      V_STEP(30),
      V_FILE LIKE RLGRAP-FILENAME.
    * tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
    *           PERCENTAGE = 0
               TEXT       = 'Creating Excel...'
           EXCEPTIONS
                OTHERS     = 1.
    * start Excel
      V_STEP = 'Starting Excel'.
      CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_EXCEL  'Visible' = 1.
      CALL METHOD OF H_EXCEL 'APPEND'
        EXPORTING  #1 = 'D:SappdfABAP Trainingsheettr.xls'.
    *  PERFORM ERR_HDL.
    * tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
    *           PERCENTAGE = 0
               TEXT       = 'Adding Data to Excel...'
           EXCEPTIONS
                OTHERS     = 1.
    * Get the list of workbooks
      V_STEP = 'Preaparing Excel'.
      CALL METHOD OF H_EXCEL 'WORKBOOKS' = H_WORK.
      PERFORM ERR_HDL.
    ** Add new workbook (create a file)
      CALL METHOD OF H_WORK 'ADD'.
      PERFORM ERR_HDL.
    * Get the created worksheet
    ************************Sheet Number
      CALL METHOD OF H_EXCEL 'WORKSHEETS' = H_SHEET EXPORTING #1 = 3.
    ************************Sheet Number
      PERFORM ERR_HDL.
    * Activate (select) the first sheet
      CALL METHOD OF H_SHEET 'ACTIVATE'.
      PERFORM ERR_HDL.
    * tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
    *           PERCENTAGE = 0
               TEXT       = 'Adding Data to Excel...'
           EXCEPTIONS
                OTHERS     = 1.
    * output column headings to active Excel sheet
      V_STEP = 'Adding data to Excel'.
      LOOP AT ITAB.
        V_COL = SY-TABIX.
        PERFORM FILL_CELL USING 1 V_COL ITAB-vbeln.
        PERFORM FILL_CELL USING 2 V_COL ITAB-posnr.
      ENDLOOP.
      V_STEP = 'Releasing Excel'.
      FREE OBJECT H_EXCEL.
      PERFORM ERR_HDL.
      H_EXCEL-HANDLE = -1.
    *&      Form  ERR_HDL
    *       text
    *  -->  p1        text
    FORM ERR_HDL.
      IF SY-SUBRC <> 0.
        WRITE: / 'Error in processing Excel File:', V_STEP.
        STOP.
      ENDIF.
    ENDFORM.                    " ERR_HDL
    *&      Form  FILL_CELL
    *       text
    *      -->P_1      text
    *      -->P_1      text
    *      -->P_1      text
    FORM FILL_CELL USING  ROW COL VAL.
      CALL METHOD OF H_EXCEL 'Cells' = H_CELL
                     EXPORTING #1 = ROW #2 = COL.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_CELL 'Value' = VAL .
      PERFORM ERR_HDL.
    regards
    satesh

  • Modifying and saving a Excel file by the use of Blob-Stream Method?

    Hi everyone...
    I'm trying to change and modify a Excel file which is received as Blob variable from database.
    I wrote a PL/SQL Procedure which get the Excel file and convert it to blob; after that send it as the parameter of a Java source called TestPrintExcel
    CREATE OR REPLACE DIRECTORY VMI_TEST_DIR AS '/afc/opt/dba/test_utl_dir';
    GRANT READ, WRITE ON DIRECTORY SYS.VMI_TEST_DIR TO SYSTEM;
    declare 
       bfi  bfile := bfilename('VMI_TEST_DIR','TestFzglist.xls');
       bin  blob;
       cout clob;  
    begin
       dbms_lob.open(bfi);
       dbms_lob.createtemporary(bin, true);
       dbms_lob.loadfromfile(bin, bfi, dbms_lob.getlength(bfi));
       dbms_lob.close(bfi);
       dbms_lob.createtemporary(cout, true);
       dbms_java.set_output(100000);
       TestPrintExcel(bin);
       dbms_output.put_line('done!');
    end;With the following Java procedure I can read the content of the Excel file and write it to database perfectly. But the question is, how can i save the excel file with the same way, if i would change or insert any cell? I mean with the same way that to save as blob stream. Because i get permission error when i use another methods like FileOutputStream, FileInputStream etc. That's way i want to resolve this problem with the blob-stream method. Can anybody tell me how i can do that or what a method i have to use?
    Thanks.
    create or replace and compile java source named xltest as
      import org.apache.poi.ss.usermodel.WorkbookFactory;
      import org.apache.poi.ss.usermodel.Workbook;
      import org.apache.poi.ss.usermodel.Sheet;
      import org.apache.poi.ss.usermodel.Row;
      import org.apache.poi.ss.usermodel.Cell;
      import org.apache.poi.ss.util.CellReference;
      import org.apache.poi.ss.usermodel.DataFormatter;
      import org.apache.poi.ss.usermodel.FormulaEvaluator;
      import java.util.*;
      import java.sql.*;
      import oracle.sql.*;
      import oracle.jdbc.driver.*;
      public class XLTEST {
        public static void printx( oracle.sql.BLOB xblin ) throws SQLException {                       
          Connection Conn = null;
          try {
            Conn = DriverManager.getConnection( "jdbc:default:connection:" );
            Workbook wb = WorkbookFactory.create( xblin.getBinaryStream() ); // "/afc/opt/dba/test_utl_dir/TstFzglist.xls"
            for ( int sheetNum = 0; sheetNum < wb.getNumberOfSheets(); sheetNum++ ) {  //NumberOfSheets
              String TableName = new String();       
              switch( sheetNum )
                case 0:
                  TableName = "freeimportxls_s1"; break;           
                case 1:
                  TableName = "FreeImportXLS_S2"; break;
                case 2:
                  TableName = "FreeImportXLS_S3"; break;
                default:
                  break;                  
              Sheet sheet1 = wb.getSheetAt(sheetNum);         
              java.util.Iterator<Row> ri = sheet1.rowIterator();                 
              while ( ri.hasNext() ) {
                Row row = ri.next();
                java.util.Iterator<Cell> ci = row.cellIterator();                       
                while ( ci.hasNext() ) {
                  Cell cell = ci.next();
                  CellReference cellRef = new CellReference( row.getRowNum(), cell.getColumnIndex() );                         
                  switch( cell.getCellType() ) {
                  case Cell.CELL_TYPE_STRING:                            
                    Values   += "'" + cell.getRichStringCellValue().getString() + "'";               
                    break;
                  case Cell.CELL_TYPE_NUMERIC:
                    Values   += "'" + cell.getNumericCellValue() + "'";
                    break;
                  case Cell.CELL_TYPE_BOOLEAN:
                    Values   += "'" + cell.getBooleanCellValue() + "'";
                    break;
                  case Cell.CELL_TYPE_FORMULA:
                    Values   += "'" + cell.getCellFormula() + "'";
                    break;
                  default:
                    Values   += "''";               
                  int Counter1 = cell.getColumnIndex() + 1;
                  int Counter2 = row.getLastCellNum();
                  if ( Counter1==Counter2 ) {
                    Values   += ")";                          
                  else {
                    Values   += "," ;
                } System.out.println ( Values );               
                if ( ( sheetNum >= 0 ) && ( sheetNum <=2 ) ) {
                   String sqlUpdate = "INSERT INTO " + TableName + " VALUES " + Values;
                   PreparedStatement pstmt = Conn.prepareStatement( sqlUpdate );                                          
                   pstmt.executeUpdate();           
                   pstmt.close();              
            } Conn.close();
          } catch ( java.sql.SQLException e ) {       
            System.err.println( e.getMessage() );
            e.printStackTrace( System.err );
            Conn.close();}        
      };

    Hi,
    Because i get permission error when i use another methods like FileOutputStream, FileInputStream etc.Permission errors are generally resolved by granting the proper privilege via DBMS_JAVA.grant_permission procedure.
    Have you already tried that?
    http://download.oracle.com/docs/cd/E11882_01/java.112/e10588/chten.htm#BABHDBCJ

  • Proble with displaying excel file on the PC?

    Hello Friends,
    I have another issue.
    When the user presses push button in my application, I am displaying excel file with data. It is working fine. But... a dummy file is creating always in my desktop with DAT extension. Is there any possiblity not to store on the PC.
    code I used for calling excel file.
      CALL FUNCTION 'WS_EXCEL'
       EXPORTING
            FILENAME = ' '
            SYNCHRON = ' '
           TABLES
                DATA     = ITAB
           EXCEPTIONS
                OTHERS   = 1.
    Could you pls help me not to store the excel file on the desktop/ PC.
    only temporary excel file should display.
    Thanks in advance
    Raghu

    WS_excel is obsolette now.
    use MS_EXCEL_OLE_STANDARD_DAT.
    REPORT ZEX_DATATOEXCEL .
    Parameters: P_file like RLGRAP-FILENAME.
    data : begin of int_head occurs 0,
    Filed1(20) type c,                     " Header Data
    end of int_head.
    data : begin of int_data occurs 0,
    Field1(20) type c,                     " Data
    Field2(20) type c,
    Field3(20) type c,
    Field4(20) type c,
    end of int_data.
    int_head-Filed1 = 'Sales Ord'.
    APPEND int_head.
    CLEAR  int_head.
    int_head-Filed1 = 'Sold-to-Party'.
    APPEND int_head.
    CLEAR  int_head.
    int_head-Filed1 = 'Purchase Ord'.
    APPEND int_head.
    CLEAR  int_head.
    int_head-Filed1 = 'Ship-to-Party'.
    APPEND int_head.
    CLEAR  int_head.
    int_data-field1 = '1JOHN'.
    int_data-field2 = '2TOM'.
    int_data-field3 = '3BRAD'.
    int_data-field4 = '4PETER'.
    Append int_data.
    Clear int_data.
    CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
    EXPORTING
    file_name = p_file " path offile where u need to download
    * CREATE_PIVOT = 0
    * DATA_SHEET_NAME = ' '
    * PIVOT_SHEET_NAME = ' '
    * PASSWORD = ' '
    * PASSWORD_OPTION = 0
    TABLES
    * PIVOT_FIELD_TAB =
    data_tab = int_data "internal table with data
    fieldnames = int_head "internal table with header
    EXCEPTIONS
    file_not_exist = 1
    filename_expected = 2
    communication_error = 3
    ole_object_method_error = 4
    ole_object_property_error = 5
    invalid_filename = 6
    invalid_pivot_fields = 7
    download_problem = 8
    OTHERS = 9
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

Maybe you are looking for

  • Feature Request: Photo Borders and Copying in Books

    These are a few related feature requests. If anyone knows of a better way to do this with the current software, then I would love to hear it. When making books I like to have borders around the pictures of various colors (usually black or white) and

  • Windows 7 Downgrade from 64-bit to 32-bit

    I recently bought a Lenovo Y550. My Y550 has 4GB RAM and I was recommended to get Windows 7 64 bit by Lenovo. So, I did. Turns out, many of the softwares, utilities I use aren't working well and some don't even install. Without going into alternative

  • ICC Profile for Lenovo EasyCamera

    Alright, I've been looking around everywhere on the site with no luck. I have a Lenovo S10-3. It came with a Lenovo EasyCamera built-in. This camera's color is slightly off, as are most webcameras, making all images more blue than they should be. I w

  • Order/installation problem!!!

    Hi, please can someone help as I really don't know what to do!! I ordered BT phone, broadband and tv a while ago and it was due for installation last Friday 22nd. The engineer came but said I didn't have a phone line and could find no link to the exc

  • Creating a new table next to an existing one

    I have attached the table I created...(I'm a beginner....forgive me for being simplistic in design). I want to create a separate table for "Friday" right next to the existing table. How do i get the new table to align to the right of the existing tab