Excel could not be found - missing assembly reference?

Posted on 2011-09-07
Medium Priority
Last Modified: 2012-05-12
Hi, I did get this error in my error list while compiling the project. Previously the project are done with MS Office Excel 2003, and currenlty i am using Excel 2007. In my system i don't have MS office 2003. In my project, my references i did add Excel and Microsoft.Office.Core.

The error is ->
The type or namespace name 'Excel' could not be found (are you missing a using directive or an assembly reference?)      

private int findColumnDept(Excel.Worksheet Ws)

Error was underline in "Excel"

private int findColumnDept(Excel.Worksheet Ws)
			int no=1;
			string CellValue="";
			int retryCount=0;
			bool EmptyCellAllowed=true;
				Excel.Range range1 = Ws.get_Range( "A"+no, "A" + no);
				if (range1.Cells.Value2!=null)

					if (retryCount>15)
			}while ((CellValue.Length>0)||(EmptyCellAllowed)) ;

			return no-1;


Open in new window

Question by:Rama Tito
  • 2
LVL 39

Accepted Solution

Pratima Pharande earned 2000 total points
ID: 36500995

Author Comment

by:Rama Tito
ID: 36501024
Hi, i did manage to solve after

using Excel = Microsoft.Office.Interop.Excel;

Thank you.
LVL 39

Expert Comment

by:Pratima Pharande
ID: 36501030
glad to help you

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
From store locators to asset tracking and route optimization, learn how leading companies are using Google Maps APIs throughout the customer journey to increase checkout conversions, boost user engagement, and optimize order fulfillment. Powered …
In the video, one can understand the process of resizing images in single or bulk. Kernel Bulk Image Resizer is an easy to use tool for resizing large number of images. One can add and resize multiple images with this tool in single go. The video sh…

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question