Save file as a .dwg or .dxf file

S

Stephen C

Is there a way of saving a spreadsheet or a selected range as a .dwg or .dxf
file?

I am trying to copy a range from excel 2000 and insert it into a cad package.

Ideally i would like this to be automatic therefore VBA code would be good.
 
T

Tausif

Hi Stepehen,

Not sure if this is what you want. Give it a try.

1) In Excel -> Tools->Macro->VBE
2) Insert module.

Past the code below. This code saves the entire workbook with .dwg xtsn in
the C drive (Replace to dxf if necessary)

Sub SaveAsDwg()
ThisWorkbook.SaveAs "C:\myfilename.dwg"
End Sub

Hth
 
S

Stephen C

I had already tried this, the file will not open in the cad software, "Can't
determine file type"

I believe it is not being saved in excel as a true dwg/dxf, it is only
forcing the file extension to be dwg/dxf
 
G

Gord Dibben

You can select the range then SHIFT + Edit>Copy as picture.

Then paste to your CAD

The automatic part is another ball of wax that I think would be over my
head.


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top