473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

interface not supported excel COM

Hi,

I hope this is correct forum for this, this might possibly an academic type
question.

I am trying to copy a dataset to an excel spreadsheet for my asp.net
application.
(written VB).

I have tried lots of sample code examples but everyone gets stuck at the
point where I try to manipulate a cell.
snippet follows:

Dim oSheet As Excel.Worksheet (note: not all declarations provided)

oSheet.Cells(1, 1).Interior.Color = m_Report.m_heading_color
oSheet.Cells(1, 1).Value = "PP"
oSheet.Cells(2, 1).CopyFromRecordset(drdata)

all of these statements cause a "no such interface supported" error.
I don't have intellisense appearing after the cells.

Does anyone know what the problem might be ?

thanks

Chris
Jul 21 '05 #1
2 3566

You need to add a reference to Excel.

Right click References in the Solution tree.

Then find Microsoft Excel under the COM tab.
Chris wrote:
Hi,

I hope this is correct forum for this, this might possibly an academic
type question.

I am trying to copy a dataset to an excel spreadsheet for my asp.net
application.
(written VB).

I have tried lots of sample code examples but everyone gets stuck at the
point where I try to manipulate a cell.
snippet follows:

Dim oSheet As Excel.Worksheet (note: not all declarations provided)

oSheet.Cells(1, 1).Interior.Color = m_Report.m_heading_color
oSheet.Cells(1, 1).Value = "PP"
oSheet.Cells(2, 1).CopyFromRecordset(drdata)

all of these statements cause a "no such interface supported" error.
I don't have intellisense appearing after the cells.

Does anyone know what the problem might be ?

thanks

Chris


--
Texeme
http://texeme.com

Jul 21 '05 #2
Hi Indie Pop,

I have already reference the excel object and provided import statements.
VS2003 automatically turned it into an interop.excel.dll.

I found out the problem my syntax was incorrect.

Now I have another problem: the message when I run that line of code is:

"Exception from HRESULT: 0x800A03EC."
source = "Interop.Excel"

any ideas?

thanks
Chris
"Indie Pop" wrote:

You need to add a reference to Excel.

Right click References in the Solution tree.

Then find Microsoft Excel under the COM tab.
Chris wrote:
Hi,

I hope this is correct forum for this, this might possibly an academic
type question.

I am trying to copy a dataset to an excel spreadsheet for my asp.net
application.
(written VB).

I have tried lots of sample code examples but everyone gets stuck at the
point where I try to manipulate a cell.
snippet follows:

Dim oSheet As Excel.Worksheet (note: not all declarations provided)

oSheet.Cells(1, 1).Interior.Color = m_Report.m_heading_color
oSheet.Cells(1, 1).Value = "PP"
oSheet.Cells(2, 1).CopyFromRecordset(drdata)

all of these statements cause a "no such interface supported" error.
I don't have intellisense appearing after the cells.

Does anyone know what the problem might be ?

thanks

Chris


--
Texeme
http://texeme.com

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mudcat | last post by:
Howdy, I could have sworn I downloaded a version of python win that supported object library 11.0 at some point. However I just downloaded versions 204 and 203, and the highest version they have...
5
by: Peter | last post by:
I am trying to understand Interfaces. I've looked at various Dog, Animal and Shape and Circle examples and I am still murky about interfaces. I am working on a project where I am using Excel to...
2
by: al | last post by:
Greetings, I'm wondering if Excel object CopyFromRecordset is still supported in VB.NET?? If not, what is the alternative, looping through dataset???? MTIA, Grawsha
2
by: Chris | last post by:
Hi, I hope this is correct forum for this, this might possibly an academic type question. I am trying to copy a dataset to an excel spreadsheet for my asp.net application. (written VB). I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.