problem when try to generate graph metrics

Aug 24, 2012 at 3:38 AM

When I try to execute the graph metric, I get the error message below after I attempt to run the options I have selected.  This confuses me because  I have successfully used the graph metric feature before on the same Excel files dozens of times over the last month, even in the last week.  But, the graph metric button generates this error message with both Excel 2007 and Excel 2010.  I'm not sure, but I think the problem started occurred after I removed the trial version of Office 365 (Office 2013) that I used a couple times.  Since then, I have reloaded the NodeXL program file (two version of it) and reloaded Office 2007 and Office 2010, but it makes no difference.

Details:

[TargetException]: Object does not match target type.

Server stack trace:

   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)

   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)

   at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)

   at Microsoft.VisualStudio.Tools.Applications.InteropProxyImpl.OnImportedMethodInvoked(MethodInfo methodInfo, Object[] args, Exception& exception)

Exception rethrown at [0]:

   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

   at Microsoft.Office.Interop.Excel._Workbook.get_Sheets()

   at Smrf.AppLib.ExcelUtil.TryGetWorksheet(Workbook workbook, String worksheetName, Worksheet& worksheet)

   at Smrf.AppLib.ExcelTableUtil.TryGetTable(Workbook workbook, String worksheetName, String tableName, ListObject& table)

   at Smrf.NodeXL.ExcelTemplate.PerWorkbookSettings.TryGetPerWorkbookSettingsTable(ListObject& oPerWorkbookSettingsTable)

   at Smrf.NodeXL.ExcelTemplate.PerWorkbookSettings.GetAllSettings()

   at Smrf.NodeXL.ExcelTemplate.PerWorkbookSettings.TryGetValue(String settingName, Type valueType, Object& value)

   at Smrf.NodeXL.ExcelTemplate.PerWorkbookSettings.get_WorkbookSettings()

   at Smrf.NodeXL.ExcelTemplate.NodeXLApplicationSettingsBase.CopyWorkbookSettingsToStandardSettings()

   at Smrf.NodeXL.ExcelTemplate.NodeXLApplicationSettingsBase.get_Item(String propertyName)

   at Smrf.NodeXL.ExcelTemplate.GraphMetricUserSettings.get_GraphMetricsToCalculate()

   at Smrf.NodeXL.ExcelTemplate.GraphMetricUserSettings.ShouldCalculateGraphMetrics(GraphMetrics graphMetrics)

   at Smrf.NodeXL.ExcelTemplate.CalculateGraphMetricsContext.ShouldCalculateGraphMetrics(GraphMetrics graphMetrics)

   at Smrf.NodeXL.ExcelTemplate.OverallMetricCalculator2.TryCalculateGraphMetrics(IGraph graph, CalculateGraphMetricsContext calculateGraphMetricsContext, GraphMetricColumn[]& graphMetricColumns)

   at Smrf.NodeXL.ExcelTemplate.GraphMetricCalculationManager.CalculateGraphMetricsAsyncInternal(CalculateGraphMetricsAsyncArgs oCalculateGraphMetricsAsyncArgs, BackgroundWorker oBackgroundWorker, DoWorkEventArgs oDoWorkEventArgs)

   at Smrf.NodeXL.ExcelTemplate.GraphMetricCalculationManager.BackgroundWorker_DoWork(Object sender, DoWorkEventArgs e)

   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)

   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

---------------------------

OK  

 

Aug 25, 2012 at 5:21 PM
Edited Aug 25, 2012 at 5:47 PM

What happens if you create a new NodeXL workbook, enter a few edges, and calculate the same graph metrics for the new workbook?  I'm trying to figure out if something is broken on your computer with NodeXL or Excel in general, or if one or more of your older NodeXL workbooks have somehow become corrupted.

-- Tony

Aug 25, 2012 at 7:32 PM
Tony
Thank you for looking into this problem. With a new NodeXL workbook with a few edges, I get the same error message. The number of metrics or types of metrics does not change anything.

As for the workbooks, I moved them to a different computer using Office 2010 (which never had the new Office preview version loaded on it) and loaded NodeXL. The NodeXL workbooks worked fine, generating the graph metrics fine. Therefore, the workbooks aren't corrupted and on a different computer with a clean install of NodeXl (version 219) there was no problem. This is a relief because I need the graph metrics, but I would like to get NodeXL working properly on my main computer, like it used to work.

I tried to repair NodeXL using the Control Panel: Program options, but it made no difference. Then, I tried to uninstall NodeXL, but got an error message saying NodeXL could not be uninstalled. I deleted NodeXL in the program folder and reinstalled it, but that made no difference.

In summary, on the problem computer I have repaired and also reinstalled Office 2010 and Office 2007, repaired and reinstalled Node XL, tried a prior version (215) of NodeXL, but nothing seems to work to fix the graph metrics problem. The graphing feature itself works fine, so it appears that only the Graph Metrics option is not working properly. I am running Windows 7 64 bit on both computers I have used, so that does not seem to be a problem and the Graph Metrics option worked fine for months on my main computer (until the past few days). I don't know much about this stuff, but could installing and then uninstalling the preview version of Office 2013 have screwed up something, such as registry files? Unfortunately, because of multiple Windows updates, I cannot restore the computer to prior to loading Office 2013.

Gary
Aug 26, 2012 at 3:40 PM
Tony
After my last post, I discovered that, in fact, the graphing feature is not working correctly on the computer having problems with NodeXL graph metrics. Although it looks like the graphing is working correctly, I noticed when I used the dynamic filters that the vertex labels are not correctly linked to the new graph metrics that I created on the other computer. For example, the dynamic filter for betweenness centrality shows the correct range of centrality scores, but when I filter the graph the wrong labels appear on the graph. It looks like the program is labeling the nodes based roughly on alphabetical order (A to Z), although it does skip some vertices. I wonder if this disconnect between the centrality metrics and the vertices is what is causing the error message, although I have no idea how to fix it.

By the way, the graphing feature works correctly on the other computer that I ended up using to generate the graph metrics. I had moved the new NodeXL workbook to the problem computer to write my reports. That is when I discovered this disconnect between the numbers and the labels. I then went back to the working computer and the graphing appears to work correctly. This would indicate the problem is not with the workbook.

I hope this helps. Thanks again.
Gary
Aug 27, 2012 at 4:08 PM

Gary:

It sounds to me like the Office 2013 preview didn't completely restore Office 2010 to its previous state when you uninstalled the preview.  The error message you're getting has to do with versions of programming "objects" that are conflicting with each other.  NodeXL is expecting a version that corresponds to Office 2010, and it's finding a different version instead, probably the one that was installed by the Office 2013 preview.

I don't completely understand the situation, because I would expect there to be similar errors even before you attempted to calculate graph metrics.  But the fact that the workbook works on other computers that didn't have the preview installed and then uninstalled on them leads me to suspect the preview as the culprit.

You said you attempted to "reload" Office 2010.  I'm not sure what you mean.  Did you try the Office "detect and repair" feature described at http://support.microsoft.com/kb/924611?

-- Tony

Sep 2, 2012 at 1:09 PM

Tony

I tried the repair, then I uninstalled and reinstalled Office 2010 and also tried repairing and reinstalling Office 2007. Nothing worked, including system restore because rolling back the system to the point prior to installing 2010 caused many problems with several programs.  So, I ended up reinstalling the OS (Windows 7) and all my programs.  That did the trick and now NodeXL works fine.  I have no idea what went wrong, but it appears to be linked to trying the preview version of Office 2013.  Thanks for trying to help.

Gary

Feb 4, 2013 at 12:28 AM
Hi Tony,

My friend and I got the same error when trying to generate graph metrics. I did install and uninstall Office 2013 before, but I don't know whether my friend did it also.

The thing is that I couldn't reinstall Windows 7. Do you have any suggestion for me?

Thank you

H.N
Feb 4, 2013 at 3:44 AM
H.N.:

I assume that the problem stems from the fact that you installed Office 2013, uninstalled it, and then found that Office 2007 or 2010 wasn't working the same. I don't know if Microsoft ever claimed that you should be able to do that, but here are two suggestions in any case:
  1. Depending on when you installed Office 2013, you might have a "System Restore point" on your computer that will allow you to "roll back" Windows to the state it was in before you installed Office 2013. If you're not familiar with System Restore, please see "What is System Restore?" at http://windows.microsoft.com/en-US/windows-vista/What-is-System-Restore .
  2. You might post a question on the Microsoft Office forum at http://answers.microsoft.com/en-us/office/forum/office_2013_release and ask about how you can restore your previous Office version.
-- Tony
May 12, 2014 at 7:59 PM
I get the same error on Excel 2010. I have never had Excel 2013.