Regarding Excel file reading

HI All,
I am trying to read a EXCEL file from Jakarta POI Excel Api.All works fine.But When the reading file if the cell value is like 74100000000000 I am getting the output like this 7.41E13.Even i formatted the cell to the number,Text etc But no luck

All right, I'm the first to admit things need to be "dumbed down" for me.
One of my problems with technology in general is that too often it is assumed one is born with some specialized knowledge.
When I clicked on the above link, my first thought was, "What does POI stand for?"
I searched the site for a definition and also "googled" it.
Nothing.
My second thought was that it seems another layer of software, which looks just as complex as Java itself, is required to be able to read a spreadsheet. Why is there no package equivalent to java.sql? Is this just another result of the old battle between Sun and Microsoft and the browser wars of the nineties?

Similar Messages

  • A serious issue with excel file read in ODI

    hi gurus,
    Issue with excel file read is that we can read only one file by setting the path from ODBC Data Source Administrator-->System DNS -->Select Work book
    what i want to read the dynamic path(Every time I cant go back and set the Work book to select the excel file..
    So i came up with a solution to write a Vbscript that convert the excel to csv my problem got solved for dynamic paths the script is as follow:
    Set objArgs = WScript.Arguments
    For I = 0 to objArgs.Count - 1
    FullName = objArgs(I)
    FileName = Left(objArgs(I), InstrRev(objArgs(I), ".") )
    Set objExcel = CreateObject("Excel.application")
    set objExcelBook = objExcel.Workbooks.Open(FullName)
    objExcel.application.visible=false
    objExcel.application.displayalerts=false
    objExcelBook.SaveAs FileName & "csv",23
    objExcel.Application.Quit
    objExcel.Quit
    Set objExcel = Nothing
    set objExcelBook = Nothing
    Next
    Now this script convert the xls file to csv with comma seprated values
    e.g in excel sheet if data is ABC XYZ PQR
    csv will come with ABC,XYZ,PQR
    here the delimiter is , i want the delimiter as pipe | who's ascii code is 124
    but if i change 23 with 124 its not working i getting the error cannot save as...
    can anyone tell me that what should be the correct code for pipe
    so that the output is ABC|XYZ|PQR
    AS WE CAN USE THE SCRIPTS IN TOOLS
    Edited by: 789141 on Sep 14, 2010 11:33 PM

    I dont have the answer for your question but i have different approach in handling multiple Excel File.
    Step 1. Copy a sample source Excel File and Call it Final.xls .
    Step 2. Map this Final.xls to DSN and in Topology call this Final.xls
    Step 3. Do the Reversing and Map and test the Interface . Once its done.
    Step 4. Create a Package and using a http://odiexperts.com/?p=1426 get the list of all the Excel File
    Step 5 . Using this http://odiexperts.com/?p=273 create a Loop to Read the Excel File name
    Step 6 . Copy using OdiFileCopy to Final.xls and run your interface .
    Step 7. Increment the Loop and copy your next File for Final and run the interface
    Step 8 . Finally you will be able to read all the Excel File .
    Step 9 . Delete the source file [ Optional ]
    Hope this helps.

  • Regarding Excel file creation.

    Hi experts,
    I retrieved the ALV output into an internal Table which is containing Text(1024) as member.
    After getting Data I need to pass this data to Excel file.
    Excel file should contain exact format of ALV.
    Please suggest me..............
    Regards,
    Subash

    hi,
    after getting data into EXCEL File and i need to pass this one as attachment to mail. If i use  GUI_DOWNLOAD is saved into presentation server and i need to pick that file from presentation server  and i will send. But this one won't work in BACK Ground. That is the reason after getting data from ALV report into Text Variable and i need to pass this data to excel file, and that excel file as to go an attachemnt to mail,.Everything in Background only.

  • Make few columns of Excel file read only when downloaded

    Hi Experts,
    Is there any way we can set few of the columns in excel sheet as read only when downloaded from SAP.
    We have requirement where a program will generate a report and download it into an excel file on desktop.  When the file is downloaded, two of its columns should be non editable.
    I know complete sheet of excel can be protected using OLE, can we protect few columns also using OLE?
    any idea how can it be done?

    Hi Swapnil,
    check this
    Re: OLE EXCEL : how to block cells ?
    hope it is useful to you.
    Thanks

  • Excel File read using WebUtil does not work. Gives java.lang.NoSuchMethodEr

    We have a form which reads from an Excel File. The form works in development env., but in the live env when we deployed the form it does not work. Form fails @ the 1st call to Client_OLE2 where we set the Excel file to read.
    For both the envs. the values are given here:
    (1.) Client Forms Version : Forms [32 Bit] Version 10.1.2.0.2 (Production)
    (2.) Application Server Version : 10.1.2.0.2
    (3.) AS Linux Version : (Live) RHEL 5.7 Tikanga / (Dev) Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
    (4.) Client Sun JRE Version :Version 1.5.0 (build 1.5.0_10)
    (5.) Client Web Browser & Version: I.E 8.0.6001 or Mozilla  3.0.15
    (6.) WebUtil Version: 1.0.6Both envs. are the same except the Linux version.
    Works fine in Dev but does not work in Live. Other Webutil functions like file open dialog box works fine in live, only this Excel read is not working.
    Full Error message
    Java Plug-in 1.5.0_10
    Using JRE version 1.5.0_10 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\dinesha.IIL
    c:   clear console window
    f:   finalize objects on finalization queue
    g:   garbage collect
    h:   display this help message
    l:   dump classloader list
    m:   print memory usage
    o:   trigger logging
    p:   reload proxy configuration
    q:   hide console
    r:   reload policy configuration
    s:   dump system and deployment properties
    t:   dump thread list
    v:   dump thread stack
    x:   clear classloader cache
    0-5: set trace level to <n>
    RegisterWebUtil - Loading WebUtil Version 1.0.6
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    Forms Applet version is : 10.1.2.0
    Exception in thread "AWT-EventQueue-3" java.lang.NoSuchMethodError:
    com.jacob.com.Dispatch.put(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V
         at
    oracle.forms.webutil.ole.OleFunctions.set_obj_property(OleFunctions.java:1216)
         at
    oracle.forms.webutil.ole.OleFunctions.setProperty(OleFunctions.java:333)
         at oracle.forms.handler.ComponentItem.setCustomProperty(Unknown Source)
         at oracle.forms.handler.ComponentItem.onUpdate(Unknown Source)
         at oracle.forms.handler.JavaContainer.onUpdate(Unknown Source)
         at oracle.forms.handler.UICommon.onUpdate(Unknown Source)
         at oracle.forms.engine.Runform.onUpdateHandler(Unknown Source)
         at oracle.forms.engine.Runform.processMessage(Unknown Source)
         at oracle.forms.engine.Runform.processSet(Unknown Source)
         at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
         at oracle.forms.engine.Runform.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.processEventEnd(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown
    Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)We connected to Live AS server via VPN and ran the Form in a client machine (where the Dev. is working) but same problem.
    Any help would be greatly appreciated.

    Channa,
    I sounds like you might have missed a configuration step on your Linux application server (AS). I recommend you go back through the configuration of your AS and verify each step of the WebUtil Runtime Setup Checklist was completed correctly. Seach the Forms Help system on "Runtime Setup Checklist" for a copy of the checklist.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Regarding Excel file generation from xml

    Hi all,
    I want export my JTable information to an excel when a specified action is occured.
    I already completed this task using some third party api.
    Some body told me, there is api in j2sdk itself for export data to excel file. but i didnt find that.
    Could anybody help me out , if sun java api is providing any api for dealing excel files.

    hi
    i've found this:
    http://jexcelapi.sourceforge.net/
    but i had trouble trying to make it works!
    pratically my textpad, we�hen i import the package, tell me tha the package doesn't exists!
    bye! ;)

  • IBot Issue regarding excel files

    Hello All,
    I am facing an iBot Problem .
    Problem description:
    Application running in Oracle Business Intelligence 11.1.1.6.0
    OBI scheduler server is working fine, so scheduled iBots are being delivered successfully. However, whenever the agent is supposed to send an excel file attached, it results truncated or corrupted. In contrast, the pdf report is delivered correctly. On the other hand, in other all cases, the exports to excel are working fine.
    I restarted the server twice, but I am facing the same error.
    Please suggest any solution.
    Thanks & regards,
    Yessenia

    from html to xls format.
    Try with this
    http://prasadmadhasi.com/2012/08/02/reduce-file-size-by-downloading-a-requestanalysis-to-native-excel-format-directly-instead-of-mhtml-obiee-11-1-1-6-0/
    Pls mark if helps

  • Regarding Excel file generation from java

    Hi all,
    I want export my JTable information to an excel when a specified action is occured.
    I already completed this task using some third party api.
    Some body told me, there is api in j2sdk itself for export data to excel file. but i didnt find that.
    Could anybody help me out , if sun java api is providing any api for dealing excel files.

    hi
    i've found this:
    http://jexcelapi.sourceforge.net/
    but i had trouble trying to make it works!
    pratically my textpad, we�hen i import the package, tell me tha the package doesn't exists!
    bye! ;)

  • Help Regarding excel file download

    Hi,
    I have developed a object with alv list display aand in the selection screen maintained a checkbox for EXPORT TO EXCEL..
    and for each and every field in the field catlog  wriiten the code like
    IF P_EX = 'X'.
          LS_FIELDCAT-ROW_POS    = '1'.
          LS_FIELDCAT-COL_POS  = 1.
    But this output is not flowing into excel file when executing...can anyone help me how to download the output data into excel file when we execute.because this report runs in the background and after execution data should be flown into excel file.
    Regards,
    Venkat.

    Hi Venkat,
    use this Function module to download the file
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME                        = 'C:\Documents and Settings\sap\Desktop\Hierarchy.xls'
       WRITE_FIELD_SEPARATOR           = '#'
        TABLES
          DATA_TAB                        = gt_target.
    Here gt_target is the internal table which holds the data.
    Hope this solves your purpose...
    Regards
    Sajid

  • Excel  file read

    my excel file having 4 worksheets so i want to read that file without
    using database connections

    my excel file having 4 worksheets so i want to read
    that file without
    using database connectionsUse Apache POI

  • GUI_UPLOAD for Excel file read

    Hi Experts,
      I am transferring excel sheet content to internal table, for which I am using GUI_UPLOAD function module. It is successfully reading, but I am getting ##### values instead of text values. I am getting more than expected lines also. My code is below.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                               = w_file_url
        FILETYPE                            = 'DAT'
        HAS_FIELD_SEPARATOR    = 'X'
      tables
        data_tab                               = t_uploadeddata
    I used my file type as 'ASC' and 'BIN' also. Can anybody help me?
    Thanks and regards,
    Venkat

    the function module gui_upload, accepts the filename as a string variable....
    hence do the following
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-T01.
    PARAMETERS : P_FILE TYPE RLGRAP-FILENAME DEFAULT 'D:\Example.txt'.
    SELECTION-SCREEN END OF BLOCK B1.
    data : w_file type string.
    w_file = p_file.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = W_FILE
    FILETYPE = 'ASC'
    has_field_separator = ' '
    tables
    data_tab = FILE_ITAB
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_READ_ERROR = 2
    NO_BATCH = 3
    GUI_REFUSE_FILETRANSFER = 4
    INVALID_TYPE = 5
    NO_AUTHORITY = 6
    UNKNOWN_ERROR = 7
    BAD_DATA_FORMAT = 8
    HEADER_NOT_ALLOWED = 9
    SEPARATOR_NOT_ALLOWED = 10
    HEADER_TOO_LONG = 11
    UNKNOWN_DP_ERROR = 12
    ACCESS_DENIED = 13
    DP_OUT_OF_MEMORY = 14
    DISK_FULL = 15
    DP_TIMEOUT = 16
    OTHERS = 17
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Regarding excel file download from webdynpro table element

    Hi All,
            I want steps to do excel download from webdynpro table element.
    Thanks in advance.
    Regards,
    Muneesh Gitta.

    Hi Gitta,
    There are 2 ways in doing it, one is using GUI DOWNLOAD FM or using class clwd_runtime_services.
    DATA:
        node_node_alv                       TYPE REF TO if_wd_context_node,
        elem_node_alv                       TYPE REF TO if_wd_context_element,
        stru_node_alv                       TYPE wd_this->element_node_alv,
        itab_node_alv                       TYPE TABLE OF wd_this->element_node_alv..
    navigate from <CONTEXT> to <NODE_ALV> via lead selection
    @TODO handle not set lead selection
      IF ( node_node_alv IS INITIAL ).
      ENDIF.
    get all declared attributes
      node_node_alv->get_static_attributes_table(
        IMPORTING
          table = itab_node_alv ).
      DATA:
        node_file_download                  TYPE REF TO if_wd_context_node,
        elem_file_download                  TYPE REF TO if_wd_context_element,
        stru_file_download                  TYPE wd_this->element_file_download ,
        item_fname                          LIKE stru_file_download-fname.
      navigate from <CONTEXT> to <FILE_DOWNLOAD> via lead selection
      node_file_download = wd_context->get_child_node( name = wd_this->wdctx_file_download ).
      get element via lead selection
      elem_file_download = node_file_download->get_element(  ).
      get single attribute
      elem_file_download->get_attribute(
        EXPORTING
          name =  `FNAME`
        IMPORTING
          value = item_fname ).
      CALL FUNCTION  'GUI_DOWNLOAD'
        EXPORTING
          filename                        = item_fname
        FILETYPE                        = 'ASC'
        TABLES
          data_tab                        = itab_node_alv.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    OR
    check this blog for
    Re: Export to Excel Sheet functionality

  • Regarding excel file

    Hi,
             my reqirement on excelsheet.one of the condition is that file will be rejected when more than one company code or more than 200 line item per document...the comapny code in the excelsheet is col06,and the line item is col24.how can we write code for this ..?wht am i checking the coding is not working so,send me useful code.it isreally very urgent..
    <b>I repeat per document not per file</b> .
    Thanks In advance

    Hi,
              what i can understand from your question that only you want to write those records which have lt 200 items for the document.
    sort it_datatab by col06.
    itab[] = it_dbtab[].
    loop at it_datatab into wa_datatab.
    at new col06.
    *<or you can use on change of it_dbtab-col06 if col06 is not your first field>
    v_bukrs = wa_datatab-col06. " take the company code into a variable
    clear count.
    endat.
    cnt = cnt + 1 .
    if cnt Gt 200 .
    delete itab where col06 = v_bukrs.
    endif.
    endloop.
    now your itab contains the value which document no have lt 200 line items.
    if it is also not satisfying your requirement then let me know.
    regards

  • Excel File Upload In Webdynpro For ABAP

    Hi All,
    I have a doubt regarding EXCEL file upload for Webdynpro for ABAP.
    I am able to get the path of file using 'FILEUPLOAD' UI element.Now I need to upload the EXCEL file into ALV.I have tried out with GUI_UPLOAD and other excel upload function module.But these Function Module throws Dump.
    Can you please suggest how to go about it.It will be a great help if u can suggest any function module or method.

    Hi Amita,
    Insetad of using GUI_UPLOAD use 'HR_KR_XSTRING_TO_STRING'
    Here is the sample code,
    TYPES :BEGIN OF str_itab,
                  name(10) TYPE c,
                  age(10) TYPE c,
                 END OF str_itab.
    DATA : t_table1 TYPE STANDARD TABLE OF str_itab,
           i_data TYPE STANDARD TABLE OF string,
                   lo_nd_sflight TYPE REF TO if_wd_context_node,
                    lo_el_sflight TYPE REF TO if_wd_context_element,
                    l_string TYPE string,
            fs_table TYPE str_itab,
                    l_xstring TYPE xstring,
    fields TYPE string_table,
    lv_field TYPE string.
    DATA : t_table TYPE if_main=>elements_data_tab,
    data_table TYPE if_main=>elements_data_tab.
      * get single attribute
    wd_context->get_attribute(EXPORTING name =  `DATASOURCE`  
                              IMPORTING value = l_xstring ).
    CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
    EXPORTING
    in_xstring = l_xstring
    IMPORTING
    out_string = l_string.
    SPLIT l_string  AT
    cl_abap_char_utilities=>newline INTO TABLE i_data.
      * Bind With table Element.
    LOOP AT i_data INTO l_string.
    SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE
    fields.
    READ TABLE fields INTO lv_field INDEX 1.
    fs_table-name = lv_field.
    READ TABLE fields INTO lv_field INDEX 2.
    fs_table-age = lv_field.
    APPEND fs_table TO t_table1.
    ENDLOOP.
    lo_nd_sflight = wd_context->get_child_node( 'DATA_TAB' ).
    lo_nd_sflight->bind_table( t_table1 ).
      ENDMETHOD.
    if correct give correct answer
    Thanks & Regards,
    Meenachi.R

  • Creating Excel file in Labview

    I am trying to create a new Excel file, read it then close it using Active X programaticaly. Any help on this will be appreciated.
    Regards,
    Ayman

    Ayman
    Take a look at this thread http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=2391  where Joe Hoskins has kindly donated his collection of activex vi's for excel.
    There are a couple of examples shipped with labview. Goto menu Help -> Find Examples. The NI Example finder will appear. Goto the search tab and search for excel.
    And, there are plenty of examples on the forum you just need to search for them.
    Trying to get you started ...
    David

Maybe you are looking for

  • Can't get file open thumbnail previews inside Photoshop CC?

    Hi all, When in Photoshop CC I then go to file / open, my machine won't display preview thumnails for each of my image files (.jpg, .gif, .png, .psd etc) and all I see is the blue Photoshop icon for each of these files, I have also tried changing the

  • Can we get invoice no.in ke24

    hi can we get invioce doc.no.in ke24 report.to update invoice document in copa.how can i do. Reg. nagesh

  • Progress bar on Applet using swing

    Not sure if this is Swing related or applet related, so I'll post it here... :-) Long work should be done on a Worker thread an not inside the Swing Dispacher thread . So normally I create a Runnable object that calls something like doWork(), and pas

  • Ripping DVD's..what software is best to use?

    how do I Rip DVD's onto my computer. what software should I use...what the best that you use?

  • What is the proper way to add glue?

    I'm very new to Java and as such want to avoid things which will be deprecated. I wanted to add some glue and used: jPanelBottom.add(Box.createHorizontalGlue()); When I look at F2, I see the following warning: Warning: Serialized objects of this clas