Getting Data from Excel to AutoCad
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Getting Data from Excel to AutoCad

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
Norman Duke
Guest





Posted: Wed Mar 30, 2005 10:05 am    Post subject: Getting Data from Excel to AutoCad Reply with quote

How do you connect to an open excel spreadsheet.

Thanks in advance

Norman Duke

Back to top
Laurie Comerford
Guest





Posted: Wed Mar 30, 2005 10:05 am    Post subject: Re: Getting Data from Excel to AutoCad Reply with quote

Hi Norman,

Look in the sample files supplied with AutoCAD. There is code for an Excel
Link supplied.

--

Regards,


Laurie Comerford
www.cadapps.com.au


"Norman Duke" <n.duke@erasethisxtra.co.nz> wrote in message
news:424a4e76_1@newsprd01...
Quote:

How do you connect to an open excel spreadsheet.

Thanks in advance

Norman Duke
Back to top
Norman Duke
Guest





Posted: Wed Mar 30, 2005 3:31 pm    Post subject: Re: Getting Data from Excel to AutoCad Reply with quote

Laurie. Thanks for your response. I have tried the samples but they only
refer to an new workbook, and not an existing one.

I have had the sample working. The real question I have is to access the
current open excel workbooks activesheet. Once there I can get the data that
I need.

Norman Duke


"Laurie Comerford" <laurie.comerford at I hate Spam.com.au> wrote in message
news:424a50ac_2@newsprd01...
Quote:
Hi Norman,

Look in the sample files supplied with AutoCAD. There is code for an
Excel Link supplied.

--

Regards,


Laurie Comerford
www.cadapps.com.au


"Norman Duke" <n.duke@erasethisxtra.co.nz> wrote in message
news:424a4e76_1@newsprd01...

How do you connect to an open excel spreadsheet.

Thanks in advance

Norman Duke




Back to top
Paul Richardson
Guest





Posted: Wed Mar 30, 2005 4:25 pm    Post subject: Re: Getting Data from Excel to AutoCad Reply with quote

Norman,

This will check for a running instance of Excel, if not
it will create one. You'll find more in the Connectivity Group.

gl
Paul

'<code>
Sub excelTest()

Dim oExcel As Excel.Application
Dim wasRunning As Boolean

wasRunning = IsExcelRunning

If wasRunning Then
Set oExcel = GetObject(, "Excel.Application.9")
Else
Set oExcel = CreateObject("Excel.Application.9")
oExcel.Visible = True
oExcel.UserControl = True
End If

'grab the active sheet, rip it up!

'close it if you started it.
If Not wasRunning Then
oExcel.Quit
End If

End Sub

Function IsExcelRunning() As Boolean
Dim oExcel As Excel.Application
On Error Resume Next
Set oExcel = GetObject(, "Excel.Application.9")
IsExcelRunning = (Err.Number = 0)
Set oExcel = Nothing
Err.Clear
End Function
'<code/>

"Norman Duke" <n.duke@erasethisxtra.co.nz> wrote in message
news:424a8021$1_1@newsprd01...
Quote:
Laurie. Thanks for your response. I have tried the samples but they only
refer to an new workbook, and not an existing one.

I have had the sample working. The real question I have is to access the
current open excel workbooks activesheet. Once there I can get the data
that I need.

Norman Duke


"Laurie Comerford" <laurie.comerford at I hate Spam.com.au> wrote in
message news:424a50ac_2@newsprd01...
Hi Norman,

Look in the sample files supplied with AutoCAD. There is code for an
Excel Link supplied.

--

Regards,


Laurie Comerford
www.cadapps.com.au


"Norman Duke" <n.duke@erasethisxtra.co.nz> wrote in message
news:424a4e76_1@newsprd01...

How do you connect to an open excel spreadsheet.

Thanks in advance

Norman Duke




Back to top
Norman Duke
Guest





Posted: Wed Mar 30, 2005 11:21 pm    Post subject: Re: Getting Data from Excel to AutoCad Reply with quote

Thanks Paul
That sent me in the correct direction.

Norman Duke


"Paul Richardson" <noSPAM@nospam.com> wrote in message
news:424a8cb0_2@newsprd01...
Quote:
Norman,

This will check for a running instance of Excel, if not
it will create one. You'll find more in the Connectivity Group.

gl
Paul

'<code
Sub excelTest()

Dim oExcel As Excel.Application
Dim wasRunning As Boolean

wasRunning = IsExcelRunning

If wasRunning Then
Set oExcel = GetObject(, "Excel.Application.9")
Else
Set oExcel = CreateObject("Excel.Application.9")
oExcel.Visible = True
oExcel.UserControl = True
End If

'grab the active sheet, rip it up!

'close it if you started it.
If Not wasRunning Then
oExcel.Quit
End If

End Sub

Function IsExcelRunning() As Boolean
Dim oExcel As Excel.Application
On Error Resume Next
Set oExcel = GetObject(, "Excel.Application.9")
IsExcelRunning = (Err.Number = 0)
Set oExcel = Nothing
Err.Clear
End Function
'<code/

"Norman Duke" <n.duke@erasethisxtra.co.nz> wrote in message
news:424a8021$1_1@newsprd01...
Laurie. Thanks for your response. I have tried the samples but they only
refer to an new workbook, and not an existing one.

I have had the sample working. The real question I have is to access the
current open excel workbooks activesheet. Once there I can get the data
that I need.

Norman Duke


"Laurie Comerford" <laurie.comerford at I hate Spam.com.au> wrote in
message news:424a50ac_2@newsprd01...
Hi Norman,

Look in the sample files supplied with AutoCAD. There is code for an
Excel Link supplied.

--

Regards,


Laurie Comerford
www.cadapps.com.au


"Norman Duke" <n.duke@erasethisxtra.co.nz> wrote in message
news:424a4e76_1@newsprd01...

How do you connect to an open excel spreadsheet.

Thanks in advance

Norman Duke






Back to top
Paul Richardson
Guest





Posted: Thu Mar 31, 2005 3:22 am    Post subject: Re: Getting Data from Excel to AutoCad Reply with quote

Quote:
That sent me in the correct direction.
That's a first..;-) Good Luck.

"Norman Duke" <n.duke@erasethisxtra.co.nz> wrote in message
news:424aee19$1_2@newsprd01...
Quote:
Thanks Paul
That sent me in the correct direction.

Norman Duke


"Paul Richardson" <noSPAM@nospam.com> wrote in message
news:424a8cb0_2@newsprd01...
Norman,

This will check for a running instance of Excel, if not
it will create one. You'll find more in the Connectivity Group.

gl
Paul

'<code
Sub excelTest()

Dim oExcel As Excel.Application
Dim wasRunning As Boolean

wasRunning = IsExcelRunning

If wasRunning Then
Set oExcel = GetObject(, "Excel.Application.9")
Else
Set oExcel = CreateObject("Excel.Application.9")
oExcel.Visible = True
oExcel.UserControl = True
End If

'grab the active sheet, rip it up!

'close it if you started it.
If Not wasRunning Then
oExcel.Quit
End If

End Sub

Function IsExcelRunning() As Boolean
Dim oExcel As Excel.Application
On Error Resume Next
Set oExcel = GetObject(, "Excel.Application.9")
IsExcelRunning = (Err.Number = 0)
Set oExcel = Nothing
Err.Clear
End Function
'<code/

"Norman Duke" <n.duke@erasethisxtra.co.nz> wrote in message
news:424a8021$1_1@newsprd01...
Laurie. Thanks for your response. I have tried the samples but they only
refer to an new workbook, and not an existing one.

I have had the sample working. The real question I have is to access the
current open excel workbooks activesheet. Once there I can get the data
that I need.

Norman Duke


"Laurie Comerford" <laurie.comerford at I hate Spam.com.au> wrote in
message news:424a50ac_2@newsprd01...
Hi Norman,

Look in the sample files supplied with AutoCAD. There is code for an
Excel Link supplied.

--

Regards,


Laurie Comerford
www.cadapps.com.au


"Norman Duke" <n.duke@erasethisxtra.co.nz> wrote in message
news:424a4e76_1@newsprd01...

How do you connect to an open excel spreadsheet.

Thanks in advance

Norman Duke








Back to top
bcoward
Guest





Posted: Fri Apr 01, 2005 8:37 am    Post subject: Re: Getting Data from Excel to AutoCad Reply with quote

Norman,

For a different look you can view my post here..http://discussion.autodesk.com/thread.jspa?threadID=394399

Good luck,

Bob Coward
Back to top
Norman Duke
Guest





Posted: Fri Apr 01, 2005 10:03 am    Post subject: Re: Getting Data from Excel to AutoCad Reply with quote

Bob

Thanks for the additional information. There is a lot in there to keep me
busy.

Norman Duke

"bcoward" <nospam@address.withheld> wrote in message
news:10791350.1112326674755.JavaMail.jive@jiveforum2.autodesk.com...
Quote:
Norman,

For a different look you can view my post
here..http://discussion.autodesk.com/thread.jspa?threadID=394399

Good luck,

Bob Coward
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB