.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Selecting Cells in Excel and storing them as Variables in VB.Net

3 REPLIES 3
Reply
Message 1 of 4
mgorecki
405 Views, 3 Replies

Selecting Cells in Excel and storing them as Variables in VB.Net

Hello,

While in my AutoCad drawing, I need to be able to select cells in an Excel database and use them as variables to create a drawing.  I've looked on the Internet and have found some bits and pieces of code for particular uses, but what I'm looking for is the methodology, or some training/examples on working with Excel and AutoCad using VB.net.

Any help will be greatly appreciated.

 

Thanks,

Mark

3 REPLIES 3
Message 2 of 4
dgorsman
in reply to: mgorecki

One of the typical methods would be to build an interface object, which takes an Excel workbook filename as an argument, and has properties which describe the contents of the file, plus methods which return the requested information.  The object would control all aspects of interacting with the Excel file - test for valid file name, open the file, ensure the file is closed when the interface is disposed of, and so on.  Keep in mind, when I say "interface" I refer to a data interface, not a graphical one.  While that may be part of the interface, its probably better to keep the interface doing only what it does.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 3 of 4
mgorecki
in reply to: dgorsman

Hi, sorry it's taken me so long to reply.  Thank you for the information, but do you know of any links or other sites that may have instructions, on how, what, and why?

 

Thanks

Mark

Message 4 of 4
StephenPreston
in reply to: mgorecki

This old AU class handout by Jerry Winters demonstrates taking AutoCAD data and putting it into Excel. So it will at least show you how to connect to Excel. Once you have that, taking the data the other way is trivial.

 

http://aucache.autodesk.com/au2009/sessions/5409/Everything-Extraction---AutoCAD-to-Databases-Excel-...

 

 

Cheers,

Stephen Preston
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost