Office Web Component Spreadsheet: C#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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="Driver={Oracle in OraHome9};Server=D2K1Z01J;Database=HR;UID=AA;PWD=ORACLE";

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top