sai56 0 Newbie Poster

I am using visual 2008 c++ and office,by using the method which taught in http://www.codeproject.com/KB/office/automate_excel.aspx to link one of the form of the project to excel, it works.However, when I try to link another form of the same project to the excel ..it fails
It gives out the following error:

using namespace Microsoft::Office::Interop::Excel;

1>c:\users\issac\documents\visual studio 2008\projects\fyp\fyp\day.h(13) : error C3083: 'Microsoft': the symbol to the left of a '::' must be a type
1>c:\users\issac\documents\visual studio 2008\projects\fyp\fyp\day.h(13) : error C3083: 'Office': the symbol to the left of a '::' must be a type
1>c:\users\issac\documents\visual studio 2008\projects\fyp\fyp\day.h(13) : error C3083: 'Interop': the symbol to the left of a '::' must be a type

I have tried to remove the reference and add the refernce again and rebuild the solution and it still fails..Has anyone try to run the excel in two different form in the same project before? Can anyone give me some suggestion to solve it..Thanks for your kind help.

Or can anyone suggest me some way to plot the graph by using visual 2008 c++ window form application,thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.