Excel macro issue

I have an employee that uses the add-in and works with macros a lot in Excel. Occassionally, we he opens an Excel macro, it causes the Essbase toolbar to stop working. The dropdown essbase menu works, but the toolbar does not. He has to go through our service desk to get this resolved. Anyone know what causes this to happen?

I would imagine that this is an intermittent problem or does it relate to a specific macro in a specific Excel worksheet ? Problem should go away with a reboot, another question would be why you are suporting freeware ? It should always come with a warning that it is freeware and outwith any company support policy. In most organisations the behaviour of user created macros is something that an IT support function will not go anywhere near.

Similar Messages

  • Running Excel macros from ABAP

    Hello everyone,
    I am trying to execute an Excel macro from an ABAP program.  We are currently on a 46C system.  While doing some research on help.sap.com I came across the method execute_macro in class i_oi_document_proxy.  I’ve never used methods in ABAP before and I’m not really sure what I’m doing.  Has anyone got this to work?  When I try to run the program it dumps with error OBJECTS_OBJREF_NOT_ASSIGNED.
    Thanks,
    Becky
    Here is the program:
    REPORT ztest_program.
    INCLUDE ole2incl.
    DATA gs_excel TYPE ole2_object .
    DATA gs_wbooks TYPE ole2_object .
    DATA gs_wbook TYPE ole2_object .
    DATA gs_application TYPE ole2_object .
    DATA: h_sheet TYPE ole2_object.
    DATA: document TYPE REF TO i_oi_document_proxy.
    *Name of the macro in Excel
    DATA: macro_string(50) TYPE c
                     VALUE 'FB03process.FromTheBeginning',
          no_flush TYPE c,
          param_count TYPE i VALUE 0,
          script_name TYPE c VALUE 'X',
          error TYPE REF TO i_oi_error
                OCCURS 0 WITH HEADER LINE,
          retcode TYPE soi_ret_string,
          error_string(50) TYPE c,
          retvalue(30) TYPE c.
    CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
       EXPORTING
             text       = text-007
         EXCEPTIONS
              OTHERS     = 1.
    CREATE OBJECT gs_excel 'EXCEL.APPLICATION' .
    SET PROPERTY OF gs_excel 'Visible' = 1 .
    GET PROPERTY OF gs_excel 'Workbooks' = gs_wbooks .
    GET PROPERTY OF gs_wbooks 'Application' = gs_application .
    *--Opening the existing document
    CALL METHOD OF gs_wbooks 'Open' = gs_wbook
         EXPORTING #1 = 'D:\temp\FB03process.xls' .
    tell user what is going on
    CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
       EXPORTING
              PERCENTAGE = 0
             text       = text-009
         EXCEPTIONS
              OTHERS     = 1.
    GET PROPERTY OF gs_excel 'ACTIVESHEET' = h_sheet.
    CALL METHOD document->execute_macro
         EXPORTING macro_string  = macro_string
                   param_count   = param_count
                   script_name   = script_name
                   no_flush      = no_flush
         IMPORTING error         = error
                   retcode       = retcode
         CHANGING  error_string  = error_string
                   retvalue      = retvalue.
    disconnect from Excel
    FREE OBJECT gs_excel.
    PERFORM err_hdl.
    FORM err_hdl.
      IF sy-subrc <> 0.
        WRITE: / 'Fehler bei OLE-Automation:'(010), sy-subrc.
        STOP.
      ENDIF.
    ENDFORM.                    " ERR_HDL

    Hi,
    Please correct me if I am wrong but it seems that you have not fetched a handle to the document object before issuing the statement CALL METHOD document->execute_macro. Hence the error OBJECTS_OBJREF_NOT_ASSIGNED is being dislayed. If you want to use SAP Desktop Office Integration using ABAP Objects, take a look at this article at http://www.intelligenterp.com/feature/archive/ or http://www.sapinfo.net/public/en/index.php4/article/comvArticle-193333c63b4bd807d2/en/articleStatistic
    Hope this helps.
    Regards
    Message was edited by: Shehryar Khan

  • Custom Excel macros can't be accessed by new admin user, only original developer

    Excel macros created several years ago using NI Measure are not accessible to users other than the original developer.  We are using Win 2000 OS, NI Measure version 1.2 upgraded from version 1.0, and Microsoft Office Excel 2003 SP1.  Even if the user has the same admin rights as the original developer of the macro, they cannot access it.  The macro is accessible and works fine when the original developer logs into the win 2000 pc with his login name and password.  Has anyone else had this problem?  Does anyone know how we can resolve this issue?
    Thanks,
    Alex H.

    Alex,
    The first thing to try would be to install the patch for Measure (Measure Patch 1.2c) if you haven't already.  Do you have this same issue when trying to access Macros not created by Measure?  Unfortunately, the best I could find on Macro and Measure issues were the following KBs. 
    General Measure Support KB
    Macro and Measure Support KB
    Hope this helps!
    Andy F.
    National Instruments

  • Excel Macro

    Dear Gurus,
    I want to download some SAP reports through excel macros, how to do that. Give me some tips to create macros (commands) in excel
    Regards
    Saad Nisar.

    Hi Sir,
    I'm glad to hear that you have got the advice here, and if you have further question about VBA, please post it to the MSDN forum for Excel
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
    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. Thank you for your understanding.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Export to excel - Formatting issue - OBIEE 11.1.1.5

    Hi All,
    When an analysis is exported to Excel, some of the values are showing some strange behaviour i.e. some values are multiplied by some huge number as you can see in the excel screenshot below.
    BI Analysis Screenshot:
    http://i44.tinypic.com/331eopf.jpg
    Excel Screenshot:
    http://i44.tinypic.com/34snqko.jpg
    Is this BI issue or an Excel setup issue? And how to fix it?
    Thanks in advance.

    Hi,
    We too faced the similar issue.
    We tried ROUND function and it was coming with proper formatting.
    Try and let me know further.
    Regards,
    MuRam
    NOTE: Please mention if this resolved your problem/still facing and close the thread to assist others with similar problems.

  • How to call excel macros programmatically in C#?

    Hi,
    I have a requirement where i need to call excel (2003) macros in C# program. Can anyone help me with a code snippet to do the same?
    The excel macro function takes two input parameters? how can the parameters be passed?
    Any code snippet to do the same in C# would be helpful.
    Thanks.

    Hey there, Sid.  I am tryin gto run your code, but I couldn't even gte it to fire.  Here's what I ahve now:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using Excel = Microsoft.Office.Interop.Excel;
    namespace WindowsFormsApplication2
        public partial class Form1 : Form
            private void button1_Click(object sender, EventArgs e)
                //~~> Define your Excel Objects
                Excel.Application xlApp = new Excel.Application();
                Excel.Workbook xlWorkBook;
                //~~> Start Excel and open the workbook.
                xlWorkBook = xlApp.Workbooks.Open("C:\\Users\\Ryan\\Desktop\\Coding\\Microsoft Excel\\Work Samples\\Work Samples\\Historical Stock Prices.xlsb");
                //~~> Run the macros by supplying the necessary arguments
                xlApp.Run("ShowMsg", "Hello from C# Client", "Demo to run Excel macros from C#");
                //~~> Clean-up: Close the workbook
                xlWorkBook.Close(false);
                //~~> Quit the Excel Application
                xlApp.Quit();
                //~~> Clean Up
                releaseObject(xlApp);
                releaseObject(xlWorkBook);
            //~~> Release the objects
            private void releaseObject(object obj)
                try
                    System.Runtime.InteropServices.Marshal.ReleaseComObject(obj);
                    obj = null;
                catch (Exception ex)
                    obj = null;
                finally
                    GC.Collect();
    When I hit the play button nothing happens.  When I hot F5 nothing happens.  Do you ahve any idea what I'm doing wrong.  I'd appreciate any advice with this!! 
    Thanks!!
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • Excel macro error after deploying in Weblogic

    Halo,
    I have written excel macros and it is working fine.
    but if the same file if i try to open from hyperlink after deploying in Weblogic server , I get the error
    "error occured initializing the VBA libraries.
    If Microsoft Visual Basic for Applications (VBA) was not installed, or was set to Install on first use,
    (advertised, or set to install on demand) you may receive this error message.
    Depending on the mode of installation used and the rights of the user to change current settings,
    it is possible to install VBA through Control Panel, Add/Remove Programs, Microsoft Office, Add or Remove
    features. If Visual Basic for Applications is not listed as an installable feature of Office, the administrator
    of your system may have disabled it so it is impossible for you to install it. If VBA is not installed,
    it is impossible to run VBA applications/projects on this computer. "
    1. Even though Excel VBA application is installed in my machine , why am i getting this error.??
    2. I would like to know is there any way to open the excel file even though if the excel software is not installed in client machine??
    Appreciate your help.
    Thanks.

    Hi,
    I do not see any reason for this to not work.
    Is there any difference between the preferences for RX and RXI. Please go to "edit" -> "Preferences" -> "Security(Enhanced)" and uncheck "Enable protected mode at startup".
    Are you able to open any pdf from command line with the same command:
    "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe"  <<PDF_FILE>>
    Thanks,
    Amish.

  • Using Excel macros & change properties

    Hi,
    1) my program use Excel macro via a runtime.exec(cmd). I want to use JWS to deliver new versions of application but if I have to put my macros in a jar file how can I reach them (no problem with a file propertie or with gif ressources).
    2) how can I change default properties ("Dossier des applications" in French maybe Applications dir in advanced) wich is enabled in the window.
    thanks a lot
    Sophie

    1) my program use Excel macro via a runtime.exec(cmd).
    I want to use JWS to deliver new versions of
    application but if I have to put my macros in a jar
    file how can I reach them (no problem with a file
    propertie or with gif ressources).You have a lot of options how to do this.
    I would try to use the I/O APIs that reads the macro file
    from a web server (InputStream is = url.openStream()) and put it
    in a local file (FileOutputStream = new FileOutputStream(file)).
    Of course you would need a local location where to store it, could
    be hardwired, or asked from the user.
    2) how can I change default properties ("Dossier des
    applications" in French maybe Applications dir in
    advanced) wich is enabled in the window.I do not understand what you want to do. Explain again.
    Regards,
    Marc

  • WebI to Excel Format Issues

    Hi Guys,
    I have a problem that when I export a BO report to Excel, the bar graph from BO gets very scrunched up and narrow, with the X-axis barely visible once it goes to Excel. But in BO, the report looks great. With all the cells aligned and matching. Is there a way to manipulate something in the BO report to make it Excel friendlier?
    thanks in advance, will award points.
    -preya

    Hi All,
    Trying to replicate WEBI Excel Download issue.
    Operating system : Windows 7
    Internet Explorer : IE8 Version 8.0.7600.16385CO.
    Jre Version : 1.6_ greater than 1.8 version.
    If anybody having above specifications in your machines Please try to save a webi reports to excel format and send me the results.

  • How do I make an Excel macro and Labview push to copy Labview calculated data into a cell on demand?

    Hey there, I am a chemist so Labview and programming aren't exactly my strong point. 
    We have a Labview program that we run to control and automated valve manifold that has a thermocouple and pressure transducer that displays the temperature and pressure on the "front panel" of the labview file we run.  The temperature and pressure of the manifold changes in real time while the labview is running.  We must attach a sample to the manifold, take the pressure and temperature, then record those values in an excel spread sheet, one at a time.
    What I would like to do is make a key board macro in excel to automatically type in the current read out of the temperature (and another for pressure) into which ever selected excel cell you are on, so that you don't have to switch back to the labview window to look at it.  I have a very basic understanding of macros in VB but I don't know how to get the labview to make the read outs available for the excel macros to find it.
    Thanks for the help, Here is a screen shot of the block layout of the program.
    Attachments:
    back.JPG ‏79 KB

    Why not have LV put the data in Excel for you?  You can use Actvie X to do this.  There is plenty of information on the forum and knowledge base on how to use Active X and reporting to Excel.  Plus you have the example finder.  Do you have the Report Generation Toolkit?  LV7 is quite old, so I don't know if this is an option for you.
    Reese, (former CLAD, future CLD)
    Some people call me the Space Cowboy!
    Some call me the gangster of love.
    Some people call me MoReese!
    ...I'm right here baby, right here, right here, right here at home

  • 'Edit in Place' for XLSM-files (Excel Macro-Enabled)

    Hi,
    is it possible to activate 'Edit in Place' for xlsm-files (Excel Macro-Enabled Workbook file)?
    For xls(x)-files there is the link 'Edit This File', but not for files of type 'xlsm' allthough they could be dealt the same way with Excel.
    I know I can edit this files using the 'Add-in for MS Office' and via the 'Vibe Desktop', but it would be nice to deal them like other Excel-files.
    thx
    Martin

    Originally Posted by mschuhmann
    RTFM helps I admit:
    Novell Vibe 3.3 Administration Guide > Site Setup > Setting Up Site-Wide Customizations > Configuring File Associations for Edit in Place Applications
    Novell Doc: Novell Vibe 3.3 Administration Guide - Configuring File Associations for Edit in Place Applications
    Append ".xlsm" for the variable edit.in.place.file.applet.extensions, edit.in.place.file.webdav.extensions
    Hi Martin,
    Yeah, the Vibe docs can help on occasion
    Still, thanks for feeding it back to the forums as it can be quicker finding a hit in the forums than having to go through the docs!
    Cheers,
    Willem

  • Export to Excel - Macro problems

    I have moved this to the Discoverer forum. Exporting to Excel - Macro Problems
    Message was edited by:
    user385142

    Hello Denes.
    Excuse me for send you a message in this way , but I dont find other way to contact with you.
    Im using the export_excel_pkg, and really it work good.
    I have only one problem, I tell you.
    When, in one item, data is very long and numeric, by example a EAN code, without any class of format, by default it give me the value ###, Im studing the package and trying to resolve this, but if you can send me any idea it can help me a lot.
    Thanks in advanced.
    You are doing a great work for us.

  • Execute Infopackage Through BAPI Using Excel Macro (BAPI_IPAK_START)

    Hi everyone,
    I have a problem when execute infopackage through BAPI using excel macro. I have create a button in macro. When this button is clicked, BAPI for trigger InfoPackage will executed (BAPI_IPAK_START) and this button will disabled.
    After this process completely done (traffic indicator for the request is green in update rules), the button will enabled again.
    Here the subroutine or pseudocode that i will write :
    Private Sub ClickButton()
    Begin
    1. ThisButton.Activated = False   --> Disabled Button
    2. Call BAPI/custom Function Module to execute InfoPackage (BAPI_IPAK_START)
    4. ThisButton.Activated = True   --> Enabled Button
    End
    The problem is i need some statement like this between statement no 2 and statement no 4
    Statement That I Want :
    3. Wait Until BAPI Execute Completely
    So user can click this button again only after the process is finished completely. I don't know how to do this in macro (in ABAP i know i can use "WAIT ... SECOND"), others said this can be done using event in schedule option at infopackage. Anyone,please help me.
    Thank you.
    Regards,
    Satria B

    Enter that req number in RSRQ and monitor the load
    or  right click on the DS - manage - you will req in yellow status which is in progress and you can click on the ...takes you monitor screen
    Edited by: Srinivas on Jul 6, 2010 7:51 AM

  • Excel macro on SharePoint 2013

    Hi,
    I know that SharePoint doesn't support Excel macro but in the next future will it change anything?
    Thanks

    Hi,
     I don't think so it may happen. May be in next release of SharePoint version we can expect some extra features like this. Let's wait and see
    Sekar - Our life is short, so help others to grow
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

  • Excel Macro to click on publish button of Master Data Services Add-in

    I am creating an excel macro to perform extra validation and defaults whilst the user is editing the MDS entity. It will be added as a workbook add-in. At the end of the macro I would like to be able to launch publish. The MDS addin is a ribbon.
    Does anyone have an example of how I can simulate a click on the Publish button or what the call that the button does is?
    David Roseneder

    Hi David
    here is a code sample to add mds actions with excel Buttons
    you can find the connection class separately, by downloading my sample project (C#) on codeplex :
    http://mdsmanager.codeplex.com
    (I use this MDS connection class for many projects)
    using System;
    using System.Collections.Generic;
    using System.Data;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Xml.Linq;
    using Microsoft.VisualStudio.Tools.Applications.Runtime;
    using Excel = Microsoft.Office.Interop.Excel;
    using Office = Microsoft.Office.Core;
    using System.Xml;
    using System.Collections.ObjectModel;
    using Common.ServiceReference1;
    namespace ExcelToMDS
    public partial class Sheet1
    public const string mdsEndPoint = "http://yourMDSEndpointUrl:4040/Service/Service.svc";
    ServiceClient c = null;
    International intl = new International();
    OperationResult or = new OperationResult();
    Metadata md = null;
    private void Sheet1_Startup(object sender, System.EventArgs e)
    using (var c = Common.MDS_WSConnect.CreateMdsProxy("yourdomain", "yourlogin", "yourpassword", mdsEndPoint))
    c.Open();
    International intl = new International();
    OperationResult or = new OperationResult();
    md = GetMetaData(intl, ref or);
    cbModels.Items.Clear();
    foreach (Model mo in md.Models)
    cbModels.Items.Add(mo.Identifier);
    cbModels.DisplayMember = "Name";
    cbEntities.Visible = true;
    private Metadata GetMetaData(International intl, ref OperationResult or)
    MetadataResultOptions mro = new MetadataResultOptions();
    MetadataSearchCriteria msc = new MetadataSearchCriteria();
    msc.Models = new Collection<Identifier>() { new Identifier() };
    msc.Versions = new Collection<Identifier>() { new Identifier() };
    msc.SearchOption = SearchOption.UserDefinedObjectsOnly;
    mro.Models = ResultType.Identifiers;
    mro.Versions = ResultType.Identifiers;
    cbModels.Items.Clear();
    Metadata md = c.MetadataGet(intl, mro, msc, out or);
    return md;
    private void Sheet1_Shutdown(object sender, System.EventArgs e)
    if (c != null && c.State != System.ServiceModel.CommunicationState.Closed)
    c.Close();
    #region VSTO Designer generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InternalStartup()
    this.btGetMDSData.Click += new System.EventHandler(this.btGetMDSData_Click);
    this.btGetTransactions.Click += new System.EventHandler(this.btGetTransactions_Click);
    this.btUpdateAttribute.Click += new System.EventHandler(this.btUpdateAttribute_Click);
    this.cbModels.SelectedIndexChanged += new System.EventHandler(this.cbModels_SelectedIndexChanged);
    this.cbMembers.SelectedIndexChanged += new System.EventHandler(this.cbMembers_SelectedIndexChanged);
    this.cbEntities.SelectedIndexChanged += new System.EventHandler(this.cbEntities_SelectedIndexChanged);
    this.cbVersions.SelectedIndexChanged += new System.EventHandler(this.cbVersions_SelectedIndexChanged);
    this.cbAttributes.SelectedIndexChanged += new System.EventHandler(this.cbAttributes_SelectedIndexChanged);
    this.btReverseTran.Click += new System.EventHandler(this.btReverseTran_Click);
    this.Shutdown += new System.EventHandler(this.Sheet1_Shutdown);
    this.Startup += new System.EventHandler(this.Sheet1_Startup);
    #endregion
    private void btGetMDSData_Click(object sender, EventArgs e)
    Cursor.Current = Cursors.WaitCursor;
    DisplayEntityMembers(c);
    Cursor.Current = Cursors.Default;
    private void DisplayEntityMembers(ServiceClient c)
    EntityMembers em = GetEntityMembers(c);
    if (em != null)
    Member[] members = em.Members.ToArray();
    ((Excel.Range)this.Cells[2, 2]).Value2 = "MemberName";
    ((Excel.Range)this.Cells[2, 3]).Value2 = "AttributeName";
    ((Excel.Range)this.Cells[2, 4]).Value2 = "AttributeValue";
    for (int i = 0; i < members.Length; i++)
    ((Excel.Range)this.Cells[i + 3, 2]).Value2 = members[i].MemberId.Name;
    int cptAtt = 0;
    foreach (Common.ServiceReference1.Attribute att in members[i].Attributes)
    ((Excel.Range)this.Cells[i + 3, cptAtt + 3]).Value2 = att.Identifier.Name.ToString();
    ((Excel.Range)this.Cells[i + 3, cptAtt + 4]).Value2 = att.Value != null ? att.Value.ToString() : "";
    cptAtt += members[i].Attributes.Count();
    private EntityMembers GetEntityMembers(ServiceClient c)
    if (cbModels.SelectedItem != null && cbEntities.SelectedItem != null && cbVersions.SelectedItem != null)
    EntityMembersGetCriteria emGetCrit = new EntityMembersGetCriteria();
    emGetCrit.ModelId = new Identifier() { Name = ((Identifier)cbModels.SelectedItem).Name };
    emGetCrit.EntityId = new Identifier() { Name = ((Identifier)cbEntities.SelectedItem).Name };
    emGetCrit.VersionId = new Identifier() { Name = ((Identifier)cbVersions.SelectedItem).Name };
    //ExportView[] ev = c.ExportViewListGet(new International(), out or);
    EntityMembersInformation emi = new EntityMembersInformation();
    emGetCrit.DisplayType = DisplayType.CodeName;
    EntityMembers em = c.EntityMembersGet(intl, emGetCrit, out emi, out or);
    return em;
    else
    MessageBox.Show("Please select model, version and entity in comboboxes");
    return null;
    private void btGetTransactions_Click(object sender, EventArgs e)
    if (cbModels.SelectedItem != null)
    this.Rows.Clear();
    using (var c = Common.MDS_WSConnect.CreateMdsProxy("yourdomain", "yourlogin", "yourpassword", mdsEndPoint))
    c.Open();
    DisplayTransactions(c);
    c.Close();
    else
    MessageBox.Show("Please select Model in combos");
    private void DisplayTransactions(ServiceClient c)
    string versionName = "VERSION_1";
    if (cbVersions.SelectedItem != null)
    versionName = ((Identifier)cbVersions.SelectedItem).Name;
    TransactionSearchCriteria trSrchCrit = new TransactionSearchCriteria();
    trSrchCrit.ModelId = new Identifier() { Name = ((Identifier)cbModels.SelectedItem).Name };
    //trSrchCrit.EntityId = new Identifier() { Name = ((Identifier)cbEntities.SelectedItem).Name };
    trSrchCrit.EntityId = new Identifier();
    trSrchCrit.VersionId = new Identifier() { Name = versionName };
    //ExportView[] ev = c.ExportViewListGet(new International(), out or);
    EntityMembersInformation emi = new EntityMembersInformation();
    int totalTranCount = 0;
    Collection<Transaction> transactions = new Collection<Transaction>();
    OperationResult or = c.TransactionsGet(intl, trSrchCrit, out totalTranCount, out transactions);
    int startY = 4;
    int startDataY = startY + 1;
    int startX = 4;
    ((Excel.Range)this.Cells[startY, startX]).Value2 = "TransactionID";
    ((Excel.Range)this.Cells[startY, startX + 1]).Value2 = "Code";
    ((Excel.Range)this.Cells[startY, startX + 2]).Value2 = "Name";
    ((Excel.Range)this.Cells[startY, startX + 3]).Value2 = "MemberType";
    ((Excel.Range)this.Cells[startY, startX + 4]).Value2 = "Date";
    ((Excel.Range)this.Cells[startY, startX + 5]).Value2 = "AttributeName";
    ((Excel.Range)this.Cells[startY, startX + 6]).Value2 = "PriorValue";
    ((Excel.Range)this.Cells[startY, startX + 7]).Value2 = "NewValue";
    for (int i = 0; i < transactions.Count(); i++)
    ((Excel.Range)this.Cells[i + startDataY, startX]).Value2 = transactions[i].Id.ToString();
    ((Excel.Range)this.Cells[i + startDataY, startX + 1]).Value2 = transactions[i].MemberId.Code;
    ((Excel.Range)this.Cells[i + startDataY, startX + 2]).Value2 = transactions[i].MemberId.Name;
    ((Excel.Range)this.Cells[i + startDataY, startX + 3]).Value2 = transactions[i].MemberId.MemberType.ToString();
    ((Excel.Range)this.Cells[i + startDataY, startX + 4]).Value2 = transactions[i].Date.ToString();
    ((Excel.Range)this.Cells[i + startDataY, startX + 5]).Value2 = transactions[i].AttributeId.Name;
    ((Excel.Range)this.Cells[i + startDataY, startX + 6]).Value2 = transactions[i].PriorValue;
    ((Excel.Range)this.Cells[i + startDataY, startX + 7]).Value2 = transactions[i].NewValue;
    private void btUpdateAttribute_Click(object sender, EventArgs e)
    Cursor.Current = Cursors.WaitCursor;
    using (var c = Common.MDS_WSConnect.CreateMdsProxy("yourdomain", "yourlogin", "yourpassword", mdsEndPoint))
    c.Open();
    EntityMembers em = GetEntityMembers(c);
    Member[] members = em.Members.ToArray();
    for (int i = 0; i < members.Length; i++)
    ((Excel.Range)this.Cells[i + 3, 2]).Value2 = members[i].MemberId.Name;
    foreach (Common.ServiceReference1.Attribute att in members[i].Attributes)
    if (att.Identifier.Name == "ValidDandT")
    att.Value = DateTime.Now;
    c.EntityMembersUpdate(intl, em);
    DisplayEntityMembers(c);
    c.Close();
    Cursor.Current = Cursors.Default;
    private void cbModels_SelectedIndexChanged(object sender, EventArgs e)
    Identifier i = (Identifier)cbModels.SelectedItem;
    if (md != null)
    cbVersions.Items.Clear();
    foreach (Common.ServiceReference1.Version v in md.Versions)
    if (v.Identifier.ModelId.Id == i.Id)
    cbVersions.Items.Add(v.Identifier);
    cbVersions.DisplayMember = "Name";
    private void cbVersions_SelectedIndexChanged(object sender, EventArgs e)
    Identifier iVer = (Identifier)cbVersions.SelectedItem;
    ModelMembersGetCriteria mmgc = new ModelMembersGetCriteria();
    mmgc.Models = new Collection<Identifier>() { new Identifier() { Name = ((Identifier)cbModels.SelectedItem).Name } };
    ModelMembersResultCriteria mmrc = new ModelMembersResultCriteria();
    mmgc.Versions = new Collection<Identifier>() { new Identifier() { Id = iVer.Id } };
    mmrc.IncludeLeafMembers = true;
    cbEntities.Items.Clear();
    cbMembers.Items.Clear();
    Collection<EntityMembers> colEm = c.ModelMembersGet(intl, mmgc, mmrc, out or);
    foreach (EntityMembers em in colEm)
    cbEntities.Items.Add(em.EntityId);
    cbEntities.DisplayMember = "Name";
    private void cbEntities_SelectedIndexChanged(object sender, EventArgs e)
    DisplayEntityAttributesCombo(c);
    DisplayEntityAttributesAndMembersInSheet();
    private void DisplayEntityAttributesAndMembersInSheet()
    EntityMembers em = GetEntityMembers(c);
    Member[] members = em.Members.ToArray();
    ((Excel.Range)this.Cells[2, 2]).Value2 = "MemberName";
    ((Excel.Range)this.Cells[2, 3]).Value2 = "AttributeName";
    ((Excel.Range)this.Cells[2, 4]).Value2 = "AttributeValue";
    if (members.Count() > 0)
    int ii = 0;
    //attributes name on header line
    foreach (Common.ServiceReference1.Attribute att in members[0].Attributes)
    ((Excel.Range)this.Cells[3, ii + 3]).Value2 = att.Identifier.Name.ToString();
    ii++;
    //members Data
    int cptnbAttributes = members[0].Attributes.Count();
    for (int i = 0; i < members.Length; i++)
    for (int j = 0; j < cptnbAttributes - 1; j++)
    ((Excel.Range)this.Cells[i + 4, j + 3]).Value2 = members[i].MemberId.MemberType;
    private void DisplayEntityAttributesCombo(ServiceClient c)
    EntityMembers em = GetEntityMembers(c);
    Member[] members = em.Members.ToArray();
    if (members.Count() > 0)
    cbAttributes.Items.Clear();
    foreach (Common.ServiceReference1.Attribute a in members[0].Attributes)
    cbAttributes.Items.Add(a.Identifier);
    cbAttributes.DisplayMember = "Name";
    cbAttributes.Visible = true;
    private void cbMembers_SelectedIndexChanged(object sender, EventArgs e)
    Identifier idMember = (Identifier)cbMembers.SelectedItem;
    EntityMembers em = GetEntityMembers(c);
    Member[] members = em.Members.ToArray();
    Member m = members.FirstOrDefault(p => p.MemberId.Id == idMember.Id);
    cbAttributes.Items.Clear();
    foreach (Common.ServiceReference1.Attribute att in m.Attributes)
    cbAttributes.Items.Add(att.Identifier);
    cbAttributes.DisplayMember = "Name";
    cbAttributes.Visible = true;
    private void cbAttributes_SelectedIndexChanged(object sender, EventArgs e)
    private void btReverseTran_Click(object sender, EventArgs e)
    using (var c = Common.MDS_WSConnect.CreateMdsProxy("yourdomain", "yourlogin", "yourpassword", mdsEndPoint))
    c.Open();
    UpdateTransaction(c);
    DisplayTransactions(c);
    c.Close();
    private void UpdateTransaction(ServiceClient c)
    string versionName = "VERSION_1";
    if (cbVersions.SelectedItem != null)
    versionName = ((Identifier)cbVersions.SelectedItem).Name;
    TransactionSearchCriteria trSrchCrit = new TransactionSearchCriteria();
    trSrchCrit.ModelId = new Identifier() { Name = ((Identifier)cbModels.SelectedItem).Name };
    //trSrchCrit.EntityId = new Identifier() { Name = ((Identifier)cbEntities.SelectedItem).Name };
    trSrchCrit.EntityId = new Identifier();
    trSrchCrit.VersionId = new Identifier() { Name = versionName };
    //ExportView[] ev = c.ExportViewListGet(new International(), out or);
    EntityMembersInformation emi = new EntityMembersInformation();
    int totalTranCount = 0;
    Collection<Transaction> transactions = new Collection<Transaction>();
    OperationResult or = c.TransactionsGet(intl, trSrchCrit, out totalTranCount, out transactions);
    Collection<ReplacementId> transactionReversed = new Collection<ReplacementId>();
    or = c.TransactionsReverse(intl, new Collection<int>() { transactions.First().Id }, out transactionReversed);
    Xavier Averbouch
    Microsoft Community Contributor
    Avanade , FRANCE
    If a post answers your question, please click "Mark As Answer" on that post and "Vote as Helpful".

Maybe you are looking for