Gene Lenning
asked on
How can I be sure that a MS Excel Object Library is available to my VB.net Application?
I am converting my VB6 application to VB.net using Visual Studio 2013. The VB6 application is heavily dependent on data imported from and exported to Microsoft Excel files. My immediate issue is finding a successful method to transfer data from VB.net to Excel. I used a Microsoft article, http://support.microsoft.com/kb/301982 , “How to automate Microsoft Excel from Visual Basic .NET,” to develop an example application to transfer data to Excel.
The VB application develops 17 errors, many of which are duplicates. I infer from the errors that my required reference to the Microsoft Excel 15.0 Object Library has been unsuccessful. I also believe there are several unidentified procedures required to make this example work. I am a novice at using Visual Studio and VB.net so I really don’t have a clue of what to do next to get this example to work.
A sample of the errors follows:
'Imports' statements must precede any declarations.
'Excel.Application' is not defined.
'Excel.Workbook' is not defined.
'Excel.Range' is not defined.
'Excel' is not declared. It may be inaccessible due to its protection level.
'Excel.Chart' is not defined.
'Excel.Series' is not defined.
Please let me know the best way to proceed in this effort. I cannot see any evidence that the MS Excel Library is available to my application. Is there a way to assure it is available?
The VB application develops 17 errors, many of which are duplicates. I infer from the errors that my required reference to the Microsoft Excel 15.0 Object Library has been unsuccessful. I also believe there are several unidentified procedures required to make this example work. I am a novice at using Visual Studio and VB.net so I really don’t have a clue of what to do next to get this example to work.
A sample of the errors follows:
'Imports' statements must precede any declarations.
'Excel.Application' is not defined.
'Excel.Workbook' is not defined.
'Excel.Range' is not defined.
'Excel' is not declared. It may be inaccessible due to its protection level.
'Excel.Chart' is not defined.
'Excel.Series' is not defined.
Please let me know the best way to proceed in this effort. I cannot see any evidence that the MS Excel Library is available to my application. Is there a way to assure it is available?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Did you follow the steps in my post or only those in the MS article?
ASKER
You solved my immediate issue on the references. Thank you! I didn't see the checkbox. I followed your instructions and it did successfully add the reference to the MS Object Library as verified by observing the References via the project Properties display.
The sad part is that I still have the same 17 errors.
The sad part is that I still have the same 17 errors.
ASKER
I've requested that this question be closed as follows:
Accepted answer: 0 points for Gene456's comment #a39961958
for the following reason:
The expert immediately provided the answer to my question however I missed the key, the checkbox. Furthermore I could verify that the library was indeed added to the project reference list.
Accepted answer: 0 points for Gene456's comment #a39961958
for the following reason:
The expert immediately provided the answer to my question however I missed the key, the checkbox. Furthermore I could verify that the library was indeed added to the project reference list.
ASKER
Thank you for your help. I did not see the checkbox required to select the needed library.
ASKER