473,897 Members | 2,948 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

missing Excel 2000 properties and methods

I'm converting a vbscript program to vb.net. Witht he exception of .net
idiosyncrasies, most of it is working well with the same code. My only
problem is that some properties and methods are missing from the Chart
object. For instance, the following line worked fine in vbscript
(csPowerSpeed is the chart):

objXL.csPowerSp eed.seriescolle ction.newseries ()

However, in VS.Net, newseries is no longer avaialable as a method for series
collection! The only options I have are Equals, GetHashCode, GetType and
ToString.

Same problem occurs with other properties and methods such as
Axes().Hastitle and ChartTitle.Char acters.Text. In addition,
csPowerSpeed.Ha sTitle = True generates an error.

Here are my DIM statements:

Dim objXL As New Excel.Applicati on
Dim wbOutput As Excel.Workbook = objXL.Workbooks .Add
Dim wsCSV As Excel.Worksheet = DirectCast(objX L.Worksheets(1) ,
Excel.Worksheet ) 'temporary worksheet(s)
Dim wsGeneric As Excel.Worksheet = DirectCast(objX L.Worksheets(1) ,
Excel.Worksheet ) 'generic worksheet object
Dim wsDataRed As Excel.Worksheet = DirectCast(objX L.Worksheets(1) ,
Excel.Worksheet ) 'data reduction worksheet object
Dim wsStdDev As Excel.Worksheet = DirectCast(objX L.Worksheets(1) ,
Excel.Worksheet ) 'standard deviation worksheet object
Dim csPowerSpeed As Excel.Chart =
DirectCast(objX L.Charts.Add(ob jXL.Worksheets( objXL.Worksheet s.Count)),
Excel.Chart) 'power plot chart object
Dim csTorqueSpeed As Excel.Chart =
DirectCast(objX L.Charts.Add(ob jXL.Worksheets( objXL.Worksheet s.Count)),
Excel.Chart) 'torque plot chart object

I have included Imports for the Office 2000 and Excel 2000 libraries in my
vb.net project. Workbook and worksheet functions all perform perfectly; only
charts have a problem. In addition, the properties and methods were all
available in my vbscript. Anyone have an idea what could be going wrong here?
Nov 21 '05 #1
1 2586
nevermind-- solved it trough trial-and-error. Just DIMming seriescollectio n
and axes objects solved the problem, as shown:

Dim seriesPowerSpee d As Excel.SeriesCol lection =
csPowerSpeed.Se riesCollection
Dim seriesTorqueSpe ed As Excel.SeriesCol lection =
csTorqueSpeed.S eriesCollection
Dim axesPowerSpeed As Excel.Axes = csPowerSpeed.Ax es
Dim axesTorqueSpeed As Excel.Axes = csTorqueSpeed.A xes

The weird thing is I don't even need to use the variables for the
functionality to work as it should; just DIMming the variables seems to do
the trick. Go figure.

Hope this helps someone else!

"Randall Arnold" wrote:
I'm converting a vbscript program to vb.net. Witht he exception of .net
idiosyncrasies, most of it is working well with the same code. My only
problem is that some properties and methods are missing from the Chart
object. For instance, the following line worked fine in vbscript
(csPowerSpeed is the chart):

objXL.csPowerSp eed.seriescolle ction.newseries ()

However, in VS.Net, newseries is no longer avaialable as a method for series
collection! The only options I have are Equals, GetHashCode, GetType and
ToString.

Same problem occurs with other properties and methods such as
Axes().Hastitle and ChartTitle.Char acters.Text. In addition,
csPowerSpeed.Ha sTitle = True generates an error.

Here are my DIM statements:

Dim objXL As New Excel.Applicati on
Dim wbOutput As Excel.Workbook = objXL.Workbooks .Add
Dim wsCSV As Excel.Worksheet = DirectCast(objX L.Worksheets(1) ,
Excel.Worksheet ) 'temporary worksheet(s)
Dim wsGeneric As Excel.Worksheet = DirectCast(objX L.Worksheets(1) ,
Excel.Worksheet ) 'generic worksheet object
Dim wsDataRed As Excel.Worksheet = DirectCast(objX L.Worksheets(1) ,
Excel.Worksheet ) 'data reduction worksheet object
Dim wsStdDev As Excel.Worksheet = DirectCast(objX L.Worksheets(1) ,
Excel.Worksheet ) 'standard deviation worksheet object
Dim csPowerSpeed As Excel.Chart =
DirectCast(objX L.Charts.Add(ob jXL.Worksheets( objXL.Worksheet s.Count)),
Excel.Chart) 'power plot chart object
Dim csTorqueSpeed As Excel.Chart =
DirectCast(objX L.Charts.Add(ob jXL.Worksheets( objXL.Worksheet s.Count)),
Excel.Chart) 'torque plot chart object

I have included Imports for the Office 2000 and Excel 2000 libraries in my
vb.net project. Workbook and worksheet functions all perform perfectly; only
charts have a problem. In addition, the properties and methods were all
available in my vbscript. Anyone have an idea what could be going wrong here?

Nov 21 '05 #2

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

Similar topics

1
10635
by: Jan Agermose | last post by:
Im writing information into an existing excel document using a connection string like: strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Filename + ";Extended Properties=\"Excel 8.0;HDR=yes;\""; and one of to methods for inserting data. First I simply tried building insert statements as strings "insert into (, ) values ('Some text', 42)"
7
5413
by: Corepaul | last post by:
Missing Help Files When I enter "recordset" as the keyword and search the Visual Basic Help index, I get many topics of interest in the resulting list. But there isn't any information available from clicking on many of the available topics (mostly methods but some properties are also unavailable). This same problem occurs with many, if not most, keywords. Is there any way I can activate these "missing" help topics? HELP!
1
6203
by: barma16 | last post by:
I've hit a bit of a brick wall here, and could use some advice. I have an Access application whose output is a four-tab Excel spreadsheet where three of the four tabs are the result of database queries. A number of fields in the queries are designed to become formulae in Excel after the export has taken place (and they need to be in Excel rather than Access). I need to use the TransferSpreadsheet Method rather than the OutputTo to enable...
17
6358
by: Mansi | last post by:
I need to do some research on how to use excel automation from c#. Does anyone know of any good books related to this subject? Thanks. Mansi
1
3260
by: funcSter | last post by:
I want to retrieve data from an Excel file like how I would with a database. I understand that I would have to use OLE DB. Somehow I think I cannot get the connection string right, as the bit of code fails at "objConn.Open()" with the error: System.Data.OleDb.OleDbException: Could not find installable ISAM. Can somebody please help me out? I'm still a learning programmer, so if someone can point out my mistakes, it'll be great! Thanks! ...
7
2692
by: Alan Roberts | last post by:
Can someone please explain the following for me... I am trying to link to a .NET DLL from Excel. Excel needs to pass a reference to itself to the DLL and then the DLL needs to perform some work on the running instance of Excel via that reference. As an example, a VB DLL to return the path to the current active workbook contains the following (in addition to the COM GUIDS automatically added to a new COMClass)... Public Class Class1...
8
38173
by: SteveS | last post by:
I'm attempting to close EXCEL from within my VB.NET application. Using the excel object library to write data to my spreadsheet is working fine but when I try to quit application object it does not work. I know this because I can still see the Excel application running in Task Manager. How do I shut down EXCEL? -- Thank You
8
8460
by: KeithChang | last post by:
Hi, I'm building a web application in VB.NET 1.1 where users will upload Excel files at this webpage and the web application will transfer the data from the uploaded Excel file into MS SQL 2000. There are around 600-700 records and about 56 columns in the Excel file which is to be uploaded daily. There will be a few different files which I need to implement for as well. I've sourced for and tried alot of methods. But either they can't satisfy...
3
2750
by: NEWSGROUPS | last post by:
I am in the midst of trying to convert about 25 Access 2000 to Access 2003. The new environment consists of Office/Access 2003 and Outlook 2003. When converting the back ends I have no problems. When converting the front ends I get the following issues and error. If I try to import all the objects into a blank Access 2003 shell I get a missing reference error for Outlook 2000, Excel 2000, and Word 2000 or after importing all the objects...
0
9990
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
9837
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11250
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10849
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10939
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10476
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6073
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4697
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3299
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.