[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

defining and initializing objects

Posted on 2004-11-08
5
Medium Priority
?
194 Views
Last Modified: 2010-04-23
How can i define the Objects below.
I am using those Object in a function parse an excel sheet into access databae.

Dim objExcel As Excel.Application
Dim objWorkBook As Excel.Workbook
Dim objWorksheet As Excel.Worksheet
Dim worklistsheet As Excel.Worksheet
0
Comment
Question by:komlaaa
3 Comments
 
LVL 10

Accepted Solution

by:
123654789987 earned 172 total points
ID: 12531025
Go through the following link. It gives a clear method of using the various excel objects

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wrgrfexcelworkbookobject.asp
0
 
LVL 3

Assisted Solution

by:eekj
eekj earned 164 total points
ID: 12531050
There is another way to do this; query the excel sheet as you would any other data source. You need a driver (like with any other database) and you can query it using standard sql. Then just iterate through your dataset and create insert statements for your destination database.

This covers the idea, im sure there are plenty of VB.NET examples around as well....
http://www.c-sharpcorner.com/Code/2004/June/AccessExcelDb.asp

0
 
LVL 25

Assisted Solution

by:RonaldBiemans
RonaldBiemans earned 164 total points
ID: 12531105
Don't forget you have to reference the Excel object library before you can use those objects.

References/add reference, choose the COM tab, and locate the microsoft Excel X.X object library
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month19 days, 9 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question