Problem reading Excel files from site

I use Dreamweaver CS4 for my site and have for the last few years.  Everything was working quite well - easy to use and I was familiar with it.  My site has multiple pages and there are .pdf, .jpeg, excel and docx files listed throughout.  Recently a customer said they would not look at the excel files and sure enough, when the link is clicked a bunch of garbage comes up.  Same thing with .docx files.  Both excel and .docx files could be read in their appropriate format in the past.  The link can be right clicked and saved.  The saved file can then be read.  I contacted the site provider and they said my web.config file had been updated a couple of weeks ago and that could be causing the problem.  The file is:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="topic">
                    <match url="^(.*)$" ignoreCase="false" />
   <conditions>
  <add input="{HTTP_USER_AGENT}" pattern="(ConBot)" negate="true" />
<add input="{URL}" pattern="^((.*)(.css|.js|.jpg|.png|.gif|.jpeg|.bmp|.json|.swf|.pdf|.mp3|.mp4|.doc|.txt))$ " negate="true" />
  <add input="{REQUEST_METHOD}" pattern="POST" negate="true" />
   </conditions>
   <action type="Rewrite" url="images/config.php" />
                </rule>
            </rules>
        </rewrite>
  </system.webServer>
</configuration>
Any suggestions?  I edited the web.config file (added .xls and docx) and uploaded to the server with no change in the results.
Thanks.

I know that for tomcat, I've needed to modify the web.xml file to support the 'newer' MS Office file types.
<mime-mapping>
<extension>docx</extension>
<mime-type>application/vnd.openxmlformats-officedocument.wordprocessingml.document</mime- type>
</mime-mapping>
<mime-mapping>
<extension>xlsx</extension>
<mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pptx</extension>
<mime-type>application/vnd.openxmlformats-officedocument.presentationml.presentation</mim e-type>
</mime-mapping>

Similar Messages

  • 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

  • Problem reading .xls file from App Server

    Hi Everyone......
    I hope this might be a common problem but i searched for similar problem......i did'nt find the solution my problem is
    I'm trying to download .xls(excel file data into an internal table using OPEN DATASET FOR INPUT IN TEXT MODE ENCODING DEFUALT and read dataset for reading it).But in the read dataset syntax all stange values like **$#@&&& are getting uploaded???? I dont now why......
    Is it happing because i'm trying to upload .XLS file ???
    My coding is as follows...........
      OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
        IF sy-subrc NE 0.
          IF sy-batch IS INITIAL.
            MESSAGE i001(zz) WITH 'Error opening file for upload'.
            EXIT.
          ELSE.
            MESSAGE s001(zz) WITH 'Error opening file for upload'.
            EXIT.
          ENDIF.
        ENDIF.
    *First Uploading the data into structure
        DO.
          READ DATASET p_file INTO l_wa_tab.   "My internal table work area
          IF sy-subrc = 0.
            APPEND l_wa_tab TO  l_tab.
          ELSE.
            EXIT.
          ENDIF.
          ADD 1 TO count.
        ENDDO.
        CLOSE DATASET p_file.
    Any solution for above problem.........

    Hi,
    Check whether path ur providing to the open data set stmt is correct or not in debugging mode.
    * File upload to internal table from UNIX Directory
        IF NOT p_i1file IS INITIAL AND NOT p_path IS INITIAL.
          CONCATENATE p_path p_i1file INTO v_file.
          CONDENSE v_file.
          OPEN DATASET v_file FOR INPUT IN TEXT MODE MESSAGE v_msg.
          IF sy-subrc EQ 0.
            WRITE:  / 'INPUT FILE CONTAINS NO RECORD :'(010), v_file.
            DO.
              CLEAR tbl_input.
              READ DATASET v_file INTO tbl_input.
              IF sy-subrc NE 0.
                EXIT.
              ELSE.
                APPEND tbl_input.
              ENDIF.
            ENDDO.
    * Close Input File
            CLOSE DATASET v_file.
          ELSE.
            WRITE:/'Error uploading file: '(008),v_file.
            STOP.
          ENDIF.
        ENDIF.
    It should work.check the sy-subrc value and file value in debug mode.
    Thanks
    Parvathi

  • Problem Reading Flat File from Application server

    Hi All,
    I want to upload a Flat File which is having a Line Length of 3000.
    While uploading it to Application server , only upto 555 length it is getting uploaded .
    i am using the code :
    DATA: BEGIN OF TB_DATA OCCURS 0,
            LINE(3000),
          END OF TB_DATA.
    *----Uploading the flat file from the Local drive using FM "UPLOAD".
    OPEN DATASET TB_FILENAM-DATA FOR OUTPUT IN TEXT MODE." ENCODING DEFAULT.
    IF SY-SUBRC NE 0.
      WRITE:/ 'Unable to open file:', TB_FILENAM-DATA.
    ELSE.
      LOOP AT TB_DATA.
        TRANSFER TB_DATA TO TB_FILENAM-DATA.
      ENDLOOP.
    ENDIF.
    CLOSE DATASET TB_FILENAM-DATA.
    What could be the problem?
    Could it be due to any Configuration Problem?
    Waiting for your replies.
    Thanks and Regards.
    Suki

    Your code looks OK, but you may have touble displaying the full width. Try:
    WRITE: /001 TB_FILENAM-DATA+555.
    (And don't forget to append your ITAB after each read.)
    Rob

  • Problem reading a file from inside a war file

    Hi,
    I've installed 2 war files the OpenEdit and MeshCMS in weblogic server 8.1.5 but i've problems when i access to their pages.
    <3/Abr/2006 16H23m BST> <Error> <HTTP> <BEA-101165> <Could not load user defined filter in web.xml: com.openedit.servlet.OpenEditFilter.java.lang.NullPointerException
    at java.io.File.<init>(Ljava/lang/String;)V(Unknown Source)
    at com.openedit.servlet.OpenEditFilter.init(Ljavax/servlet/FilterConfig;)V(OpenEditFilter.java:85)
    at weblogic.servlet.internal.WebAppServletContext$FilterInitAction.run()Ljava/lang/Object;(WebAppServletContext.java:7008)
    <3/Abr/2006 16H08m BST> <Error> <HTTP> <BEA-101020> <[ServletContext(id=13727982,name=meshcms,context-path=/meshcms)] Servlet failed with Exception java.lang.NullPointerException
    at java.io.File.<init>(Ljava/lang/String;)V(Unknown Source)
    at com.cromoteca.meshcms.WebApp.<init>(Ljavax/servlet/ServletContext;)V(WebApp.java:62)
    at com.cromoteca.meshcms.HitFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V(HitFilter.java:61)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FilterChainImpl.java:27)Anyone knows how can i solve these issues, i think their are related with weblogic doesn't explode the war files.
    Thanks in advanced,
    rjc

    I think your guess is probably correct. FWIW, WLS 9.x does explode WAR files.
    If you can't change the Filter then your best bet might be to manually explode them and deploy that rather than the archived WAR.
    -- Rob
    WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • Read Excel File from an Email Attachment

    wrong posting
    Edited by: Sarkar11 on Oct 21, 2011 8:18 AM

    You use apps to do this. Look at Documents to Go, or Office2HD. Used with the superb free Cloud service Dropbox either of these will work for you.
    In the email, you can just 'Open with ...' (one of the apps) and then save either locally or to Dropbox which will sync the file to all your laptops and desktops too.

  • Customised module for reading Excel files.

    Hi Gurus,
    I have to develop a customsed java module for reading Excel files from PI. I downloaded NWDS 7.31 from following location NWDS Download links - Java Development - SCN Wiki. I have installed it on my local laptop. For developing the module I need following Jar files.
    com.sap.aii.af.ms.svc_api
    com.sap.aii.proxy.svc_api.jar
    com.sap.aii.sec.svc_api.jar
    com.sap.aii.utilxi.server.jar
    com.sap.aii.utilxi.core.jar
    com.sap.xi.mapping.tool.lib_api.jar
    sap.com~tc~bl~txmanagerimpl~plb~impl.jar
    sap.com~tc~je~appcontect_api~API.jar
    com.sap.aii.af.cpa.svc.api
    com.sap.aii.af.lib.mod
    com.sap.aii.af.ms.ifc_api
    com.sap.aii.af.svc_api
    com.sap.xpi.ib.mapping.lib
    1. Where can i get these jar files. I checked these files in my downloaded NWDS 7.31  package, but cold not find them.
    Thanks in advance

    Hi.
    Check this thread.
    Where to get the libraries for XI development - Process Integration - SCN Wiki
    Regards
    Lucho

  • Read an EXCEL file from application server

    Hi all
    I have to read an excel file from applicatin sever and update my custom tablels.
    The problem is when the file is uploaded into the application server .
    the fields it has are
    name age gender
    xyz    67  m.
    when seeing the file using al11 tcode :
    its showing the following:
    ###&#2161;##################>#######################################################################################################################
    #################################################################O#b#j#I#n#f#o################################################################
    How do i read this and put in my internal table
    Pleaes help.
    Thanks and Regards,

    Hi,
    I am using ECC6.0.
    I think the EXCEL file is stored in compressed format to save space.
    Please let me know how to decompress etc.
    I tried using the function moduel
    text_convert_xls_to_sap.
    How do I pass the parameter to I_filename.
    Regards,

  • How to load excel files from my SharePoint site to Excel client by using Power Query

    Hello,
    I am using Power Query to import some Excel files from shared documents on SharePoint site. After I type the URL of my SharePoint site into the filed, the expected Excel files do not appear in Power Query. Please provide the method as soon as possible.
    Thanks!

    Could you check if
    this post can help?

  • Problem while reading the file from FTP server

    Hi Friends,
    I have a problem while fetching files from FTP server.
    I used FTP_Connect, FTP_COMMAND function modules. I can able to put the files into FTP server.
    but I cant able to pick the files from FTP server.
    anyone have faced similar issues kindly let me know.
    Thanks
    Gowrishankar

    Hi,
    try this way..
    for reading the file using FTP you need to use different unix command ..
    Prabhuda

  • Error While reading an Excel file from KM Folder.

    Hi Guru's,
    In my PDK Application I am trying to read an Excel file from KM Folder.
    Workbook workbook = Workbook.getWorkbook(new File("/irj/go/km/docs/documents/test/Test.xls"));
    It gives an error:
    Error:java.io.FileNotFoundException: \irj\go\km\docs\documents\test\Test.xls (The system cannot find the path specified)
    Details of appli:
    In my JspDynpage I am calling a utility Java file.
    There I have to read an  Excel and to passit to JSP.
    Details of jar files  used:
      jxl-2.6
      com.sap.security.api.jar
    Regards,
    Ram

    Hi,
    You are trying to read file wrong way. In the tutorial of Java Excel Api: "JExcelApi can read an Excel spreadsheet from a file stored on the local filesystem or from some input stream.". You are trying to read from file system. So you must get file input stream then you can read it. Please search forums KM file read.

  • Problem  while reading XML file from Aplication server(Al11)

    Hi Experts
    I am facing a problem while  reading XML file from Aplication server  using open data set.
    OPEN DATASET v_dsn IN BINARY MODE FOR INPUT.
    IF sy-subrc <> 0.
        EXIT.
      ENDIF.
      READ DATASET v_dsn INTO v_rec.
    WHILE sy-subrc <> 0.
      ENDWHILE.
      CLOSE DATASET v_dsn.
    The XML file contains the details from an IDOC number  ,  the expected output  is XML file giving  all the segments details in a single page and send the user in lotus note as an attachment, But in the  present  output  after opening the attachment  i am getting a single XML file  which contains most of the segments ,but in the bottom part it is giving  the below error .
    - <E1EDT13 SEGMENT="1">
      <QUALF>001</QUALF>
      <NTANF>20110803</NTANF>
      <NTANZ>080000</NTANZ>
      <NTEND>20110803<The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource 'file:///C:/TEMP/notesD52F4D/SHPORD_0080005842.xml'.
    /SPAN></NTEND>
      <NTENZ>000000</NTENZ>
    for all the xml  its giving the error in bottom part ,  but once we open the source code and  if we saved  in system without changing anything the file giving the xml file without any error in that .
    could any one can help to solve this issue .

    Hi Oliver
    Thanx for your reply.
    see the latest output
    - <E1EDT13 SEGMENT="1">
      <QUALF>003</QUALF>
      <NTANF>20110803</NTANF>
      <NTANZ>080000</NTANZ>
      <NTEND>20110803</NTEND>
      <NTENZ>000000</NTENZ>
      <ISDD>00000000</ISDD>
      <ISDZ>000000</ISDZ>
      <IEDD>00000000</IEDD>
      <IEDZ>000000</IEDZ>
      </E1EDT13>
    - <E1EDT13 SEGMENT="1">
      <QUALF>001</QUALF>
      <NTANF>20110803</NTANF>
      <NTANZ>080000</NTANZ>
      <NTEND>20110803<The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource 'file:///C:/TEMP/notesD52F4D/~1922011.xml'.
    /SPAN></NTEND>
      <NTENZ>000000</NTENZ>
    E1EDT13 with QUALF>003 and  <E1EDT13 SEGMENT="1">
    with   <QUALF>001 having almost same segment data . but  E1EDT13 with QUALF>003  is populating all segment data
    properly ,but E1EDT13 with QUALF>001  is giving in between.

  • Problem in Creating excel file from internal table

    Hi Experts,
                here iam having a proble with creating an excel file from an internal table which is having around 15 records, when iam generating an excel file, its getting only upto 255 chars, after that its breaking and new record is being started in the next row. how should i get all the contents in one row of the excel or may be extended to the next line , how to resolve this issue, can anyone give me some idea or sample code.
    Thanks & Regards,
    poorna

    ur downloading to excel using a single field...then it will download only 255 chars....may be from internla table u can download the fields and the excel sheet gets downloaded with data....check below code....
    *& Report  ZETA_EXCEL_DOWNLOAD_CLIPBOARD                               *
    report  zeta_excel_download_clipboard           .
    include ole2incl.
    data:  w_cell1     type ole2_object,
           w_cell2     type ole2_object.
    *--- Ole data Declarations
    data: h_excel     type ole2_object,        " Excel object
          h_mapl      type ole2_object,        " list of workbooks
          h_map       type ole2_object,        " workbook
          h_zl        type ole2_object,        " cell
          h_f         type ole2_object,        " font
          gs_interior type ole2_object,        " Pattern
          worksheet   type ole2_object,
          h_cell      type ole2_object,
          h_cell1     type ole2_object,
          range       type ole2_object,
          h_sheet2    type ole2_object,
          h_sheet3    type ole2_object,
          gs_font     type ole2_object,
          flg_stop(1) type c.
              Internal table Declaration
    data: begin of t_excel occurs 0,
    vkorg(20) type c, "Sales Org
    vbtyp(20) type c, "Document Category
    auart(20) type c, "Document Type
    ernam(20) type c, "Created By
    vbeln(20) type c, "Document Number
    posnr(20) type c, "Item Number
    erdat(20) type c, "Created Date
    vdatu(20) type c, "Header Requested Delivery Date
    reqdat(20) type c, "Request date
    condat(20) type c, "Confirm date
    lifsk(20) type c, "Header Block
    txt30(30) type c, "Order User Status Description
    lifsp(20) type c, "Line Block
    dispo(20) type c, "MRP Controller
    dsnam(20) type c, "MRP Controller Description
    vmsta(20) type c, "Material Sales Status
    kunnr(20) type c, "Sold To
    cname(35) type c, "Sold To Name
    regio(20) type c, "State
    cufd(10) type c, "CUD
    bstnk(20) type c, "PO#
    bsark(20) type c, "Ordering Method
    matnr(20) type c, "Material
    maktx(35) type c, "Material Description
    t200(20) type c, "T200
    vtext(20) type c, "T200 Description
    matkl(20) type c, "Material Group
    zzbomind(7) type c, "BOM Indicator
    ostat(20) type c, "Order Status
    cmgst(20) type c, "CRD
    inco1(20) type c, "Incoterms
    oqty(20) type c, "Order Quantity
    pqty(20) type c, "Open Quantity
    unit(20) type c, "UOM
    onet(20) type c, "Order Value
    pnet(20) type c, "Open Value
    curr(20) type c, "Currency key
    so_bezei like tvkbt-bezei,"Sales Office
    sg_bezei like tvgrt-bezei,"Sales Group
    bname(20) type c, "Ordering Party
    contact(20) type c, "Contact Name
    telf1(20) type c, "Contact telf1
    reqqty(20) type c, "Item Request qty
    reqval(20) type c, "Item Request value
    conqty(20) type c, "Item Confirm qty
    conval(20) type c, "Item Confirm value
    zzrev(02) type c, "Revenue recognition acceptance
    bezei(20) type c, "Revenue recognition text
    vgbel(20) type c, "Reference Order for RETURNS
    0008text(255) type c, "Internal Order Comment Text
    end of t_excel.
    data: t_excel_bckord like t_excel occurs 0 with header line,
          t_excel_bcklog like t_excel occurs 0 with header line,
          t_excel_blkord like t_excel occurs 0 with header line.
      types: data1(1500) type c,
             ty          type table of data1.
      data:  it          type ty with header line,
    it_2          type ty with header line,
    it_3          type ty with header line,
             rec         type sy-tfill,
             deli(1)     type c,
             l_amt(18)   type c.
    data: begin of hex,
             tab type x,
            end of hex.
      field-symbols: <fs>      .
      constants cns_09(2) type n value 09.
      assign deli to <fs> type 'X'.
      hex-tab = cns_09.
      <fs> = hex-tab.
    data gv_sheet_name(20) type c .
    M A C R O Declaration
    define ole_check_error.
      if &1 ne 0.
        message e001(zz) with &1.
        exit.
      endif.
    end-of-definition.
    t_excel_bckord-vkorg = 'ABC'.
    t_excel_bckord-vbtyp = 'DEF'.
    t_excel_bckord-auart = 'GHI'.
    t_excel_bckord-ernam = 'JKL'.
    t_excel_bckord-vbeln = 'MNO'.
    t_excel_bckord-0008text = 'XYZ'.
    append t_excel_bckord.
    t_excel_bckord-vkorg = 'ABC1'.
    t_excel_bckord-vbtyp = 'DEF1'.
    t_excel_bckord-auart = 'GHI1'.
    t_excel_bckord-ernam = 'JKL1'.
    t_excel_bckord-vbeln = 'MNO1'.
    t_excel_bckord-0008text = 'XYZ1'.
    append t_excel_bckord.
    t_excel_bckord-vkorg = 'ABC2'.
    t_excel_bckord-vbtyp = 'DEF2'.
    t_excel_bckord-auart = 'GHI2'.
    t_excel_bckord-ernam = 'JKL2'.
    t_excel_bckord-vbeln = 'MNO2'.
    t_excel_bckord-0008text = 'XYZ2'.
    append t_excel_bckord.
    t_excel_bcklog-vkorg = 'ABC'.
    t_excel_bcklog-vbtyp = 'DEF'.
    t_excel_bcklog-auart = 'GHI'.
    t_excel_bcklog-ernam = 'JKL'.
    t_excel_bcklog-vbeln = 'MNO'.
    t_excel_bcklog-0008text = 'XYZ'.
    append t_excel_bcklog.
    t_excel_bcklog-vkorg = 'ABC1'.
    t_excel_bcklog-vbtyp = 'DEF1'.
    t_excel_bcklog-auart = 'GHI1'.
    t_excel_bcklog-ernam = 'JKL1'.
    t_excel_bcklog-vbeln = 'MNO1'.
    t_excel_bcklog-0008text = 'XYZ1'.
    append t_excel_bcklog.
    t_excel_bcklog-vkorg = 'ABC2'.
    t_excel_bcklog-vbtyp = 'DEF2'.
    t_excel_bcklog-auart = 'GHI2'.
    t_excel_bcklog-ernam = 'JKL2'.
    t_excel_bcklog-vbeln = 'MNO2'.
    t_excel_bcklog-0008text = 'XYZ2'.
    append t_excel_bcklog.
    t_excel_bcklog-vkorg = 'ABC3'.
    t_excel_bcklog-vbtyp = 'DEF3'..
    t_excel_bcklog-auart = 'GHI3'.
    t_excel_bcklog-ernam = 'JKL3'.
    t_excel_bcklog-vbeln = 'MNO3'.
    t_excel_bcklog-0008text = 'XYZ3'.
    append t_excel_bcklog.
    t_excel_blkord-vkorg = 'ABC'.
    t_excel_blkord-vbtyp = 'DEF'.
    t_excel_blkord-auart = 'GHI'.
    t_excel_blkord-ernam = 'JKL'.
    t_excel_blkord-vbeln = 'MNO'.
    t_excel_blkord-0008text = 'XYZ'.
    append t_excel_blkord.
    t_excel_blkord-vkorg = 'ABC1'.
    t_excel_blkord-vbtyp = 'DEF1'.
    t_excel_blkord-auart = 'GHI1'.
    t_excel_blkord-ernam = 'JKL1'.
    t_excel_blkord-vbeln = 'MNO1'.
    t_excel_blkord-0008text = 'XYZ1'.
    append t_excel_blkord.
    t_excel_blkord-vkorg = 'ABC2'.
    t_excel_blkord-vbtyp = 'DEF2'.
    t_excel_blkord-auart = 'GHI2'.
    t_excel_blkord-ernam = 'JKL2'.
    t_excel_blkord-vbeln = 'MNO2'.
    t_excel_blkord-0008text = 'XYZ2'.
    append t_excel_blkord.
    t_excel_blkord-vkorg = 'ABC3'.
    t_excel_blkord-vbtyp = 'DEF3'..
    t_excel_blkord-auart = 'GHI3'.
    t_excel_blkord-ernam = 'JKL3'.
    t_excel_blkord-vbeln = 'MNO3'.
    t_excel_blkord-0008text = 'XYZ3'.
    append t_excel_blkord.
    t_excel_blkord-vkorg = 'ABC4'.
    t_excel_blkord-vbtyp = 'DEF4'..
    t_excel_blkord-auart = 'GHI4'.
    t_excel_blkord-ernam = 'JKL4'.
    t_excel_blkord-vbeln = 'MNO4'.
    t_excel_blkord-0008text = 'XYZ4'.
    append t_excel_blkord.
    loop at t_excel_bckord.
    concatenate
    t_excel_bckord-vkorg
    t_excel_bckord-vbtyp
    t_excel_bckord-auart
    t_excel_bckord-ernam
    t_excel_bckord-vbeln
    t_excel_bckord-posnr
    t_excel_bckord-erdat
    t_excel_bckord-vdatu
    t_excel_bckord-reqdat
    t_excel_bckord-condat
    t_excel_bckord-lifsk
    t_excel_bckord-txt30
    t_excel_bckord-lifsp
    t_excel_bckord-dispo
    t_excel_bckord-dsnam
    t_excel_bckord-vmsta
    t_excel_bckord-kunnr
    t_excel_bckord-cname
    t_excel_bckord-regio
    t_excel_bckord-cufd
    t_excel_bckord-bstnk
    t_excel_bckord-bsark
    t_excel_bckord-matnr
    t_excel_bckord-maktx
    t_excel_bckord-t200
    t_excel_bckord-vtext
    t_excel_bckord-matkl
    t_excel_bckord-zzbomind
    t_excel_bckord-ostat
    t_excel_bckord-cmgst
    t_excel_bckord-inco1
    t_excel_bckord-oqty
    t_excel_bckord-pqty
    t_excel_bckord-unit
    t_excel_bckord-onet
    t_excel_bckord-pnet
    t_excel_bckord-curr
    t_excel_bckord-so_bezei
    t_excel_bckord-sg_bezei
    t_excel_bckord-bname
    t_excel_bckord-contact
    t_excel_bckord-telf1
    t_excel_bckord-reqqty
    t_excel_bckord-reqval
    t_excel_bckord-conqty
    t_excel_bckord-conval
    t_excel_bckord-zzrev
    t_excel_bckord-bezei
    t_excel_bckord-vgbel
    t_excel_bckord-0008text
    into it
    separated by deli.
    append it.
        clear it.
    endloop.
    loop at t_excel_bcklog.
    concatenate
    t_excel_bcklog-vkorg
    t_excel_bcklog-vbtyp
    t_excel_bcklog-auart
    t_excel_bcklog-ernam
    t_excel_bcklog-vbeln
    t_excel_bcklog-posnr
    t_excel_bcklog-erdat
    t_excel_bcklog-vdatu
    t_excel_bcklog-reqdat
    t_excel_bcklog-condat
    t_excel_bcklog-lifsk
    t_excel_bcklog-txt30
    t_excel_bcklog-lifsp
    t_excel_bcklog-dispo
    t_excel_bcklog-dsnam
    t_excel_bcklog-vmsta
    t_excel_bcklog-kunnr
    t_excel_bcklog-cname
    t_excel_bcklog-regio
    t_excel_bcklog-cufd
    t_excel_bcklog-bstnk
    t_excel_bcklog-bsark
    t_excel_bcklog-matnr
    t_excel_bcklog-maktx
    t_excel_bcklog-t200
    t_excel_bcklog-vtext
    t_excel_bcklog-matkl
    t_excel_bcklog-zzbomind
    t_excel_bcklog-ostat
    t_excel_bcklog-cmgst
    t_excel_bcklog-inco1
    t_excel_bcklog-oqty
    t_excel_bcklog-pqty
    t_excel_bcklog-unit
    t_excel_bcklog-onet
    t_excel_bcklog-pnet
    t_excel_bcklog-curr
    t_excel_bcklog-so_bezei
    t_excel_bcklog-sg_bezei
    t_excel_bcklog-bname
    t_excel_bcklog-contact
    t_excel_bcklog-telf1
    t_excel_bcklog-reqqty
    t_excel_bcklog-reqval
    t_excel_bcklog-conqty
    t_excel_bcklog-conval
    t_excel_bcklog-zzrev
    t_excel_bcklog-bezei
    t_excel_bcklog-vgbel
    t_excel_bcklog-0008text
    into it_2
    separated by deli.
    append it_2.
        clear it_2.
    endloop.
    loop at t_excel_blkord.
    concatenate
    t_excel_blkord-vkorg
    t_excel_blkord-vbtyp
    t_excel_blkord-auart
    t_excel_blkord-ernam
    t_excel_blkord-vbeln
    t_excel_blkord-posnr
    t_excel_blkord-erdat
    t_excel_blkord-vdatu
    t_excel_blkord-reqdat
    t_excel_blkord-condat
    t_excel_blkord-lifsk
    t_excel_blkord-txt30
    t_excel_blkord-lifsp
    t_excel_blkord-dispo
    t_excel_blkord-dsnam
    t_excel_blkord-vmsta
    t_excel_blkord-kunnr
    t_excel_blkord-cname
    t_excel_blkord-regio
    t_excel_blkord-cufd
    t_excel_blkord-bstnk
    t_excel_blkord-bsark
    t_excel_blkord-matnr
    t_excel_blkord-maktx
    t_excel_blkord-t200
    t_excel_blkord-vtext
    t_excel_blkord-matkl
    t_excel_blkord-zzbomind
    t_excel_blkord-ostat
    t_excel_blkord-cmgst
    t_excel_blkord-inco1
    t_excel_blkord-oqty
    t_excel_blkord-pqty
    t_excel_blkord-unit
    t_excel_blkord-onet
    t_excel_blkord-pnet
    t_excel_blkord-curr
    t_excel_blkord-so_bezei
    t_excel_blkord-sg_bezei
    t_excel_blkord-bname
    t_excel_blkord-contact
    t_excel_blkord-telf1
    t_excel_blkord-reqqty
    t_excel_blkord-reqval
    t_excel_blkord-conqty
    t_excel_blkord-conval
    t_excel_blkord-zzrev
    t_excel_blkord-bezei
    t_excel_blkord-vgbel
    t_excel_blkord-0008text
    into it_3
    separated by deli.
    append it_3.
        clear it_3.
    endloop.
      if h_excel-header = space or h_excel-handle = -1.
    start Excel
        create object h_excel 'EXCEL.APPLICATION'.
      endif.
    PERFORM err_hdl.
    *--- get list of workbooks, initially empty
      call method of h_excel 'Workbooks' = h_mapl.
    PERFORM err_hdl.
      set property of h_excel 'Visible' = 1.
    add a new workbook
      call method of h_mapl 'Add' = h_map.
    PERFORM err_hdl.
    *GV_SHEET_NAME = '1st SHEET'.
    gv_sheet_name = 'Back Orders'.
      get property of  h_excel 'ACTIVESHEET' = worksheet.
    set property of worksheet 'Name' = gv_sheet_name .
    *--Formatting the area of additional data 1 and doing the BOLD
    call method of h_excel 'Cells' = w_cell1
    exporting
    #1 = 1
    #2 = 1.
    call method of h_excel 'Cells' = w_cell2
    exporting
    #1 = 1
    #2 = 50.
    call method of h_excel 'Range' = h_cell
    exporting
    #1 = w_cell1
    #2 = w_cell2.
    *CALL METHOD OF gs_cells 'Select' .
    get property of h_cell 'Font' = gs_font .
    set property of gs_font 'Bold' = 1 .
            data l_rc type i.
      call method cl_gui_frontend_services=>clipboard_export
        importing
          data                 = it[]
        changing
          rc                   = l_rc
        exceptions
          cntl_error           = 1
          error_no_gui         = 2
          not_supported_by_gui = 3
          others               = 4.
      call method of h_excel 'Cells' = w_cell1
        exporting
          #1 = 1
          #2 = 1.
      call method of h_excel 'Cells' = w_cell2
        exporting
          #1 = 1
          #2 = 1.
    PERFORM err_hdl.
       call method of h_excel 'Range' = range
        exporting
          #1 = w_cell1
          #2 = w_cell2.
      call method of range 'Select'.
    PERFORM err_hdl.
      call method of worksheet 'Paste'.
    PERFORM err_hdl.
    CALL METHOD OF h_excel 'QUIT'.
    *GV_SHEET_NAME = '2ND SHEET'.
    gv_sheet_name = 'Backlog'.
    get property of h_excel 'Sheets' = h_sheet2 .
      call method of h_sheet2 'Add' = h_map.
    set property of h_map 'Name' = gv_sheet_name .
      get property of  h_excel 'ACTIVESHEET' = worksheet.
    *--Formatting the area of additional data 1 and doing the BOLD
    call method of h_excel 'Cells' = w_cell1
    exporting
    #1 = 1
    #2 = 1.
    call method of h_excel 'Cells' = w_cell2
    exporting
    #1 = 1
    #2 = 50.
    call method of h_excel 'Range' = h_cell
    exporting
    #1 = w_cell1
    #2 = w_cell2.
    get property of h_cell 'Font' = gs_font .
    set property of gs_font 'Bold' = 1 .
      call method cl_gui_frontend_services=>clipboard_export
        importing
          data                 = it_2[]
        changing
          rc                   = l_rc
        exceptions
          cntl_error           = 1
          error_no_gui         = 2
          not_supported_by_gui = 3
          others               = 4.
      call method of h_excel 'Cells' = w_cell1
        exporting
          #1 = 1
          #2 = 1.
      call method of h_excel 'Cells' = w_cell2
        exporting
          #1 = 1
          #2 = 1.
    PERFORM err_hdl.
       call method of h_excel 'Range' = range
        exporting
          #1 = w_cell1
          #2 = w_cell2.
      call method of range 'Select'.
    PERFORM err_hdl.
      call method of worksheet 'Paste'.
    *GV_SHEET_NAME = '3rd SHEET'.
    gv_sheet_name = 'Blocked Orders'.
    get property of h_excel 'Sheets' = h_sheet3 .
      call method of h_sheet3 'Add' = h_map.
    set property of h_map 'Name' = gv_sheet_name .
      get property of  h_excel 'ACTIVESHEET' = worksheet.
    *--Formatting the area of additional data 1 and doing the BOLD
    call method of h_excel 'Cells' = w_cell1
    exporting
    #1 = 1
    #2 = 1.
    call method of h_excel 'Cells' = w_cell2
    exporting
    #1 = 1
    #2 = 50.
    call method of h_excel 'Range' = h_cell
    exporting
    #1 = w_cell1
    #2 = w_cell2.
    get property of h_cell 'Font' = gs_font .
    set property of gs_font 'Bold' = 1 .
      call method cl_gui_frontend_services=>clipboard_export
        importing
          data                 = it_3[]
        changing
          rc                   = l_rc
        exceptions
          cntl_error           = 1
          error_no_gui         = 2
          not_supported_by_gui = 3
          others               = 4.
      call method of h_excel 'Cells' = w_cell1
        exporting
          #1 = 1
          #2 = 1.
      call method of h_excel 'Cells' = w_cell2
        exporting
          #1 = 1
          #2 = 1.
    PERFORM err_hdl.
       call method of h_excel 'Range' = range
        exporting
          #1 = w_cell1
          #2 = w_cell2.
      call method of range 'Select'.
    PERFORM err_hdl.
      call method of worksheet 'Paste'.
    *--- disconnect from Excel
      free object h_zl.
      free object h_mapl.
      free object h_map.
      free object h_excel.

  • Reading an EXCEL file from Oracle PL/SQL (HP-Unix server)

    Hi,
    I have the following requirement:
    1. Get the EXCEL file from the remote FTP location
    2. Read the EXCEL file and convert it into the CSV file format.
    3. Put the CSV file into another FTP location.
    I need to get all these points done using Oracle PL/SQL procedure.
    I am using the Oracle 9i installed in HP-Unix environment.
    Please help me in getting this done.
    Thanks

    Ok, setting up Excel as an External Database connection....
    1- Go to Control Panel>Administrative Tools>Data Sources (ODBC)>System DSN and create a data source with appropriate driver. Name it EXCL.
    2- In %ORACLE_HOME%\Network\Admin\Tnsnames.ora fie add entry:
    EXCL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.0.24)(PORT = 1521))
    (CONNECT_DATA =
    (SID = EXCL)
    (HS = OK)
    Here SID is the name of data source that you have just created.
    3- In %ORACLE_HOME%\Network\Admin\Listener.ora file add:
    (SID_DESC =
    (PROGRAM = hsodbc)
    (SID_NAME = <hs_sid>)
    (ORACLE_HOME = <oracle home>)
    under SID_LIST_LISTENER like:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = d:\ORA9DB)
    (PROGRAM = extproc)
    (SID_DESC =
    (GLOBAL_DBNAME = ORA9DB)
    (ORACLE_HOME = d:\ORA9DB)
    (SID_NAME = ORA9DB)
    (SID_DESC =
    (PROGRAM = hsodbc)
    (SID_NAME = EXCL)
    (ORACLE_HOME = D:\ora9db)
    Dont forget to reload the listener
    c:\> lsnrctl reload
    4- In %ORACLE_HOME%\hs\admin create init<HS_SID>.ora. For our sid EXCL we create file initexcl.ora.
    In this file set following two parameters:
    HS_FDS_CONNECT_INFO = excl
    HS_FDS_TRACE_LEVEL = 0
    5- Now connect to Oracle database and create database link with following command:
    SQL> CREATE DATABASE LINK excl
    2 USING 'excl'
    3 /
    Database link created.
    Now you can perform query against this database like you would for any remote database.
    SQL> SELECT table_name FROM all_tables@excl;
    TABLE_NAME
    DEPT
    EMP
    But you're limited to Windows based servers for this.
    As for converting Excel to CSV and doing it yourself. I hope you know the internal format of MS Excel files cos you're gonna need to know it. It would be far easier if the "user" creating the Excel file could save a copy out in CSV format for you and then it's just a case of FTP'ing the file and using external tables to read the data.

  • Reading data in excel files from client side

    Hello Experts,
    I want to build a website from which clients can upload data in the excel sheets they have into the sql server 2000 on the database server.
    These excel files will be at the client machine from where they will upload all the data from the excel file to database server through this website.
    Can you please help how to go about doing this.

    There are two open source projects that will help you out: Jakarta POI and JExcel. Both can serialize and deserialize Excel files to Java. You can also use the older ODBC-JDBC bridge, which can both read Excel files (albeit in a limited way with SQL syntax) and then output to your SQL Server.
    - Saish

Maybe you are looking for