473,372 Members | 1,682 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,372 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 3559

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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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...

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.