471,344 Members | 1,499 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,344 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 3379

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 discussion thread is closed

Replies have been disabled for this discussion.

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.