Reading Excel contents

Hi Experts,
For example  I have a excel file in "https://www.abc.com/xyz.xls" location.
How to read excel file contents and display that excel file in my program.
Please suggest steps to do.
Please help me....
Thanks
Sridhar

Hi,
First download the file on to your desktop and then try this code.
data:
t_tab LIKE TABLE OF  alsmex_tabline WITH HEADER LINE,
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
      filename                = p_file
      i_begin_col             = 1
      i_begin_row             = 1
      i_end_col               = 5
      i_end_row               = 4
    TABLES
      intern                  = t_tab
    EXCEPTIONS
      inconsistent_parameters = 1
      upload_ole              = 2
      OTHERS                  = 3.
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  LOOP AT t_tab.
    WRITE t_tab-value .
    AT END OF row.
      write :/
    ENDAT.
  ENDLOOP.
regards
padma

Similar Messages

  • How to read the content of this excel file in LV

    Hi could you please let me know how can I read the content of this excel file using the Read From Speardsheet function. It contains text and numbers
    Thanks
    The excel file is attached
    Attachments:
    Datalogging.zip ‏307 KB

    Check attached VI.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Attachments:
    ReadFromExcel.vi ‏27 KB

  • How to read the contents in the excel file on the basis of colunm heading?

    Hi,
    Here is my requirement like that  in excel file i got the customer number , amount etc....
    And my required fields are customer and amount. In file customer nr is under the heading 'CUSTOMER' and amount is under the heading 'AMOUNT'.
    Is there any FM for reading the contents under the colunm heading of excel?
    Please suggest me.
    Thanks,
    Harshal kulkarni

    Hi Harshal ,
    I dont think there is such function module /BAPI/Class-Method .
    but if your excel file is dynamic you can write your own logic using field - symbols.
    Regards ,
    Praveen

  • Read Excel sheet contents using java/javabeans

    I want to read the contents of an MS Excel file from java, is it possible using JavaBeans-ActiveX bridge or by any other java technologies, if possible, how ?

    I want to read the contents of an MS Excel file from
    java, is it possible using JavaBeans-ActiveX bridge or
    by any other java technologies, if possible, how ?Bridge2Java from IBM Alphaworks will do the trick for you.
    You can get it from here:
    http://www.alphaworks.ibm.com/aw.nsf/techs/bridge2java
    Using it, you can do things like the following (taken and abbreviated from the samples provided with the package):
    import Excel.*;
    public class QuickExcel
        public static void main(java.lang.String[] args) {
            Application app;
            Workbooks wbs;
            Workbook wb;
            Worksheet sheet;
            Range rangeA1, rangeA2;
            try
                com.ibm.bridge2java.OleEnvironment.Initialize();
                app = new Application(); // Excel.Application !!! :-)
                app.set_Visible(true);
                wbs = app.get_Workbooks();
                wb = wbs.Add();
                sheet = new Worksheet(wb.get_ActiveSheet());
                rangeA1 = sheet.get_Range("A1");
                String out = new String("This is a test");
                rangeA1.set_Value(out);
                // Wait five seconds
                Thread.sleep(5000);
                // Close the workbook without saving
                wb.Close(new Boolean("false"));
                app.Quit();
            } catch (com.ibm.bridge2java.ComException e)
                System.out.println( "COM Exception:" );
                System.out.println( Long.toHexString((e.getHResult())) );
                System.out.println( e.getMessage() );
            } catch (Exception e)
                System.out.println("message: " + e.getMessage());
            } finally
                app = null;
                com.ibm.bridge2java.OleEnvironment.UnInitialize();
    }

  • Adapter Module (Reading Excel File)

    Hi Guys,
    I followed the Webblog : Read Excel instead of XML through FileAdapter
    For File Adapter Module Development , for reading Excel Sheet.
    Deployment all went fine and when i used in my configuration , file is getting picked up but the xml content is not getting displyed , it says not well formated.Below error is shown in the CC Monitor
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    XML document must have a top level element. Error processing resource 'http://pxxxxx:50xxx/mdt/messagecontentservlet?att...
    My coding in nwds
              xmldata =   "<?xmlversion="1.0"encoding="UTF-8"?>
                             + "<ns:"+wb.getSheet(0).getCell(0, 0).getContents() +"xmlns:ns=""
                             + wb.getSheet(0).getCell(1, 0).getContents() + "">"
                             + "<Name>"+ wb.getSheet(0).getCell(1, 2).getContents()
                             + "</Name>" +"</ns:" wb.getSheet(0).getCell(0, 0).getContents()">";
    Kindly suggest if any
    srini
    Edited by: Venkateswarlu Srinivas on Jul 4, 2008 2:47 PM

    try removing the \n you have added in the string

  • Upload and Reading Excel File in Web Dynpro

    Hi all,
    I have a requirement in my application( in 04s), where in, i need to upload an excel from a client through a web dynpro application(using fileupload UI) and read each and every the content of that excel file in web dynpro and process the data accordingly.
    The format of the excel is fixed and pre-defined.
    I went through a lot of blogs, but could not find a direct and exact solution to this requirement.
    Please help me.
    Looking forward to your contribution
    Thank you,
    Gita KC.

    Reading Excel Sheet from Java without using any Framework
    Enhanced File Upload - Uploading and Processing Excel Sheets
    Reading Multiple Sheets of Excel Sheet from Java
    nikhil

  • Unable to read excel attachment received thru email using function module ?

    Hi...
    I am using the function module 'SO_DOCUMENT_SEND_API1' to send an email attachement in EXCEL format.
    The email is getting received along with the attachment, but when i try to open the excel file, i am getting an error stating "Unable to Read File"......
    What could be the reason behind this error.......
    Plz Help......

    Hi,
    Firstly, convert Excel Format with FM: SAP_CONVERT_TO_TXT_FORMAT ,
    " Format convert(Excel content)
      CALL FUNCTION 'SAP_CONVERT_TO_TXT_FORMAT'
        EXPORTING
          I_LINE_HEADER        =  'X'
        TABLES
          I_TAB_SAP_DATA      = GIT_DATA                     "Before convert
        CHANGING
          I_TAB_CONVERTED_DATA = GIT_EXCEL           "After convert
      LOOP AT GIT_EXCEL INTO LFC_STMP.
        LI_ITMP = STRLEN( LFC_STMP ).
        LFC_STMP+LI_ITMP = CL_ABAP_CHAR_UTILITIES=>CR_LF.
        MODIFY GIT_EXCEL FROM LFC_STMP.
      ENDLOOP.
    Then, send Email with .xls attachment via FM: SO_DOCUMENT_SEND_API1.
    Best Regards
    Lily

  • Reading Structured Content with Apache Tika

    Hi,
    Is there a way to read structured content from word file using a java program with Apache Tika APIs? I know Tika internally used Apache POI
    in POI we can have
    Range range = doc.getOverallRange()
    TableIterator ti = new TableIterator(range);
    and other functions like getSection(), getParagraph()
    I am not able to find corresponding functions in Tika. Please let me know.
    Thanks

    Hi,
    The first column of excel is text and the second column is special(US ZipCode).
    I am using the below code to read the contents:
    InputStream is = new BufferedInputStream(
    new FileInputStream(fileName));
    XSSFWorkbook wb = new XSSFWorkbook(is);
    XSSFSheet sheet = wb.getSheetAt(0);
    int rows = sheet.getPhysicalNumberOfRows();
    for (int r = 0; r < rows; r++) {
    XSSFRow row = sheet.getRow(r);
    int cells = row.getPhysicalNumberOfCells();
    for (int c = 0; c < cells; c++) {
    XSSFCell cell = row.getCell(c);
    String value = null;
    switch (cell.getCellType()) {
    case XSSFCell.CELL_TYPE_FORMULA:
    value =cell.getCellFormula();
    break;
    case XSSFCell.CELL_TYPE_NUMERIC:
    value = Double.toString(cell.getNumericCellValue());
    break;
    case XSSFCell.CELL_TYPE_STRING:
    value = cell.getStringCellValue();
    break;
    default:
    System.out.println("CELL col=" + cell.getColumnIndex() + " VALUE="
    + value);
    Regards,
    Raj

  • Read Excel sheet in KM using API.

    Hi all,
    I kept one Excel sheet (Xsl file) in KM. I want to read that Excel (Xsl) file by using API in NWDS.
    How to read ? Is this possible
    Helpful answer will be appreciate
    Thanks & Regards
    Thillai J

    Hi Thillai
    It is possible to read the files using any of the Java Excel API's ( like POI or JExcel or JDBC-ODBC bridge). It depends on your convenience and requirement as to which one to choose for.
    [POI|http://poi.apache.org/] is seem to be widely used.
    In your case, the sequence of actions will be as follows:
    1. Access the resource and get the content.
    2. Get an InputStream from the content object.
    3. Next, using this InputStream, the data can be read.
    4. Refer to [this|http://www.javabeat.net/articles/41-apache-poi-reading-excel-sheet-using-java-1.html] link as to how read data. (It is assumed that you have successfully retrieved the InputStream in Step 2)
    Hope that helps.
    Thanks
    Deepak

  • Does Acrobat Pro read the content in pdf file and transforms it?

    Does Acrobat Pro read the content in pdf file and transforms it to xls file without the need for much changes or manual work?

    Acrobat X (Standard and Pro) will save tabular data to XLS or XLSX format, provided it can recognize the table as being a table. If the PDF has missing or incorrect structure tags, Acrobat will try to guess the table layout by the position of text and lines on the page - this works well for basic formatting but if the table has complex styling, spanned cells etc. it can lead to problems.
    Acrobat X will even attempt to export a table within a scanned document, by applying OCR during the export stage - though again this relies on the table being visually identified.
    See http://www.adobe.com/products/acrobatpro/pdf-to-word-excel-converter.html and this article on how to extract one table from a larger document.

  • Reading Excel data, FM: ALSM_EXCEL_TO_INTERNAL_TABLE problem

    Hi all,
    I'm using function module ALSM_EXCEL_TO_INTERNAL_TABLE, to read content of MS excel file and then I'm uploading those data into SAP. I'm facing probably performance problems within this module. My Excel file has 22000 rows and my ABAP program ends with short dump: MESSAGE_TYPE_X - Control Framework : Error processing control. Error occurs in function module AC_SYSTEM_FLUSH there is an exception raised:
    method_call_error: MESSAGE ID 'CNDP' TYPE 'X' NUMBER 006 RAISING CNTL_ERROR.AC_SYSTEM_FLUSH
    Could it be that it has something to do with the performance of exchanging data between application server and front-end?
    I've noticed that FM: ALSM_EXCEL_TO_INTERNAL_TABLE is reading excel file via windows clipboard (it selects whole range of workbook then it copies to clipboard). Does anybody know something more about this technique?
    Regards, Martin

    Hi Martin,
    I went through the function module ALSM_EXCEL_TO_INTERNAL_TABLE .
    With this function it is not possible to download more than 9999 records from the excel sheet.
    This is so because :
    The return table is type ALSMEX_TABLINE
    and the fields rows and columns are numc with maximum length 4 due to which its not working.
    This is all what I could find there might be another way of doing it.
    Just let me also know if u find another way of doing it.
    Regards
    Varun

  • Read Excel with macros using Java POI

    Hi,
    I'm very desperate... I have to do following things: read Excel file with macros. I can read xls without macros, but i haven't ideas what to do, so correctly read records with macros in xls.
    I use following method to listen for incoming records and handles them as required.
    public void processRecord(Record record)
    switch (record.getSid())
    // the BOFRecord can represent either the beginning of a sheet or the workbook
    case BOFRecord.sid:
    BOFRecord bof = (BOFRecord) record;
    if (bof.getType() == bof.TYPE_WORKBOOK)
    System.out.println("Encountered workbook");
    // assigned to the class level member
    } else if (bof.getType() == bof.TYPE_WORKSHEET)
    System.out.println("Encountered sheet reference");
    break;
    case BoundSheetRecord.sid:
    BoundSheetRecord bsr = (BoundSheetRecord) record;
    System.out.println("New sheet named: " + bsr.getSheetname());
    break;
    case RowRecord.sid:
    RowRecord rowrec = (RowRecord) record;
    System.out.println("Row found, first column at "
    + rowrec.getFirstCol() + " last column at " + rowrec.getLastCol());
    break;
    case NumberRecord.sid:
    NumberRecord numrec = (NumberRecord) record;
    System.out.println("Cell found with value " + numrec.getValue()
    + " at row " + numrec.getRow() + " and column " + numrec.getColumn());
    break;
    // SSTRecords store a array of unique strings used in Excel.
    case SSTRecord.sid:
    sstrec = (SSTRecord) record;
    for (int k = 0; k < sstrec.getNumUniqueStrings(); k++)
    System.out.println("String table value " + k + " = " + sstrec.getString(k));
    break;
    case LabelSSTRecord.sid:
    LabelSSTRecord lrec = (LabelSSTRecord) record;
    System.out.println("String cell found with value "
    + sstrec.getString(lrec.getSSTIndex()));
    break;
    case FormulaRecord.sid:
    FormulaRecord fre = (FormulaRecord) record;
    System.out.println("Formula: "+ fre.getValue());
    break;
    I don't know, how check, that incoming record is joined with macro and I don't know how handle it.
    Is there possible to create Excel file with macros using POI?
    Please help me...
    Margaret

    I want to read the contents of an MS Excel file from
    java, is it possible using JavaBeans-ActiveX bridge or
    by any other java technologies, if possible, how ?Bridge2Java from IBM Alphaworks will do the trick for you.
    You can get it from here:
    http://www.alphaworks.ibm.com/aw.nsf/techs/bridge2java
    Using it, you can do things like the following (taken and abbreviated from the samples provided with the package):
    import Excel.*;
    public class QuickExcel
        public static void main(java.lang.String[] args) {
            Application app;
            Workbooks wbs;
            Workbook wb;
            Worksheet sheet;
            Range rangeA1, rangeA2;
            try
                com.ibm.bridge2java.OleEnvironment.Initialize();
                app = new Application(); // Excel.Application !!! :-)
                app.set_Visible(true);
                wbs = app.get_Workbooks();
                wb = wbs.Add();
                sheet = new Worksheet(wb.get_ActiveSheet());
                rangeA1 = sheet.get_Range("A1");
                String out = new String("This is a test");
                rangeA1.set_Value(out);
                // Wait five seconds
                Thread.sleep(5000);
                // Close the workbook without saving
                wb.Close(new Boolean("false"));
                app.Quit();
            } catch (com.ibm.bridge2java.ComException e)
                System.out.println( "COM Exception:" );
                System.out.println( Long.toHexString((e.getHResult())) );
                System.out.println( e.getMessage() );
            } catch (Exception e)
                System.out.println("message: " + e.getMessage());
            } finally
                app = null;
                com.ibm.bridge2java.OleEnvironment.UnInitialize();
    }

  • Read excel sheet using jexcel

    i use a jexcel to read excel file
    i down a package named : jxl.jar
    this my code :
    public static void readFile() throws BiffException
    Workbook w;
    try {
    w = Workbook.getWorkbook(new File("C:/remon.xsl"));
    Sheet read_sheet=w.getSheet("Sheet1");
    int cols = read_sheet.getColumns();
    int rows = read_sheet.getRows();
    Cell cell = null;
    for (int j= 1; j < rows; j++) {
    for (int i = 1; i < rows; i++) {
    cell = read_sheet.getCell(j, i);
    catch (IOException e) {
    System.out.println("2");
    and this the error :
    Class jxl.read.biff.BiffException not found in try.
    *try {*
    *^*
    plza help
    Edited by: romee on May 13, 2008 2:24 PM

    I want to read the contents of an MS Excel file from
    java, is it possible using JavaBeans-ActiveX bridge or
    by any other java technologies, if possible, how ?Bridge2Java from IBM Alphaworks will do the trick for you.
    You can get it from here:
    http://www.alphaworks.ibm.com/aw.nsf/techs/bridge2java
    Using it, you can do things like the following (taken and abbreviated from the samples provided with the package):
    import Excel.*;
    public class QuickExcel
        public static void main(java.lang.String[] args) {
            Application app;
            Workbooks wbs;
            Workbook wb;
            Worksheet sheet;
            Range rangeA1, rangeA2;
            try
                com.ibm.bridge2java.OleEnvironment.Initialize();
                app = new Application(); // Excel.Application !!! :-)
                app.set_Visible(true);
                wbs = app.get_Workbooks();
                wb = wbs.Add();
                sheet = new Worksheet(wb.get_ActiveSheet());
                rangeA1 = sheet.get_Range("A1");
                String out = new String("This is a test");
                rangeA1.set_Value(out);
                // Wait five seconds
                Thread.sleep(5000);
                // Close the workbook without saving
                wb.Close(new Boolean("false"));
                app.Quit();
            } catch (com.ibm.bridge2java.ComException e)
                System.out.println( "COM Exception:" );
                System.out.println( Long.toHexString((e.getHResult())) );
                System.out.println( e.getMessage() );
            } catch (Exception e)
                System.out.println("message: " + e.getMessage());
            } finally
                app = null;
                com.ibm.bridge2java.OleEnvironment.UnInitialize();
    }

  • When connecting my 120GB iPod Classic I receive the prompt; iTunes cannot read the contents of the iPod "Name". It asks me to reset it. All my music appears to have been erased  iPod yet 41GB of data is on it. Help!

    When connecting my 120GB iPod Classic I receive the prompt; iTunes cannot read the contents of the iPod "Name". It asks me to reset it. If I do this I will lose the contents of the iPod. The iPod shows no music on it yet 41GB of data is on it under "About" on the iPOD itself. It would appear that the music files are still there. I don't want to reset the iPod as it will mean reloading a significant amount of music i.e. my entire CD collection. Any suggestions? Has my iPod died?

    (I'll lose all my music right?)
    That is correct. A restore wipes all content from the device, resets all settings back to their defaults, and loads a fresh copy of the iPod's software onto the device.
    See this excellent user tip from another forum member turingtest2 outlining the different methods and software available to help you copy content from your iPod back to your PC and into iTunes.
    Recovering your iTunes library from your iPod or iOS device
    After all the music is safely in iTunes again, go ahead and restore the iPod to factory settings as it says.
    B-rock

  • How to read attachment content of activity in crm

    Hi, experts
      I want read a excel content into internal table who is
      attachment of activity in crm, but it is not successful.
      I use the class 'CL_CRM_DOCUMENTS'.
      Thanks you for your help!

    Hi, experts
      This issue is very urgent!
      Who can help me?
      Thanks you very much!

Maybe you are looking for

  • Any hope for this 6730b?

    Hi I picked up a HP notebook 6730b at the local recycling centre.  it has 6Gb Ram and a 250 Gb Hdd Everything seems to run fine, except I can't lock into windows or acces the recovery partion. I've tried removing the battery under the HDD, booting wi

  • Bridge search criteria doesn't find files but the exact same criteria finds files in the Finder

    I am wondering if anyone has been having the same problem that I have been having. I can't seem to get any results back from the Bridge when I create a smart collection but when I enter the exact same criteria in the Finder I get lots of results. I t

  • Templates updating on local server but not on remote in DW CS3

    I'm using Dreamweaver CS3 and am trying to update some templates.  At first, when I checked out the file on the remote server, made the change and saved, it asked me if I want to upload to all pages using that template.  I said yes, and it checked th

  • Problem with RMAN.

    Hi, i worked with Oracle Database 10g Express Edition, my problem is the execute the Backup utility, display the message error: RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FO

  • SRM PO account assignment

    Hi guys My question is about account assignment in SRM PO during conversion. We are trying to use FM BBP_BC_PO_CREATE for uploading POs from legacy. To handle account assignment on item line, is I_PO_ACCASS right table to populate value into? Which a