Save file as a .dwg or .dxf file

  • Thread starter Thread starter Stephen C
  • Start date Start date
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.
 
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
 
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
 
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
 
Back
Top