Multiple sheets from EXCEL

Hi Everyone,
My requirment is as follows to read multiple sheets from an EXCEL that contains MAcro and some Visual BAsic Components.
I am using FM 'ALSM_EXCEL_TO_INTERNAL_TABLE' to read a single sheet which works fine.
But it brings in only one Active sheet at a time.
Please help me resolve this.
  CREATE OBJECT application 'EXCEL.APPLICATION'.
  CALL METHOD OF application 'Workbooks' = workbook.
  CALL METHOD OF workbook 'Open' EXPORTING #1 = p_file.
*call METHOD of Workbook 'Sheets' EXPORTING
Open the first sheet in the workbook
  CALL METHOD OF workbook 'Worksheets' = sheet EXPORTING #1 = 1.
  CALL METHOD OF workbook 'ActivateSheet'
    EXPORTING
      #1 = 1.
  CALL METHOD OF sheet 'Activate'.
  CALL METHOD OF sheet 'Save'.
  FREE OBJECT application.
  SET PROPERTY OF application 'visible' = 0.
  CALL METHOD OF application 'QUIT'.
  CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
      filename                = p_file
      i_begin_col             = '1'
      i_begin_row             = '1'
      i_end_col               = '60'
      i_end_row               = '32000'
    TABLES
      intern                  = it_data
    EXCEPTIONS
      inconsistent_parameters = 1
      upload_ole              = 2
      OTHERS                  = 3.
  IF sy-subrc <> 0.
    WRITE:/ 'Upload Error ', sy-subrc.
  ENDIF.
  APPEND LINES OF it_data TO gt_data.
  BREAK-POINT.
  CREATE OBJECT application 'EXCEL.APPLICATION'.
  CALL METHOD OF application 'Workbooks' = workbook.
  CALL METHOD OF workbook 'Open' EXPORTING #1 = p_file.
Open the second sheet in the workbook
  CALL METHOD OF workbook 'Worksheets' = sheet EXPORTING #1 = 2.
    CALL METHOD OF workbook 'ActivateSheet'
    EXPORTING
      #1 = 2.
  CALL METHOD OF sheet 'Activate'.
  CALL METHOD OF sheet 'Save'.
  SET PROPERTY OF application 'visible' = 0.
  FREE OBJECT application.
  CALL METHOD OF application 'QUIT'.
  CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
      filename                = p_file
      i_begin_col             = '1'
      i_begin_row             = '1'
      i_end_col               = '60'
      i_end_row               = '32000'
    TABLES
      intern                  = it_data
    EXCEPTIONS
      inconsistent_parameters = 1
      upload_ole              = 2
      OTHERS                  = 3.
  IF sy-subrc <> 0.
    WRITE:/ 'Upload Error ', sy-subrc.
  ENDIF.

Hi ,
Check the below link.
[http://wiki.sdn.sap.com/wiki/display/Snippets/ReadmultiplesheetsofanExcelfileintoSAPthroughABAP]
Thanks.
Subhankar

Similar Messages

  • Export SQL Server Table into Multiple Sheets in Excel

    I'm trying to understand the example here.
    http://visakhm.blogspot.in/2013/09/exporting-sqlserver-data-to-multiple.html
    Basically, I'm up to step #5.
    5. Data Flow Task to populate the created sheet with data for that subject. The Data Flow looks like below
    I don't understand this part.  Has anyone worked with this sample before?  Has anyone gotten this to work?  I'm trying to learn SSIS better, but I'm finding it hard to get started with this stuff.  I guess if I get a couple projects under
    my belt, I'll be fine.  The hardest part is getting started.
    If anyone feels really ambitions today, maybe you can assist me with two other projects as well.
    #1)
    http://visakhm.blogspot.in/2011/12/simulating-file-watcher-task-in-ssis.html
    #2)
    http://sqlage.blogspot.in/2013/12/ssis-read-multiple-sheets-from-excel.html
    http://beyondrelational.com/modules/24/syndicated/398/Posts/18163/ssis-how-to-loop-through-multiple-excel-sheets-and-load-them-into-a-sql-table.aspx
    I'd greatly appreciate any help I can get with this.
    Thanks!!
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Hi Ryguy72,
    The solution introduced in Visakh’s blog does work. I have written the detailed steps for you:
    1. Create an Excel file (Des.xls) as the destination file, rename the Sheet1 to “Excel Destination”, and add four columns: ID, Name, Subject, and Marks.
    2. Create an Object type variable Subject, a String type variable SheetName, and a String type variable WorkSheetQuery.
    3. Set the value of variable SheetName to “Excel Destination$”, and set the expression of variable WorkSheetQuery to:
    "CREATE TABLE `" + @[User::SheetName] + "` (
    `ID` Long,
    `Name` LongText,
    `Subject` LongText,
    `Marks` Long
    4. In the Execute SQL Task outside the Foreach Loop Container, set its General tab as follows:
    ResultSet: Full result set
    ConnectionType: OLE DB
    Connection: LocalHost.TestDB (e.g. an OLE DB Connection to the source SQL Server table)
    SQLSourceType: Direct input
    SQLStatement: SELECT DISTINCT [Subject] FROM [TestDB].[dbo].[DynamicExcelSheetDemo]
    5. In the Result Set tab of this Execute SQL Task, map result “0” to variable “User::Subject”.
    6. In the Collection page of the Foreach Loop Container, set the Enumerator option to “Foreach ADO Enumerator”, and set the “ADO object source variable” to “User::Subject”.
    7. In the Variable Mapping page of the container, map variable “User::SheetName” to index “0”.
    8. Create an OLE DB Connection Manager to connect to the destination Excel file. Choose the provider as Native OLE DB\Microsoft Jet 4.0 OLE DB Provider, specify the fully qualified path of the Excel file (such as C:\Temp\Des.xls), and set the Extended Properties
    option of the Connection Manager to “Excel 8.0”. Click “Test Connection” button to make sure the connection is established successfully.
    9. Set the General page of the Execute SQL Task inside the container as follows:
    ResultSet: None
    ConnectionType: OLE DB
    Connection: Des (e.g. the OLE DB Connection to the destination Excel file we create above)
    SQLSourceType: Variable
    SQLStatement: User::WorkSheetQuery
    10. In the Data Flow Task, add an OLE DB Source component, set the connection manager to “LocalHost.TestDB”, set “Data access mode” to “SQL command”, and set the “SQL command text” to:
    SELECT * FROM [TestDB].[dbo].[DynamicExcelSheetDemo] WHERE [Subject]=?
    11. Click the “Parameters…” button, and map Parameter0 to variable “User::SheetName”.
    12. Add an Excel Destination component, setup an Excel Connection Manager to the destination Excel file, set the data access mode to “Table name or view name variable”, and select variable name as “User::SheetName”. In this way, the OLE DB Provider can get
    the Excel metadata and enable us to finish the column mappings correctly.
    13. Since the Microsoft Jet 4.0 has only 32-bit driver, please make sure to set the Run64BitRuntime property of the IS project to False.
    In addition, please note that there will be one useless worksheets “Excel Destination” in the Excel file. We can remove them manually or use a Script Task to delete this worksheet programmatically (need to install .NET Programmability Support feature during
    Office installing).
    Regards,
    Mike Yin
    TechNet Community Support

  • How to export the data to Multiple sheet in Excel

    Hi,
    How can I export the data to multiple sheets in excel using Crystal Report XI.
    Thanks,
    Baski.
    Edited by: J_Baskaar on Mar 31, 2010 8:14 AM

    One of the 3rd-party Crystal report schedulers listed at http://www.kenhamady.com/bookmarks.html allows you to burst a report so that each group at level 1 becomes a separate worksheet inside a single workbook.

  • Data download to multiple sheets in Excel without using OLE

    Hi,
    Please let me know if it is possible to download data to multiple sheets in excel without using OLE method
    I am in SRM system and the OLE methods are not working
    Please share some sample code or reference links if any
    Thanks
    SekharJ
    Edited by: SekharJ on Sep 8, 2009 8:43 AM

    Here is my code
      LOOP AT it_final INTO wa_final.
        AT FIRST.
          l_ixml = cl_ixml=>create( ).
          l_document = l_ixml->create_document( ).
          l_element_flights  = l_document->create_simple_element(
                      name = 'PO_Details'
                      parent = l_document ).
        ENDAT.
        l_element_airline  = l_document->create_simple_element(
                    name = 'PO'
                    parent = l_element_flights  ).
        l_value = wa_final-object_id.
        l_rc = l_element_airline->set_attribute( name = 'Objectid' value =
                                                             l_value ).
        l_value = wa_final-description.
        l_rc = l_element_airline->set_attribute( name = 'Description' value =
                                                             l_value ).
        l_value = wa_final-number_int.
        l_rc = l_element_airline->set_attribute( name = 'Item' value =
                                                             l_value ).
        l_value = wa_final-description1.
        l_rc = l_element_airline->set_attribute( name = 'Description1' value =
                                                             l_value ).
        l_value = wa_final-quantity.
        l_rc = l_element_airline->set_attribute( name = 'Quantity' value =
                                                             l_value ).
        l_value = wa_final-capex.
        l_rc = l_element_airline->set_attribute( name = 'Capex' value =
                                                             l_value ).
        l_value = wa_final-ser_num.
        l_rc = l_element_airline->set_attribute( name = 'SerialNo' value =
                                                             l_value ).
        l_value = wa_final-plant.
        l_rc = l_element_airline->set_attribute( name = 'Plant' value =
                                                             l_value ).
        l_value = wa_final-loc.
        l_rc = l_element_airline->set_attribute( name = 'Location' value =
                                                             l_value ).
        l_value = wa_final-bundle.
        l_rc = l_element_airline->set_attribute( name = 'Bundle' value =
                                                             l_value ).
      ENDLOOP.
      l_streamfactory = l_ixml->create_stream_factory( ).
      l_ostream = l_streamfactory->create_ostream_itable( table =
    l_xml_table ).
      l_renderer = l_ixml->create_renderer( ostream  = l_ostream
                                            document = l_document ).
      l_rc = l_renderer->render( ).
      l_xml_size = l_ostream->get_num_written_raw( ).
        CALL METHOD cl_gui_frontend_services=>gui_download
          EXPORTING
            bin_filesize = l_xml_size
            filename     = 'c:\temp\flights.xlsx'
            filetype     = 'BIN'
          CHANGING
            data_tab     = l_xml_table
          EXCEPTIONS
            OTHERS       = 24.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    Edited by: SekharJ on Sep 8, 2009 12:04 PM
    Edited by: SekharJ on Sep 8, 2009 12:15 PM

  • BAPI for automatic Pr creation witth multiple files from excel sheet

    I have written a programm  for automatic PR creation  with the help of bapi , where its picks data from excel sheet and makes PR .It is picking excel files from one folder(Files) for PR creation and moving to another folder(Files sucess).
    now the problem is if Folder (Files) contains one excel sheet ,PR is created fine , but if the Folder(Files) have multiple excel sheet ,its is creating 1st PR right, but next PR's contains all the line item of 1st PR , 2nd PR and so on .can anyone suggest me where is the problem in codes.
    types : begin of x_file ,
            key1(10),
            pur_grp(4),
            maktx(40),
            plant(4) ,
            req(10),
            s_qty(13),
            wbs(24),
            gl(10),
            trackno(10),
            supl(4),
            deladd(255).
    types : end of x_file .
      data : str5 type char10.
      data : mm type char2.
      data : yyyy type char4.
      data : dd type char2.
      data : str9 type char10.
      data : str6 type char10.
      data : month type char2.
      data : year type char4.
      year = sy-datum+0(4).
      month = sy-datum+4(2).
      dd = sy-datum+6(2).
      yyyy = sy-datum+0(4).
      mm = sy-datum+4(2).
      dd = sy-datum+6(2).
      clear str6 .
      clear str5.
      concatenate  dd'.' month '.' year into str5 .
      concatenate  yyyy mm dd into str6 .
    DATA : file type rlgrap-filename .
    data : it_file type table of x_file .
    data : wa_file type x_file .
    data : it_header type table of x_file .
    data : wa_header type x_file .
    *&  Internal Table For Define Row and Coloum Postion
    data: col_start type i value 1 ,
          row_start type i value 2,
          col_end type i value 256 ,
          row_end type i value 65000 .
    *&  Internal Table For Retrieve  Data From Excel
    *data: excel_bdcdata like kcde_cells occurs 0 with header line.
    *data: excel_bdcdata1 like kcde_cells occurs 0 with header line.
    data: excel_bdcdata like ALSMEX_TABLINE occurs 0 with header line.
    data: excel_bdcdata1 like ALSMEX_TABLINE occurs 0 with header line.
    data: it_index type i.
    DATA : IT_INDEX1 TYPE I.
    *&  Define Field Symbol
    field-symbols: <fs> .
    data :   bdcdata like bdcdata    occurs 0 with header line.
    data :   messtab like bdcmsgcoll occurs 0 with header line.
    data : req_items type table of bapiebanc .
    data : wa_req_items type bapiebanc .
    data : req_acc_asg type table of bapiebkn.
    data : wa_req_acc_asg type bapiebkn.
    DATA : RETURN LIKE BAPIRETURN OCCURS 0 WITH HEADER LINE .
    *data : return type table of     bapireturn.
    *data : wa_return type bapireturn .
    data : number type ebeln .
    *****************************MOVE FILES******************************
    data : xsource type string .
    data : xdestin type string .
    data : destin1 type string .
    data : destin2 type string .
    DATA : DEST1 TYPE STRING.
    DATA : DEST11 TYPE STRING.
    DATA : DEST2 TYPE STRING.
    DATA : DEST22 TYPE STRING.
    data : sou_dir_name like SALFILE-LONGNAME.
    data : tar_dir_name like SALFILE-LONGNAME.
    data : tar_dir_name1 like SALFILE-LONGNAME.
    data : sou_filename like EDI_PATH-PTHNAM .
    data : tar_filename like EDI_PATH-PTHNAM .
    data : filename1  type string .
    data : tar_filename1 like EDI_PATH-PTHNAM .
    data : file_itab like SALFLDIR occurs 0 with header line.
    data : wa_file_itab like SALFLDIR.
    data : file_count type i .
    data : dir_count type i.
    data : dir_table like sdokpath occurs 0 with header line.
    data : file_table like SDOKPATH occurs 0 with header line.
    data : wa_file_table like sdokpath.
    data : strr type string ,
           str1 type string ,
           str2 type string ,
           str3 type string .
    DATA : PA_VAL TYPE CHAR1.
    sou_dir_name = 'D:\barcodes\files\'.
    tar_dir_name = 'D:\barcodes\files-success\'.
        "success folder.
    CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
      EXPORTING
        DIRECTORY  = sou_dir_name
        FILTER     = '.'
      IMPORTING
        FILE_COUNT = file_count
        DIR_COUNT  = dir_count
      TABLES
        FILE_TABLE = file_table
        DIR_TABLE  = dir_table
      EXCEPTIONS
        CNTL_ERROR = 1
        OTHERS     = 2.
    IF SY-SUBRC <> 0.
    ENDIF.
    loop at file_table into wa_file_table.
    clear  :  strr , str1 , str2 , str3 .
      strr = wa_file_table-PATHNAME .
      concatenate sou_dir_name strr into str1 .
      concatenate tar_dir_name strr into str2 . " success
      concatenate tar_dir_name1 strr into str3 .         " failed
    FILE = STR1 .
    *start-of-selection.
    *&  Function For Retrieve Data From Excel
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        filename                      = FILE
        i_begin_col                   = col_start
        i_begin_row                   = row_start
        i_end_col                     = col_end
        i_end_row                     = row_end
      tables
        intern                        = excel_bdcdata
    EXCEPTIONS
       INCONSISTENT_PARAMETERS       = 1
       UPLOAD_OLE                    = 2
       OTHERS                        = 3.
      IF sy-subrc NE 0.
    WRITE : / 'File Error'.
    EXIT.
    ENDIF.
      loop at excel_bdcdata.
        translate excel_bdcdata to upper case .
        move excel_bdcdata-col to it_index.
        assign component it_index of  structure  wa_file to <fs> .
        move excel_bdcdata-value to <fs>.
        at end of row.
          append wa_file to it_file .
            clear wa_file.
        endat.
      endloop.
    sort it_file by key1. "pur_grp maktx plant  .
    it_header[] = it_file[].
    delete adjacent duplicates from it_header comparing key1 pur_grp maktx
    plant .
    data : h_item(5) type n .
    data : h_pack(10) type n .
    data : line_no(5) type n .
    data : ln_no(5) type n .
    loop at it_header into wa_header .
    ln_no = 1.
    h_item = h_item + 10.
    h_pack = h_pack + 1.
    wa_req_items-preq_item = h_item .
    wa_req_items-doc_type = 'BOM'.
    wa_req_items-pur_group = wa_header-pur_grp .
    wa_req_items-MATERIAL = wa_header-maktx .
    wa_req_items-plant = wa_header-plant .
    wa_req_items-pckg_no =  h_pack .
    wa_req_items-deliv_date = str6 .
    wa_req_items-item_cat = '0'.
    wa_req_items-acctasscat = 'P'.
    *wa_req_items-distrib = '2' .
    **wa_req_items-gr_ind = 'X'.
    wa_req_items-ir_ind = '2'.
    wa_req_items-purch_org = 'TISL' .
    wa_req_items-QUANTITY =  wa_header-s_qty.
    wa_req_items-PREQ_NAME =  wa_header-req.
    wa_req_items-SUPPL_PLNT = wa_header-supl.
    wa_req_items-trackingno = wa_header-trackno.
    append wa_req_items to req_items .
    clear wa_req_items.
    wa_req_acc_asg-preq_item = h_item .
    wa_req_acc_asg-g_l_acct = wa_file-gl .
    WA_req_acc_asg-wbs_elem  = wa_header-wbs .
    append wa_req_acc_asg to req_acc_asg .
    clear wa_req_acc_asg.
    h_pack = h_pack + 1  .
    endloop.
    clear ln_no .
    ***BREAK-POINT.
    *& BAPI FUNCTION
    call function 'BAPI_REQUISITION_CREATE'
    importing
       number                               = number
      tables
        requisition_items                   = req_items
       requisition_account_assignment       = req_acc_asg
       return                               = return .

    Can someone please give me sol........

  • Formula to calculate SUM of multiple sheets of excel and the result to be stored in another excel sheet and pop up alerts for multiple rows

    I have a excel with multiple
         sheets with data as shown below
    SHEET 1
    A 1
    B 2
    C 3
    SHEET 2
    B 1
    C 2
    A 3
    SHEET 3
    C 1
    A 2
    B 3
    My
    query is splitted into 3 categories
    I want to have a formula to do math calculation such that data of "A" of SHEET 1 is  calculated with "A" of SHEET2 irrespective of the location of "A".
    When I include SHEET3, the formula should automatically identify the location of "A" or "B" or "C" and give the result corresponding to A, B or C. Since I want to bifurcate daily report and output printed. I want to use another
    excel for output. How to link multiple sheets of one excel and print the output of above in
         another excel?
    Assume, I have 4 SHEETS,  "SHEET 1", "SHEET 2", "SHEET 3" and "SHEET 4". Math calculation need to be done using all 4 sheets. If
    I include "SHEET 5", the formula should ignore SHEET 1  automatically and give the results of SHEETS 2 to 5. Similarly, if I include SHEET 6, SHEET 1 and 2 need to be ignored for further calculation and SHEET 3-6 need to be used. How to write
    such formula?
    How to get pop up alert for multiple rows, if a specific condition is hit?

    Maybe VBA Code should be a good option for you. I suggest you post you issue to
    Excel for Developers forum.
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.
    Thanks for your understanding.
    Best Regards,
    Wind

  • Writing in to multiple sheets in Excel file based on input condition

    Hi All Experts,
    i need to write in to multiple sheets in one Excel file output.
    is it possible with UTL_FILE ? or Any options there in Oracle to do this ?
    Can anyone please suggest me on this.
    Thanks,
    Ravi

    I have seen all of them they are all just simple SQL pulls from database in to Excel file..No, definitely not
    My requirement is i need to write in to one single Excel file with MULTIPLE sheets based on input condition-> [xml_spreadsheet|http://matzberger.de/oracle/spreadsheet-en.html]
    so for each parameter need to write into separate sheet in one Excel File..-> [xml_spreadsheet|http://matzberger.de/oracle/spreadsheet-en.html]
    I hope you understand my problem atleast now...I think I understood your problem at first sight.
    If you simply want to throw 2 queries at the package and get back an Excel file with 2 worksheets you just have to look at the first page of the [tutorial |http://matzberger.de/oracle/spreadsheet-tut-en.html]. Half way down the page there's an example.
    If you want a special formatting then you can do this too, it's described step by step.
    Regards
    Marcus

  • How do I convert multiple sheets in excel into one pdf document?

    How do I convert multiple sheets (tabs) in excel to one combined pdf document?

    Hi Ptizer,
    If you have Acrobat PDFMaker  enable on Ms Excel. You can click on Create PDF.
    And choose settings as highlighted on screen shot it should do the job for you.
    Regards,
    Ajlan Huda.

  • Is it possible to paste multiple selections from excel?

    How do you detect in Java whether a multiple selection in excel has been copied to the clipboard.
    For instance: I have an excel spreadsheet - 3 rows x 3 columns. I highlight the first 3 rows in column 1 and the first 3 rows in column 3 then I copy this to the clipboard (ctrl-c). If I now go to a text editor and paste this then the data from all 3 columns, not the expected 2 columns, appears.
    Likewise, in Java I have tried using the clipboard object looking at all the different data flavours to find a way of detecting that only data from the 1st and the 3rd columns were copied. But I can't find a way.
    This is most likely a microsoft issue in that they never make this information available from the clipboard.
    Can anyone shed any light on this one?

    Use the setSelectionMode(ListSelectionModel.SINGLE_SELECTION ) for your JList / JTable.

  • Loading data from multiple tables to multiple sheets of excel using SSIS

    I have a requirement in which I want to load data from 13 tables to 13 respective sheets of single excel file using SSIS.
    Can anyone know SSIS logic for developing package for this?

    see similar example here
    http://visakhm.blogspot.in/2013/09/exporting-sqlserver-data-to-multiple.html
    In your case you need to use loop to iterate through tables
    First get list of tables in a object variable created in SSIS using INFORMATION_SCHEMA.TABLES view
    Then add a for each loop based on ADO.NET variable enumerator to iterate through tables and inside loop follow method as in the above link to create the sheet first and populate it.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How can I automate multiple Sheets from a single Sheet?

    I have a different kind of Resumé because of my job field.  Because of this the easiest way for me to build it was to use Numbers.  I have all of the information in there for the different aspects of my job.  Now, I need to take this information and only use part of it for seperate resumés but include crossing parts on multiple resumés.  So far, I have updated my "complete" resumé and then recreated each of the other ones by deleting the parts I don't want.  I was wondering if there is a way to automate this so that when I update my "complete" resumé it can add to the sections I need in the other ones.
    Based on what I know I figure there is a way to say on a new sheet to say copy these lines to these lines and then these lines to these lines.  That said, I can't just take the cells and recall information from specific cells in the other sheet as when I add a new line it will move everything and new reference cells would need to be added.
    Is what I am wanting possible?

    Hi Brett,
    Ian is thinking along the same lines that I started with—checkboxes to select the items to be included in the specific version of the resume. As you've noted, this Is labour intensive when reproducing a resume that has been printed before as the checkboxes need to be rechecked each time.
    A technique that may offer a way around this is to create an index (or tag) column containing codes marking each line that is to be included in specific résumés. Here's an example showing such a table, set up to display nine subsets of the complete list. (Ignore the contents of the columns other than the last column—it's just there to give an easy view of which rows have been displayed.)
    Ten codes are used: r0 is in all rows, so that code displays the complete résumé. Each of the other codes, r1, r2…r8, and r9, appear only in the rows needed for one specific subset of rows from the complete set.
    Complete set:
    Set r1:
    Set r3:
    Set r3 was selected and is shown with the Codes column hidden. Reorganize does not require that the column on which the table is filtered be visible.
    My original thought was to create a second, index column, using codes like these to create a dynamic index list, then using the index list to populate a second table for the 'partial' resume. The major difficulty I foresaw with that method arose from the variety of formats in your complete table. Formulas are great for transfering content, but less so for reformatting rows as a table is filled. Filtering the table hides some of the data,but does not ove any of it to a different row, so formatting of the individual rows should not be affected.
    Regards,
    Barry
    PS: You will probably want to use Fill down to repeat code values in a number of consecutive rows. If so, make sure that the string to be repeated ends in a letter not a numeral. Numbers will increment the value of a number ending a string when filled down, but will not change the value of a string that ends in a letter. The letter can be one that is not included in any of the codes.

  • Upload Specific Excel Sheet from excel file in sap internal table..

    I have an excel sheet and it contains many sheets.. I want to read a specific sheet no.. or that sheet would have sheet name.. i want to read that specific sheet and load its data in the internal table.

    Hello,
    In this case you need to create OLE object and then get specific workbook using it's method.
    For e.g.:
    CREATE OBJECT gh_excel 'EXCEL.APPLICATION'.  
    CALL METHOD OF gh_excel 'Workbooks'= gh_mapl.  
    You can search SAP help for more information on using OLE objects.
    Thanks,
    Augustin.

  • Multiple Paste from excel to table control

    Hi All,
    I need to provide a facility that will enable us to enter values on table control in a module pool by copy-pasting from an excel.
    The problem is that it is only pasting the number of rows that can be seen on the screen. While I need to paste 100 lines.
    I have set the 'Lines ' parameter as 100 and yet it is not working.
    Kindly suggest a way .
    regards,
    Inesha

    The solution is above.
    Try the method CLIPBOARD_IMPORT of class CL_GUI_FRONTEND_SERVICES.
    You can get all data in internal table and move all data into table control's internal table.

  • How to download multiple sheets in one excel workbook

    Hi All,
            I have requirement to download multiple sheets in excel workbook. I had
    successfully downloaded multiple sheets in excel. But it was downloaded only in
    my desktop. My requirement is user selects the path and i have to download the
    data in specified path.
    Could you please help me on this?
    Thanks in Advance,
    Basha Shaik

    >>My requirement is user selects the path and i have to download the
    data in specified path.
    For this..use CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
      EXPORTING
        WINDOW_TITLE         = TITLE
       DEFAULT_EXTENSION    =
       DEFAULT_FILE_NAME    =
       WITH_ENCODING        =
        FILE_FILTER          = '.|.'
       INITIAL_DIRECTORY    =
       PROMPT_ON_OVERWRITE  = 'X'
      CHANGING
        FILENAME             = W_FNAME
        PATH                 = W_FILEPATH
        FULLPATH             = W_FULLPATH
       USER_ACTION          =
       FILE_ENCODING        =
      EXCEPTIONS
        CNTL_ERROR           = 1
        ERROR_NO_GUI         = 2
        NOT_SUPPORTED_BY_GUI = 3
        others               = 4.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF NOT W_FULLPATH IS INITIAL.
      FILE_NAME = W_FULLPATH.
    ENDIF.
    regards,
    priya.

  • Problem printing from excel on HP photosmart C309a with windows 7 x64

    Hi,
    I have the following problem when printing certain sheets from excel or even print previewing them it comes up with an error stating it cannot print due to error with my hp photosmart c309a maybe due to lack of memory, too many open applications etc.
    however this doesnt effect other sheets made from same template, if i copy the data to a new sheet i can print it. however this error has effected old spreadsheets and newly created ones, only seems to effect excel and only on some sheets. On the sheets that wont print, if I change default printer to another it will preview and print but not to my c309a, this therefore must be some error with the driver for windows 7 as it worked fine before on my xp system with same spreadsheets. I have downloaded latest drivers with no luck, what else can I try, when will this error be fixed with a new updated driver?
    Thanks

    My HP 309C printer won't print Excel documents it says it is short on memory and to close other programs.
    Can I get some help with this as it is very frustrating I gave up a Cannon to change I thought for the better but this is not the case. thanks,....Les

Maybe you are looking for