No SmartView Bar on Excel started from DotNet Interop

If I start Ms-Excel Independantly on Windows OS, I can work fine with SmartView, But If I open Excel Window thru a C# Program using Interop-VBE, then the SmartView ToolBar/MenuTab is missing and cant work with SV and hence Smartview Macros donot run (Screenshots pasted)......Is there some patch available to override this issue .
Figures Attached
Fig. a Excel showing SmartView Bar
Fig. b Excel Started under DotNet InterOp. Doesnt initialise SmartView

Hi,
Probably below link might be useful. Where you can call a macro with the excel startup and load all the addins. If you need only SmartView to be initiazed then you might change the code to validate the addin name and just activate it. Am not good at Macro or VB .
http://stackoverflow.com/questions/213375/loading-addins-when-excel-is-instantiated-programmatically
Do let the forum know if this worked for you.
Thanks
Amith

Similar Messages

  • I can no longer open word or excel files from my email in firefox, i can in all other browsers. it started november 5, 2014

    Yesterday afternoon, out of the blue, I can no longer open word or excel documents from my gmail account in firefox browser on windows 7. I can in all other browsers. The error message is "There was a problem sending the command to the program"

    As a workaround, does it work to save the files first and then open them after saving?
    Sometimes when Firefox has problems handing off a download to another program it is caused by a corrupted settings file. That file is hard to edit, so usually we suggest renaming the file to see whether that resolves the issue. Here's how:
    Open your current Firefox settings (AKA Firefox profile) folder using either
    * "3-bar" menu button > "?" button > Troubleshooting Information
    * (menu bar) Help > Troubleshooting Information
    * type or paste about:support in the address bar and press Enter
    In the first table on the page, click the "Show Folder" button. This should launch a new window listing various files and folders.
    Leaving that window open, switch back to Firefox and Exit, either:
    * "3-bar" menu button > "power" button
    * (menu bar) File > Exit
    Pause while Firefox finishes its cleanup, then rename '''mimeTypes.rdf''' to something like mimeTypes.old
    Start Firefox back up again and test your Gmail attachments. Any improvement?
    Note: This resets some preferences to their defaults, such as which PDF viewer Firefox uses. If you need to update that again, please see this article: [[How to disable the built-in PDF viewer and use another viewer]].

  • How can I prevent all workbooks from opening automatically when Excel starts?

    I am using Office 2011 (14.2.1) service pack 2 on Mac os X 10.7.3. Whenever I open Excel, all my workbooks open.  How can I prevent all workbooks from opening automatically when Excel starts?
    Please Help, Thanks

    You can look at: Stop Autoplay: https://addons.mozilla.org/firefox/addon/1765

  • "my home page only start from the tabs bar I don't see the top of the homepage

    I have a problem loading my Home page I don't see the top of the home page as the home page only starts from the tab bar I don't see the backward and forward arrows or the menu please tell me how to reload FireFox so that the full home page loads.
    == This happened ==
    Every time Firefox opened
    == Home page only start from the tabs bar I want to see the top part of the home page

    Press ALT or F10 in your keyboard to make the Menu Bar temporarily visible. If you want it to be permanently visible, go into ''View > Toolbars > Menu Bar'', or right-click the Navigation Toolbar (the Reload button, for example) and select ''Menu Bar''.
    If this doesn't help, right-click the navigation toolbar, select ''Customize...'' and click ''Restore Default Set''. If it doesn't appear right away, try pressing ALT or F10. You can go into ''View > Toolbars > Menu Bar'' to make it permanently visible, or right-click the Navigation Toolbar and select ''Menu Bar''.
    If none of this helps, you may be having a problem with some Firefox add-on that is hindering your Firefox's normal behavior. Try disabling all add-ons (just to check), to see if Firefox goes back to normal.

  • Facing issues while creating excel plugins using dotnet

    Hi All,
    I am working on the design of a Project and Need help. Appreciate a quick Response.
    The requirement goes like this -
    We Need to create a custom menu in Excel, after clicking on this menu item, dotnet code will be invoked from where some data has to be retreived from a Client site using webservices. This data must be displayed in the Excel sheet.
    Question:
    I have been successfully able to create a custom menu but when I try to add an Event such that an Action happens when the user clicks on the menu item, it throws an error - "Cannot assign to 'MenuItem_Click' because it is a 'method group'"
    MenuItem_Click += new Microsoft.Office.Core._CommandBarButtonEvents_ClickEventHandler(MenuItem_Click);
    I have added the following methods -  
    private void MenuItem_Click(Office.CommandBarButton Ctrl, ref Boolean CancelDefault)
    MessageBox.Show(String.Format("You just clicked the button labeled '{0}. \n" + "The name of your workbook is '{1}'.", Ctrl.Caption, ThisWorkbook.name),
    "MenuItem_Click",MessageBoxButtons.OK,MessageBoxIcon.Information);
    private void ThisWorkbook_Startup(object sender, System.EventArgs e)
    InitMenuBarItems("&Custom Code");
    MenuItem = CreateButton((Office.CommandBarPopup)MenuBarItem, "Run Demo Code");
    MenuItem_Click += new Microsoft.Office.Core._CommandBarButtonEvents_ClickEventHandler(MenuItem_Click);
    Could anyone help me resolving this problem?
    Any help is highly appreciated.
    Thanks in advance.

    Hello,
    Starting from Excel 2007 the Fluent UI (aka Ribbon UI) is used. Command bars were deprecated, you need to use the new UI instead. See Ribbon Overview for more
    information.
    VSTO provides two main ways for customizing the ribbon UI:
    1. Walkthrough: Creating a Custom Tab by Using the Ribbon Designer
    2. Walkthrough: Creating a Custom Tab by Using Ribbon XML
    If you need to customize context menus, see Customizing
    Context Menus in Office 2010 .
    The Fluent UI is described in depth in the following series of articles in MSDN:
    1. Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
    2. Customizing the 2007 Office Fluent Ribbon for Developers
    (Part 2 of 3)
    3. Customizing the 2007 Office Fluent Ribbon for Developers
    (Part 3 of 3)

  • HT2488 How do I create a workflow in Automator or a script in AppleScripts to download an excel file from a specific webpage?

    I would like to create a workflow in Automator or a script in AppleScript (or a combination of the two), that opens Safari to a specified page and downloads an excel file from this page and saves the downloaded document to my desktop.
    Is this something that be done? If so, how?
    I have so far been able to build a workflow in Automator to open Safari and added an AppleScript that takes Safari to a specific page that has an Excel document.
    I can't figure out where to go from here... Any help would be apprecitated.
    Thanks!

    Would you have the web address the excel sheet is on?
    Is there a simular web page you could point to if not?
    Would there be a copy of the file on an FTP page.  This would be easier. 
    curl
    http://www.cyberciti.biz/faq/mac-os-x-terminal-download-file/
    http://www.thegeekstuff.com/2012/04/curl-examples/
    http://curl.haxx.se/docs/manpage.html
    Macintosh-HD -> Applications -> Utilities -> Terminal
    # Press return to run a command.
    the curl is a terminal command ( Unix ).  It allows you to read a file off of the web.
    man curl
    provides cryptic information on the commnad curl.
    press the space bar to advance  a page.
    press letter to q to quit.
    What you may have to is to read in the web page as a text file.  Go "fishing" through the page to find the excel file you need.  Once you find the file, you can use curl to read the file.
    curl is a very full featured command.  (read complex to figure out ).
    It is easier to diagnose problems with debug information. I suggest adding log statements to your script to see what is going on.  Here is an example.
        Author: rccharles
        For testing, run in the Script Editor.
          1) Click on the Event Log tab to see the output from the log statement
          2) Click on Run
        For running shell commands see:
        http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
    on run
        -- Write a message into the event log.
        log "  --- Starting on " & ((current date) as string) & " --- "
        --  debug lines
        set desktopPath to (path to desktop) as string
        log "desktopPath = " & desktopPath
        set unixDesktopPath to POSIX path of desktopPath
        log "unixDesktopPath = " & unixDesktopPath
        set quotedUnixDesktopPath to quoted form of unixDesktopPath
        log "quoted form is " & quotedUnixDesktopPath
        try
            set fromUnix to do shell script "ls -l  " & quotedUnixDesktopPath
            display dialog "ls -l of " & quotedUnixDesktopPath & return & fromUnix
        on error errMsg
            log "ls -l error..." & errMsg
        end try
    end run

  • Fetch excel file from app. server using open dataset...

    Hello Experts,
    Our functional consultant is asking me if it possible to get an excel file from the
    application server file using OPEN dataset and in background mode? If yes, Please tell me on how to do this.
    Thank you guys and take care!

    Hi Viraylab,
    to download this the procedure:
    you can use the FM 'EXCEL_OLE_STANDARD_DAT ' for this purpose.
    this FM 'EXCEL_OLE_STANDARD_DAT' can be used to start Excel with a new sheet and transfer data from an internal table to the sheet.
    Here are some of the parameters:
    file_name: Name and path of the Excel worksheet file e.g. ?C:TEMPZTEST?
    data_tab: Name of the internal table that should be uploaded to Exvcel
    fieldnames: Internal tabel with column headers
    How to build the field names table:
    data: begin of i_fieldnames occurs 20,
    field(60), end of i_fieldnames.
    i_fieldnames-field = ?This is column 1?. append i_fieldnames-field.
    i_fieldnames-field = ?This is column 2?. append i_fieldnames-field.
    to upload follow this:
    OPEN DATASET dsn FOR INPUT IN BINARY MODE.
    DO.
    READ DATASET dsn INTO itab-field.
    IF sy-subrc = 0.
    APPEND itab.
    ELSE.
    EXIT.
    ENDIF.
    ENDDO.
    [/code]Rob
    or Try this function module.
    FILE_READ_AND_CONVERT_SAP_DATA
    pass 'XLS' to I_FILEFORMAT..
    Dont forgot to Reward me points .....All the very best....
    Regards,
    Sreenivasa sarma K.

  • Downloading records in in excel sheet from ALV.

    Hi,
    I am downloading Records from ALV GRID DIsplay to Excel sheet but i am unable to get all records that are displayed in ALV report.
    I am getting only 73 records if i have only 180
    Any inputs please for correctine the error
    Regards
    Rasheed.

    hi
    you can follow these stapes and get ur work done
    go to List > select Export  > Spreadsheet or just click the excel icon from the tool bar.This would download the data to excel.
    hope this helps
    regards
    Aakash Banga

  • How To "Start From Scratch" and Build a Clean iTunes Library on a Portable USB External Drive?

    A while ago I posted about my confused (and confusing) mess of an iTunes:
    https://discussions.apple.com/message/16183210#16183210
    While dozens looked I guess eveyone agreed with me "what a mess" and moved on.
    So ... someone at the Apple Store suggested that what I should do is start from scratch. But I'm not sure if I understand all the steps.  He said I should:
    * create a folder of all my songs and just the song files not all the other iTunes stuff -- copy all the mp3 and m4a files that I have in Music > iTunes > iTunes Music > Music to a temp folder let's call it "all my music"
    * launch iTunes and tell it to move to / always look at / whatever the terms my new portable external USB drive
    * click on file / add to library and tell iTunes I want to add that "all my music" folder to iTunes
    At this point I don't care if we lose playlists, artwork, play counts and all that stuff.
    Does this approach make sense?
    Is there another way?
    So how do I tell iTunes to only look to the external?  How do I get rid of the old stuff I have on the internal that is offering duplicates and phantom entries?  Do I need to delete iTunes and then download a new copy?  Should I delete the iTunes foilder? ...?
    Any advice would be much appreciated.
    Many thanks!

    jayessemm wrote:
    So how do I tell iTunes to only look to the external?  How do I get rid of the old stuff I have on the internal that is offering duplicates and phantom entries?  Do I need to delete iTunes and then download a new copy?  Should I delete the iTunes foilder? ...?
    the simplest and working way.
    go to iTunes -> Preferences -> Advanced
    On there change the iTunes Media Folder location to your external hard drive
    Check that the rest of the preference pane looks similar to the following picture.
    After doing so, on menu bar go to File -> Library -> Organize Library
    This will force iTunes to copy all songs and playlist's to the new place and to build up a new database for the Library.
    Empty or corrupted files will left behind on the old location.
    After checking that all is on place and working at the new location, you may delete all files at the former location.
    Done
    Cheers - Lupunus

  • Opening Excel Files from DB (blob column)

    My project has implemented a WEBUTIL solution to attach files into the database, view the files stored in the database (in a BLOB column), and remove the files stored in the database.
    Everything has been running smoothly. We are in final testing and have found a couple of interesting scenarios ...
    When a user tries to view an Microsoft Excel 2007 file from our application, the Excel file displays properly (as long as Microsoft Excel isn't already open - outside of our Oracle application). Once the Excel file is viewed, the system will not allow the user back to our application until after the Excel file is closed (we use the start /wait myExcelFile.xls ... command). This works perfectly for us.
    The two scenarios we encounter occur when
    1.) The user has Microsoft Excel open outside of our application and tries to open an Excel file from within our application, or
    2.) The user has the file already open (either from within our application or outside of our application) and then tries to open the file from within our application.
    Let me explain a little further because the above two scenarios are interrelated.
    When a user has Microsoft Excel open (outside of our application), and then clicks the button to open the Excel file, the system will open the file as another window (within Excel). The system will allow the user to navigate back to our application (where as, if Excel is not open outside of our application, the system will not allow the user to navigate back to our application). Once the user navigates back to our application (while the file is still open), the user can click the button to view the file again. At this point, the user is displayed a WUT-105 error message (I assume b/c the system is trying to open a file that is already open).
    I assume the two solutions are the following:
    a.) Do not allow a user to open a file that is already open (not sure how to check this from within Forms ?)
    b.) Do not allow a user to open an Excel file when another EXCEL process is already running (this will avoid allowing the user to naviagate back to our application)
    I don't know if there is a better solution.
    Do you experts have any recommendations?
    We are using Oracle Application Server 10g R2 (10.1.2.0.2), Oracle Database 10g R2 (10.2), and Oracle Developer 10g (10.1.2.0.2)
    I hope this all makes sense.
    Thanks,
    Mike
    Edited by: user639843 on Oct 20, 2008 2:15 PM
    Edited by: user639843 on Oct 20, 2008 2:20 PM

    Thank you, Thank you, Thank you!!!!
    I believe that will work (adding a sequence number to the end of the filename)!
    We do not allow a user to update the file, only view. If a user wants to make a change, they need to remove the existing file (from the database), create a new file (outside of our application), and attach the file in our application (into the database). All updates occur outside of our application - we are not a document authoring system, just a document storage system.
    Once again, many thanks on the solution!
    Mike

  • Not all executables will start from spawned batch (Is this a WinNT bug?).

    I'm building a tool wherewith I can spawn a make process from my Visual Age for Java IDE.
    This I have working now. However not all executables seem to get started from the batch.
    Here are some of the from within the batch file started examples that work and won't work:
    echo MakeBridge V1.00
    echo Ensure that
    echo %1%2
    echo is a (sub) directory of
    echo %JAVA_DEV_ROOT%
    REM Usage: makeBridge <drive_letter> <working_directory> <make_command>
    REM Change drive
    %1 WORKS
    REM Change directory
    chdir %2 WORKS
    REM Execute make command
    echo ####%3#### WORKS
    clearmake -C gnu %3 %4 %5 %6 %7 %8 %9 WON'T WORK
    echo path=%PATH% WORKS
    pwd WORKS
    dir WORKS
    java -version WON'T WORK
    rem C:\APPL\_off97uk.32\Office\EXCEL.EXE WORKS
    echo Marcel Zeeuw WORKS
    The actual coding for the spawning is below:
    Process p = Runtime.getRuntime().exec(batch);
    // Pick up output stream from spawned process
    BufferedReader br = new BufferedReader(
    new InputStreamReader(p.getInputStream()));
    String line;
    while ((line = br.readLine()) != null)
    System.out.println(line);
    br.close();
    System.out.println(p.exitValue());
    Help would be appreciated
    Kind regards,
    Marcel Zeeuw.

    Explicit naming of a path in front of a non-starting application doesn't help - as expected.
    My conclusion is, that a process that is spawned by an application inherit some sort of limiting environment space. THis is because when I start my not working batch file from a command prompt, the batch file works as expected.
    I have no solution for this problem for now...

  • TS2570 Question re: "Start from your Mac OS X Install disc; use Disk Utility"

    I've worked my way through the step-by-step trouble shooting in the TS2570 article up to "Start from your Mac OS X Install disc; use Disk Utility". So far, every step results in the same outcome - my formerly trusty 2007 Intel duo core iMac (24") will not start up, freezing on a grey screen with a blinking question mark on a folder. I don't completely understand this next step. I have both a Leopard and a Snow Leopard disc. I'm not positive whether these were for the iMac, or my old Macbook Pro. I assume this makes a difference.

    Question (?) Mark, Blinking Folder, or Gray Screen at Startup
    These are related but not identical issues. Their causes are outlined in Intel-based Mac- Startup sequence and error codes, symbols. Solutions may be found in:
    A flashing question mark appears when you start your Mac
    A flashing question mark or globe appears when you start your Mac
    Mac OS X- Gray screen appears during startup
    In most cases the problems may be caused by one or more of these:
    a. Problem with the computer's PRAM - See Resetting your Mac's PRAM and NVRAM.
    b. Boot drive's directory has been corrupted - Repair with Disk Utility.
    c. Critical system files are damaged or deleted - Reinstall OS X.
    d. The disk drive is physically non-functional - Replace the hard drive.
    Note that the information I have provided is what Apple recommends, If other users suggest different solutions than found here, then be sure what they recommend does not impact on your warranty, if any, or ability to get continuing Apple service.
    Please don't start removing drives or changing cables unless you know what you are doing and have exhausted other non-invasive alternatives outlined here. If you perform any work yourself that is unapproved by Apple, then you will void any warranty you may have and lose all further Apple Support.
    Repair the Hard Drive and Permissions
    Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    The main difference if you are using Lion or Mountain Lion is that you must first boot from the Recovery HD. Simply boot from the Recovery HD to perform the above.
    Reinstall Snow Leopard Without Erasing The drive
    1. Repair the Hard Drive and Permissions
    Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    2. Reinstall Snow Leopard
    If the drive is OK then quit DU and return to the installer.  Proceed with reinstalling OS X.  Note that the Snow Leopard installer will not erase your drive or disturb your files.  After installing a fresh copy of OS X the installer will move your Home folder, third-party applications, support items, and network preferences into the newly installed system.
    Download and install Mac OS X 10.6.8 Update Combo v1.1.
    Reinstalling Lion/Mountain Lion Without Erasing The Drive
    Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu.
    Reinstall Lion/Mountain Lion: Select Reinstall Lion/Mountain Lion and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.

  • Unable to export report to excel file from SAP

      Hi all,
    I have a problem to download data from a report. The XL gets downloaded in a different format than my colleague.
    We are using the same XL version but two weeks back the SAP GUI 730 got reinstalled to my machine and since then the problem
    started.
    Can you please confirm is there is any particular user settings for this?
    I have login in any different working ( SAP Export ) machine with my login ID and Password and try to export the report to excel file from SAP, and I have same issue . Same we have requested another user to login in my machine with their ID and Password and check the same, They have tried and its working for then in my machine.
    see screenshots attached.
    Thanks.

    Execute report>
    Right click anywhere in the report output and select Spreadsheet.
    A pop up box will appear, select which export option you would like to use and click green check.
    NOTE: If you don't see this option then goto Settings>Switch List then try above said.
    Thanks,
    Kumar

  • Modify excel sheet from BDN/GOS and add to sales order

    Hello,
    Iu2019ve import a excel-template in OAOR (BDN) and now i want to modify the excel-sheet with my own data.
    After then I want to put it to a Sales Order (BUS2032).
    The excel sheet must indicated in the attachment list of VA02 (GOS).
    Which method I must use to copy a existing excel sheet from BDN?
    How can i modify my excel sheet from BDS and add to a existing sales order?
    Can I set the document write protected?
    Can anyone help me or have any examplesu2026
    Thanks in advance
    Edited by: Thomas Druetschel on Dec 2, 2008 3:20 PM

    Hello,
    now i can get a template from BDN and modify the excel sheet. But i want to modify the excel spreadsheet in BACKGROUND ==> have anybody a idea?
    And i need the correct method to save the modified document to BDS...
    Thanks
    i use the following code:
    TYPE-POOLS: sbdst.
    DATA go_control TYPE REF TO i_oi_container_control.
    DATA go_docking_container TYPE REF TO cl_gui_docking_container.
    DATA go_document_proxy TYPE REF TO i_oi_document_proxy.
    DATA go_excel_iface TYPE REF TO i_oi_spreadsheet.
    DATA go_error TYPE REF TO i_oi_error.
    DATA gc_exceltype TYPE soi_document_type VALUE soi_doctype_excel_sheet.
    DATA gv_retcode TYPE soi_ret_string.
    DATA gv_sheetname TYPE soi_string.
    DATA gv_inplace TYPE c.
    DATA: gv_value TYPE string.
    START-OF-SELECTION.
      PERFORM open_excel_doc_from_bds
                  USING
                      'BUS2032'
                      'BO'
                      '0010163117'
      PERFORM fill_cell
                  USING
                      'TEST123'
                      '1'
                      '2'.
    ==>> Now i want to SAVE the modified Excel Spreadshet to another Sales Order...
    *&      Form  init_excel_proxy
          text
         -->UV_INPLACE text
    FORM init_excel_proxy USING uv_inplace TYPE c.
      DATA lv_repid TYPE sy-repid.
      DATA lv_dynnr TYPE sy-dynnr.
      DATA lv_str   TYPE soi_string.
      lv_repid = sy-repid.
      lv_dynnr = sy-dynnr.
      CALL METHOD c_oi_container_control_creator=>get_container_control
        IMPORTING
          control = go_control
          error   = go_error.
      CREATE OBJECT go_docking_container
        EXPORTING
          repid     = lv_repid
          dynnr     = lv_dynnr
          side      = cl_gui_docking_container=>dock_at_bottom
          extension = 0.
    I don´t want to modify the document in the front*
      CALL METHOD go_control->init_control
        EXPORTING
          r3_application_name = ' '
          inplace_enabled     = uv_inplace
          parent              = go_docking_container
        IMPORTING
          error               = go_error.
      CALL METHOD go_control->get_document_proxy
        EXPORTING
          document_type  = gc_exceltype
        IMPORTING
          document_proxy = go_document_proxy.
    ENDFORM.                    " init_excel_iface
    *&      Form  open_excel_doc_from_bds
          text
         -->UV_CLASSNAME  text
         -->UV_CLASSTYPE  text
         -->UV_OBJECTKEY  text
         -->UV_INPLACE    text
    FORM open_excel_doc_from_bds USING uv_classname TYPE sbdst_classname
                                       uv_classtype TYPE sbdst_classtype
                                       uv_objectkey TYPE sbdst_object_key
                                       uv_inplace TYPE c.
      DATA lt_doc_uris TYPE sbdst_uri.
      DATA ls_doc_uri LIKE LINE OF lt_doc_uris.
      DATA lt_doc_signature TYPE sbdst_signature.
      DATA lv_doc_url TYPE bapiuri-uri.
      DATA lv_repid TYPE sy-repid.
      DATA lv_dynnr TYPE sy-dynnr.
      IF go_document_proxy IS INITIAL.
        PERFORM init_excel_proxy USING uv_inplace.
      ENDIF.
      CHECK NOT go_document_proxy IS INITIAL.
      CALL METHOD cl_bds_document_set=>get_with_url
        EXPORTING
          classname       = uv_classname
          classtype       = uv_classtype
          object_key      = uv_objectkey
        CHANGING
          uris            = lt_doc_uris[]
          signature       = lt_doc_signature[]
        EXCEPTIONS
          nothing_found   = 1
          error_kpro      = 2
          internal_error  = 3
          parameter_error = 4
          not_authorized  = 5
          not_allowed     = 6.
      IF sy-subrc NE 0 .
        MESSAGE 'cl_bds_document_set=>get_with_url error' TYPE 'I'.
        EXIT.
      ENDIF.
      READ TABLE lt_doc_uris INTO ls_doc_uri INDEX 1.
      lv_doc_url = ls_doc_uri-uri.
      CALL METHOD go_document_proxy->open_document
        EXPORTING
          document_url  = lv_doc_url
          open_inplace  = uv_inplace
          open_readonly = ''
        IMPORTING
          error         = go_error.
      IF NOT go_excel_iface IS INITIAL.
        FREE go_excel_iface.
      ENDIF.
      CALL METHOD go_document_proxy->get_spreadsheet_interface
        EXPORTING
          no_flush        = 'X'
        IMPORTING
          sheet_interface = go_excel_iface
          error           = go_error.
    ENDFORM.                    "open_excel_doc_from_bds
    *&      Form  fill_cell
          text
         -->UV_VALUE   text
         -->UV_COLUMN  text
         -->UV_ROW     text
    FORM fill_cell USING uv_value TYPE string
                         uv_column TYPE i
                         uv_row TYPE i.
      CHECK NOT go_document_proxy IS INITIAL.
      CHECK NOT go_excel_iface IS INITIAL.
      DATA: lt_ranges TYPE soi_range_list,
            lt_contents TYPE soi_generic_table,
            ls_contents LIKE LINE OF lt_contents[],
            lt_rangesdef TYPE soi_dimension_table,
            ls_rangesdef LIKE LINE OF lt_rangesdef.
      ls_rangesdef-row = uv_row.
      ls_rangesdef-column = uv_column.
      ls_rangesdef-rows = 1.
      ls_rangesdef-columns = 1.
      APPEND ls_rangesdef TO lt_rangesdef.
      ls_contents-row = 1.
      ls_contents-column = 1.
      ls_contents-value = uv_value.
      APPEND ls_contents TO lt_contents.
      CALL METHOD go_excel_iface->set_ranges_data
        EXPORTING
          ranges    = lt_ranges[]
          contents  = lt_contents[]
          rangesdef = lt_rangesdef[]
          no_flush  = 'X'
        IMPORTING
          error     = go_error.
    ENDFORM.                    "fill_cell
    *&      Form  get_cell
          text
         -->UV_COLUMN  text
         -->UV_ROW     text
         -->CV_VALUE   text
    FORM get_cell USING  uv_column TYPE i
                         uv_row TYPE i
                  CHANGING cv_value.
      DATA: lt_ranges TYPE soi_range_list,
          lt_contents TYPE soi_generic_table,
          ls_contents LIKE LINE OF lt_contents[],
          lt_rangesdef TYPE soi_dimension_table,
          ls_rangesdef LIKE LINE OF lt_rangesdef.
      ls_rangesdef-row = uv_row.
      ls_rangesdef-column = uv_column .
      ls_rangesdef-rows = 1.
      ls_rangesdef-columns = 1.
      APPEND ls_rangesdef TO lt_rangesdef.
      CALL METHOD go_excel_iface->get_ranges_data
        EXPORTING
          rangesdef = lt_rangesdef[]
        IMPORTING
          contents  = lt_contents[]
          error     = go_error
        CHANGING
          ranges    = lt_ranges[].
      cv_value = space.
      READ TABLE lt_contents INTO ls_contents INDEX 1.
      IF sy-subrc = 0.
        cv_value = ls_contents-value.
      ENDIF.
    ENDFORM.                    "get_cell
    *&      Form  insert_table
          text
         -->COLUMN     text
         -->ROW        text
         -->CT_DATA    text
         -->ANY        text
    FORM insert_table USING column TYPE i
                            row TYPE i
                      CHANGING ct_data TYPE table any.
      CHECK NOT go_document_proxy IS INITIAL.
      CHECK NOT go_excel_iface IS INITIAL.
      CALL METHOD go_excel_iface->insert_range_dim
        EXPORTING
          name     = 'Table'
          top      = row
          left     = column
          rows     = 1
          columns  = 1
          no_flush = 'X'
        IMPORTING
          error    = go_error.
      DATA: lt_fields_table TYPE soi_fields_table.
      CALL FUNCTION 'DP_GET_FIELDS_FROM_TABLE'
        TABLES
          data   = ct_data[]
          fields = lt_fields_table.
      go_excel_iface->insert_one_table(
        EXPORTING
          data_table   = ct_data[]
          fields_table = lt_fields_table[]
          rangename    = 'Table'
          no_flush     = 'X'
          wholetable   = 'X'
        IMPORTING
          error        = go_error
    ENDFORM.                    "insert_table=

  • Leading spaces in excel file from ALV

    Hi Guys,
    once I export a record from ALV to excel. Some values I think all values that are TYPE I. How can I remove this leading spaces.
    Ex: '                                                      100'
    something like that.. so if you dont expand the column with you wont see the value 100. I checked the internal table being passed to ALV. It doesnt have leading spaces also in the ALV display. there is no leading spaces. Is there something to to with column width optimization? I need this to optimize the column headers. Thanks in Advance!
    Regards,
    Michael Nacionales

    There is one table CRVS_B with field SFHNR, while creating PRTS I need this field, so I do like this:
    select max( SFHNR ) into l_sfhnr
    from CRVS_B.
    add var to l_sfhnr.
    So for example l_sfhnr is equal to 000000000000000010, then after add, it gives me 11, and surprisingly in database 11 is placing position in such a way that last char is empty so it is not 11 but 00000000000000011 ( 17 chars ) as after 11 one empty space, and when it comes next time:
    select max( SFHNR ) into l_sfhnr
    from CRVS_B.
    add var to l_sfhnr.
    the value of l_sfhnr is still 000000000000000010......
    else try this
    Hi
    Field_catalog:
    Field catalog with field descriptions
    2.7.1. Description
    Field catalog containing descriptions of the list output fields (usually a subset of the internal output table fields). A field catalog is required for every ALV list output.
    The field catalog for the output table is built-up in the caller's coding. The build-up can be completely or partially automated by calling the REUSE_ALV_FIELDCATALOG_MERGE module
    See also the documentation of the function module REUSE_ALV_FIELDCATALOG_MERGE.
    The minimal field catalog is documented under 'default'. The caller can use the other optional parameters to assign output attributes to a field which differ from the default.
    A field catalog need not be built-up and passed explicitly only under the following conditions:
    • The internal table to be output has the same structure as a Data Dictionary structure which is referred to in the internal table declaration using LIKE or INCLUDE STRUCTURE.
    • all fields in this structure are to be output
    • the structure name is passed to ALV in the parameter I_STRUCTURE_NAME.
    See also the documentation of the IMPORTING paramter I_STRUCTURE_NAME.
    Positioning
    • row_pos (row position)
    value set: 0, 1 - 3
    Only relevant if the list output is to be multi-line (two or three lines) by default.
    A multi-line list can also be defined by the user interactively if the default list is one-line.
    The parameter specifies the relative output line of the column in a multi-line list.
    • col_pos (column position)
    value set: 0, 1 - 60
    only relevant when the default relative column positions differ from the field catalog field sequence. The parameter specifies the relative column position of the field in the list output. The column order can be changed interactively by the user. If this parameter is initial for all field catalog entries, columns appear in the field catalog field sequence.
    Identification
    • fieldname (field name)
    value set: internal output table field name (required parameter)
    Name of the internal output table field which is described by this field catalog entry
    • tabname (internal output table)
    value set: SPACE, internal output table name
    This parameter is used in 'manual' field catalog build-up only for hierarchical-sequential lists.
    Name of the internal output table which contains the field FIELDCAT-FIELDNAME.
    Data Dictionary reference
    • ref_fieldname (reference field name)
    value set: SPACE, Data Dictionary field name
    Name of the Data Dictionary field referred to.
    This parameter is only used when the internal output table field described by the current field catalog entry has a reference to the Data Dictionary (not a program field), and the field name in the internal output table is different from the name of the field in the Data Dictionary. If the field names are identical, naming the Data Dictionary structure or table in the FIELDCAT-REF_TABNAME parameter is sufficient.
    • ref_tabname (reference table/structure field name)
    value set: SPACE, name of a Data Dictionary structure or table
    Structure or table name of the referred Data Dictionary field.
    This parameter is only used when the internal output table field described by the current field catalog entry has a Data Dictionary reference (not a program field).
    Reference to fields with currency/measurement unit
    Each internal output table sum or quantity field whose decimal places are to be formatted appropriately for the unit in the list must follow the convention:
    • the field is of data type QUAN or CURR (internal type P) (the field must really have this physical data type. Overwriting the physical data type with the parameter FIELDCAT-DATATYPE has no effect)
    • There is a field in the internal output table which contains the associated unit.
    • There is also an entry in the field catalog for the unit field.
    (If the unit is not to appear as a column in the list, and cannot be interactively displayed as a column, e.g. because it is always unambiguous and is therefore explicitly output by the caller in the list header, the field catalog units field entry can take the parameter FIELDCAT-TECH = 'X'.
    The association of a value field to a unit affects the output as follows:
    • appropriate decimal places display for the unit
    • an initialized field with a link to a non-initial unit is output as '0' for the unit (if FIELDCAT-NO_ZERO is initial). When this field is summed, this unit affects whether the units are homogeneous.
    • an initialized field with a link to an initial unit is output as SPACE. When this field is summed, the unit SPACE does not affect the homogeneity of the units.
    • When non-initial fields with an initial unit are summed, the unit SPACE is considered to be a unit.
    Link to currency unit
    • cfieldname (currency unit field name)
    value set: SPACE, output table field name
    Only relevant for amount columns with associated unit.
    Name of the internal output table field containing the currency unit associated with the amount field FIELDCAT-FIELDNAME. The field in FIELDCAT-CFIELDNAME must have its own field catalog entry.
    • ctabname (internal currency unit field output table)
    value set: SPACE, output table field name
    only relevant for hierarchical-sequential lists
    Name of the internal output table containing the FIELDCAT-CFIELDNAME field.
    Link to measurement unit
    • qfieldname (measurement unit field name)
    value set: SPACE, output table field name
    only relevant for quantity columns with unit link.
    Name of the internal output table field containing the measurement unit associated with the quantity field FIELDCAT-FIELDNAME.
    The field in FIELDCAT-QFIELDNAME must have its own field catalog entry.
    • qtabname (internal measurement unit field output table)
    value set: SPACE, output table field name
    only relevant for hierarchical-sequential lists
    Name of the internal output table containing the FIELDCAT-QFIELDNAME field.
    Column output options
    • outputlen (column width)
    value set: 0 (initial), n
    For fields with a Data Dictionary link this parameter can be left initial.
    For fields without a Data Dictionary link (program field) the parameter must be given the value of the desired field list output length (column width).
    initial = column width is the output length of the referred Data Dictionary field (domain).
    n = column width is n characters
    • key (key column)
    value set: SPACE, 'X' 'X' = kex field (key field output in color)
    Key fields can not be interactively hidden. Parameter FIELDCAT-NO_OUT must be left initial.
    For exceptions see the documentation of the FIELDCAT-KEY_SEL parameter.
    • key_sel (hideable key column)
    value set: SPACE, 'X'
    only relevant when FIELDCAT-KEY = 'X'
    Key field which can be hidden interactively.
    The key column sequence cannot be changed interactively by the user.
    The output is controlled by the FIELDCAT-NO_OUT parameter analogously to non-key fields.
    • no_out (field in field list)
    value set: SPACE, 'X' 'X' = field is not displayed in the current list.
    The user can interactively choose the field for output from the field list.
    The user can display the contents of these fields at line level using the 'Detail' function.
    See also the 'Detail screen' documentation of the parameter IS_LAYOUT.
    • tech (technical field)
    value set: SPACE, 'X' 'X' = technical field
    Field cannot be output in the list and cannot be displayed interactively.
    Field can only be used in the field catalog (not in IT_SORT, ...).
    • emphasize (highlight columns in color)
    value set: SPACE, 'X' or 'Cxyz' (x:'1'-'9'; y,z: '0'=off '1'=on)
    'X' = column is colored with the default column highlight color.
    'Cxyz' = column is colored with a coded color:
    • C: Color (coding must begin with C)
    • x: color number
    • y: bold
    • z: inverse
    • hotspot (column as hotspot)
    value set: SPACE, 'X'
    'X' = column cells are output as hotspots
    • fix_column (fix column)
    value set: SPACE, 'X'
    Not relevant for block lists (output of several lists consecutively)
    'X' = column fixed (does not scroll horizontally)
    All columns to be fixed must have this flag, starting from the left. If a column without this flag is output, only the columns to the left of this column are fixed. The user can change the column fixing interactively. See also the documentation of the Layout parameter
    IS_LAYOUT-NO_KEYFIX of the IMPORTING paramter IS_LAYOUT.
    • do_sum (sum over column)
    value set: SPACE, 'X' 'X' = a sum is to be calculated over this internal output table field.
    This function can also be called by the user interactively.
    • no_sum (sums forbidden)
    value set: SPACE, 'X' 'X' = no sum can be calculated over this field, although the data type of the field would allow summing.
    • input (column ready for input)
    Function not available
    Format column contents
    • icon
    value set: SPACE, 'X' 'X' = column contents to be output as an icon.
    The caller must consider the printability of icons.
    • symbol
    value set: SPACE, 'X' 'X' = column contents are to be output as a symbol.
    The internal output table column must be a valid symbol character.
    The caller must consider the printability of symbols.
    Symbols can usually be printed, but may not always be output correctly, depending on the printer configuration.
    • just (justification)
    value set: SPACE, 'R', 'L', 'C'
    Only relevant for fields of data type CHAR or NUMC
    ' ' = default justification for this data type
    'R' = right-justified output
    'L' = left-justified output
    'C' = centered output
    The justification of the column header always follows the justification of the columns. Independent justification of the column neader is not possible.
    • lzero (leading zeros)
    value set: SPACE, 'X'
    Only relevant for fields of data type NUMC
    ALV outputs NUMC fields right-justified without leading zeros by default.
    'X' = output with leading zeros
    Note: If a NUMC field is output left-justified or centered by FIELDCAT-JUST, leading zeros are output. If the output of leading zeros is suppressed by a Data Dictionary reference ALPHA conversion exit, the output is always left-justified.
    • no_sign (no +/- sign) Only relevant for value fields
    value set: SPACE, 'X' 'X' = value output without +/ sign
    • no_zero (suppress zeros) Only relevant for value fields
    value set: SPACE, 'X' 'X' = suppress zeros
    • edit_mask (field formatting)
    value set: SPACE, template
    template = see documentation of WRITE formatting option USING EDIT MASK template
    The output conversion conv can be made by template = '== conv'.
    Texts
    The following text parameters should be specified for program fields without a Data Dictionary reference. The texts are taken from the Data Dictionary for fields with a Data Dictionary reference. If this is not desired, the text parameters can also be specified. The Data Dictionary texts are then ignored. If the user changes the column width interactively, the column header text with the appropriate length is always used. The interactive function 'Optimize column width' takes account of both the field contents and the column headers: if all field contents are shorter than the shortest column header, the column width depends on the column header.
    The 'long field label' is also used in display variant definition, sort, etc. popups.
    • seltext_l (long field label)
    • seltext_m (medium field label)
    • seltext_s (short field label)
    • reptext_ddic (header)
    analogous to the Data element maintenance 'Header'
    The specified text is not necessarily output in the list, an optimum among all texts is sought.
    • ddictxt (specify text)
    value set: SPACE, 'L', 'M', 'S'
    You can specify with values 'L', 'M', and 'S', the keyword that should always be used as column header. If the column width changes, no attempt is made in this case to find an appropriate header for the new output width.
    Parameters for program fields without Data Dictionary reference
    see also 'Text' parameters
    • datatype (data type)
    value set: SPACE, Data Dictionary data type (CHAR, NUMC,...)
    Only relevant for fields without Data Dictionary reference
    Program field data type
    • ddic_outputlen (external output length)
    value set: 0 (initial), n
    Only relevant for fields without Data Dictionary reference whose output is nevertheless to be modified by a conversion exit.
    Prerequisites:
    • FIELDCAT-EDIT_MASK = '==conv'
    see also the documentation of the parameter FIELDCAT-EDIT_MASK
    • FIELDCAT-INTLEN = n
    see also the documentation of the parameter FIELDCAT-INTLEN
    n = external format field output length
    The column width FIELDCAT-OUTPUTLEN need not be the same as the external format output length (FIELDCAT-DDIC_OUTPUTLEN).
    • intlen (internal output length)
    value set: 0 (initial), n
    Only relevant for fields without Data Dictionary reference whose output is nevertheless to be modified by a conversion exit.
    Prerequisites:
    • FIELDCAT-EDIT_MASK = '==conv'
    see also the documentation of the parameter FIELDCAT-EDIT_MASK
    • FIELDCAT-DDIC_OUTPUTLEN = n
    see also the documentation of the parameter FIELDCAT-DDIC_OUTPUTLEN
    n = internal format field output length
    • rollname (data element)
    value set: SPACE, Data Dictionary data element name
    F1 help can be provided for a program field without a Data Dictionary reference, or F1 help which differs from the Data Dictionary help can be provided for a field with a Data Dictionary reference, using this parameter.
    When F1 help is called for this field, the documentation of the specified data element is displayed.
    If the FIELDCAT-ROLLNAME is initial for fields with a Data Dictionary reference, the documentation of the data element of the referred Data Dictionary field is output.
    Others
    • sp_group (field group key)
    value set: SPACE, CHAR(1)
    Field group key.
    Keys are assigned to group names in the IT_SPECIAL_GROUPS parameter (see also the documentation of the parameter IT_SPECIAL_GROUPS).
    When such an assignment is made in the field catalog and in IT_SPECIAL_GROUPS, the fields are grouped correspondingly in the display variant popup.
    • reprep (Report/Report interface selection criterion)
    value set: SPACE, 'X'
    Prerequisites:
    • The system contains the Report/Report interface (function group RSTI, table TRSTI)
    • Parameter LAYOUT-REPREP = 'X'
    (see also the documentation of the parameter LAYOUT-REPREP of the IMPORTING parameter IS_LAYOUT )
    'X' = When the Report/Report interface is called, the value of this field is passed in the selected interface start record as a selection criterion.
    2.7.2. Default
    • The following entries are usually sufficient for internal table fields with a reference to a field defined in the Data Dictionary :
    • fieldname
    • ref_tabname
    Notes:
    ALV gets the remaining information from the Data Dictionary.
    If no relative column position (COL_POS) is specified, the fields are output in the list in the order in which they were added to the field catalog.
    REF_FIELDNAME need only be specifid when the name of the internal table field differs from the name of the referred Data Dictionary field.
    Information which is explicitly entered in the field catalog is not overwritten by information from the Data Dictionary.
    Priority rule:
    Entries in the field catalog have priority over differing entries in the Data Dictionary.
    • The following entries are usually sufficient for internal table fields without a reference to the Data Dictionary (program fields):
    • fieldname
    • outputlen
    • datatype
    • seltext_s
    • seltext_m
    • seltext_l
    Notes:
    F1 help can be provided for program fields by assigning a data element to the parameter ROLLNAME.
    If the parameters SELTEXT_S, SELTEXT_M, SELTEXT_L, and REPTEXT_DDIC contain appropriate field labels, the program field column headers are also adjusted appropriately when the column width changes.
    B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
    The Important Parameters are :
    I. Export :
    i. I_program_name : report id
    ii. I_internal_tabname : the internal output table
    iii. I_inclname : include or the report name where all the dynamic forms are handled.
    II Changing
    ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is
    declared in the type pool SLIS.
    Reward points if useful
    Regards
    Anji
    Vijayendra Rao  
    Posts: 1,699
    Questions: 28
    Registered: 9/14/04
    Forum points: 3,018 
      Re: ALV  
    Posted: May 14, 2007 8:29 PM    in response to: kotireddy       Reply 
    Hi,
    Field catalog defines the attributes and specifies the technical details of the columns displayed in an ALV output.
    You can check the following thread to see how to build a field catalog and how to work with ALV.
    Message was edited by:
            Karthikeyan Pandurangan

Maybe you are looking for