Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default Office Web Component Spreadsheet: C#

I can use the OWC.Spreadsheet component successfully from VB6. From C#, I cannot figure out how to activate another worksheet. The (working) code for the default active sheet is:

axSpreadsheet1.ActiveSheet.ConnectionString="Drive r={Oracle in OraHome9};Server=D2K1Z01J;Database=HR;UID=AA;PWD=O RACLE";

axSpreadsheet1.ActiveSheet.CommandText="Select * from hr.employees;";

I want to be able to do this:

axSpreadsheet1.Worksheets[2].ConnectionString= ....
axSpreadsheet1.Worksheetd[2].CommandText= ....

This works in VB6: I get all kind of errors in C#. I have searched the WEB for a solution and posted the query in the C# newsgroup a few days ago: no joy at all.

Can someone show me the way? Please.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default Office Web Component Spreadsheet: C#

I should have mentioned that I am usinig OWC11 (Office 2003).

"AA2e72E" wrote:

I can use the OWC.Spreadsheet component successfully from VB6. From C#, I cannot figure out how to activate another worksheet. The (working) code for the default active sheet is:

axSpreadsheet1.ActiveSheet.ConnectionString="Drive r={Oracle in OraHome9};Server=D2K1Z01J;Database=HR;UID=AA;PWD=O RACLE";

axSpreadsheet1.ActiveSheet.CommandText="Select * from hr.employees;";

I want to be able to do this:

axSpreadsheet1.Worksheets[2].ConnectionString= ....
axSpreadsheet1.Worksheetd[2].CommandText= ....

This works in VB6: I get all kind of errors in C#. I have searched the WEB for a solution and posted the query in the C# newsgroup a few days ago: no joy at all.

Can someone show me the way? Please.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Office Project vs. Office Web Component ITmidget Excel Worksheet Functions 0 February 22nd 10 04:21 PM
Office web component . Ermias Excel Worksheet Functions 0 May 20th 08 11:40 PM
Office Web Component Licensing AA2e72E Excel Programming 1 June 21st 04 02:02 PM
Use Office spreadsheet component in a ActiveX dll No Name Excel Programming 30 January 28th 04 09:52 PM
Office XP chart component Ryan Bannan[_2_] Excel Programming 0 October 15th 03 04:31 PM


All times are GMT +1. The time now is 06:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"