Please Help Me !!!

Nov 21, 2009 at 7:42 PM

Hello Sir,

i m a student of Software engineering and i get a project to visualize the Network, i use node xl and downloaded the source code of NodeXl version

But the problem arises when i execute the program but it never give the output.

please i m very thankful to u to give me error free code to execute the nodexl properly.


i also installed Nodexl Template and it successfully installed on my computer. I m using VS-2008 C# please sir help me...

Nov 22, 2009 at 2:36 AM
Edited Nov 22, 2009 at 2:37 AM


Can you provide more details about what you attempting to do and what is going wrong?  Are you building a custom application using the NodeXLControl and you are unable to display a graph?  If so, a good starting point is the NodeXLApi.chm help file that is included in the source code.  If you go to the NodeXLControl topic in that help file, there are complete, compilable program samples for using the control in Windows Forms and Windows Presentation Foundation applications.  If you can build and run one of those samples, it can serve as a starting point for your own custom code.

-- Tony

Nov 22, 2009 at 9:12 PM

Hell0 Tony Thankz for ur reply,

i downloaded the source code of nodexl version and when i extract the file and then i open "NodeXL.sln" file to view the output and Run the project it give this error " A project with an output type of class library cannot be started directly.  In order to debug this project, add an executable project to this solution which refrences the library project. set the executable project as the startup project."


please help me tony as i mentioned earlier my problem.

My Second question: if i want to give input in excel sheet about the vertices connected with each other and the output is to create the graph and save the graph in various format.

what can i do for this problem, and frankly speaking i read the  NodeXLApi.chm help file but it doesnt help me.


Please help me as i running out of dead line...




Nov 23, 2009 at 1:27 AM
Edited Nov 23, 2009 at 1:28 AM

I am still not sure what you are attempting to do.  If you just want to display a graph and save the graph as an image file, do the following:

1. Create an Excel workbook from the NodeXL template.  In the Windows Start menu, click "All Programs" (Vista) or "Programs" (XP), then "Microsoft NodeXL," then "Excel 2007 Template."

2. Enter your edge list into the Edges worksheet.  The edge list should have one row for each edge, where each row specifies the names of the edge's vertices.  These are called Vertex 1 and Vertex 2.

3. In the Excel ribbon, click NodeXL, Graph, Show Graph.  The graph will be shown in the graph pane at the right edge of the workbook.

4. To save the graph as an image file, right click in the graph pane and select Save as Image.

You do not need the source code to do any of this, only the NodeXL Excel Template that you have already successfully installed.  But if for some reason you do want to use the source code, the error message that Visual Studio gave you when you attempted to run the source code's solution was accurate.  To fix the error, right-click the ExcelTemplate or TestNodeXLControl project in Solution Explorer and select "Set as Startup Project."

If my guesses are wrong and none of this answers your question, you are going to need to tell me more about what you are doing.  Why do you think you need the source code?

-- Tony

Nov 23, 2009 at 4:43 AM

Hello Tony

As i mention earlier i am working on a semister project of my bachelors and i want to incoporate this with the code of C#. The goal of my project is that user gives input in the form of excel sheet and corresponding output should be displayed in the form of network. To do all this through the template of nodexl is actually not for my goal and i know how to do this through template but frankly speaking still not able to understand the usage of API that how to incorporate and the available CHM file is not providing the enough background.

Kindly please help me out through this problem by giving the exact source code.

Thanking you in anticipation.

Nov 24, 2009 at 3:56 AM

I cannot give you "exact source code."  In fact, I can't help you at all without knowing what the problem is.  Is there a specific question I can answer?  Are you asking for the steps you need to follow to create a Windows Forms or WPF project and incorporate the NodeXLControl within it?

-- Tony

Nov 24, 2009 at 4:58 AM

Hello Tony,

thankz for ur reply, my exact problem is i want to take input "excel file" from the user and the respective graph would be draw in C# source code.


also please define the steps to follow to create a Windows Forms or WPF project and incorporate the NodeXLControl within it.

i would be very thankful if u please help me out of this problem

Nov 24, 2009 at 3:49 PM

To read an Excel file using C#, you need to use the Excel object model.  Here is a sample project that does this; I'm sure there are many other samples available online as well:

To create a Windows Forms application that uses the NodeXLControl to display a graph, do the following:

1. In Visual Studio 2008, select File, New, Project, Visual C#, Windows, Windows Forms Application.

2. While in the designer, open View, Toolbox and drag an ElementHost onto Form1.  ElementHost is under "WPF Interoperability."

3. In the Form1 properties window, add a Load event handler to Form1.  Call it "Form1_Load".

4. Overwrite the project's Form1.cs file with the sample code listed under the "Using NodeXLControl in Windows Forms Applications" section of the NodeXLControl topic in the NodeXLApi.chm help file.

5. In Visual Studio, select Project, Add Reference, Browse, and add references to Microsoft.NodeXL.Visualization.Wpf.dll, Microsoft.NodeXL.Wpf.Control.dll, and Microsoft.NodeXL.Core.dll.

Compile and run the application.  You will see a NodeXL graph within the ElementHost.

-- Tony

Nov 24, 2009 at 6:40 PM

Thankz Buddy For Ur Reply...

Nov 25, 2009 at 9:45 PM

Hello Tony,


One Question I asked u if i want to see the graph in different layouts given in Nodexl what procedure i follow to make the appropriate graph in "TestNodeXLControl project"

as this project is only show the graph with no layouts.

please help me to incorporate the Layouts in my application effectively.


Thankz in Advance for ur support..


Nov 26, 2009 at 4:03 PM

To change the way the NodeXLControl lays out the graph, set its Layout property.  This must be set to an object that implements IAsyncLayout, and there are many such objects provided with NodeXL: CircleLayout, FruchtermanReingoldLayout (the default), GridLayout, and so on.  These objects are implemented in the Microsoft.NodeXL.Layouts namespace and assembly and they are documented in the NodeXLApi.chm help file.

Here, for example, is how you would configure NodeXLControl to lay out the graph as a grid:

nodeXLControl.Layout = new GridLayout();

You may find some of the classes in the Microsoft.NodeXL.ApplicationUtil namespace to be helpful.  LayoutManagerForMenu, for example, will populate a menu with all the available layouts, fire an event when the user selects a new layout, and create a layout object of the selected type.  This is optional, however; you can manage the layouts any way you like.

-- Tony