Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

OLE xlsm file location

kameron.jones
Contributor

OLE xlsm file location

kameron.jones
Contributor
Contributor

I posted a very similar question earlier, and thought I would ask a different way:

 

Is there a source location that an embedded file (in my case, .xlsm) opens from outside of AutoCAD. IE when I say "OLEOPEN" and my excel file opens, the title says "worksheet in Drawing1.xlsm"

 

Does anyone know where this .xlsm is temporarily stored so I can try to add it to a trusted location, so the macros work?

0 Me gusta
Responder
Soluciones aceptadas (2)
1.752 Vistas
7 Respuestas
Respuestas (7)

Alfred.NESWADBA
Consultant
Consultant
Solución aceptada

Hi,

 

>> Is there a source location that an embedded file

If it's really embedded, then the content is only saved inside the dwg-file itself.

The advantage of embedded is that you can send the dwg-file to someone else and he can open the OLE-object content (if the software for that exists on this workstation) ... without the need to transfer any other files.

 

BTW: Be careful ... as XLSM can include macros you might transfer virus content too! Also antivirus software might show warnings for such files.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2025
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Me gusta

kameron.jones
Contributor
Contributor

Thanks, so then I suppose, is there a way to make that file trusted?

0 Me gusta

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> is there a way to make that file trusted?

Use XLSX instead of XLSM, AutoCAD itself does not make anything trusted or not ... the workstation that should open the file may have issues with that.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2025
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Me gusta

ed57gmc
Mentor
Mentor
Solución aceptada

It depends on whether the xls was embedded or linked. If linked, use the OLELINKS command. If embedded, you can export the OLE to a file by selecting the OLE>right click>OLE>Convert.

 

However, don't expect the OLE to run excel macros. Your best option is to link the file using datalink manager, placing a linked table and then running the macros in the xlsm and then updating the table in AutoCAD.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Me gusta

kameron.jones
Contributor
Contributor

it is at large our company policy and the new microsoft updates that forced macros to be disabled. i am trying to figure out how to "trust" this document rather than recreate the OLE

 

Thanks for your input, I am thinking it will have to be a new "simple" OLE

0 Me gusta

ed57gmc
Mentor
Mentor

Just save the xlsm as an xslx and it will remove the code for you. Also, better than an OLE, use a datalink to the xslx or xlsm and create an AutoCAD table based on the datalink.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Me gusta

kameron.jones
Contributor
Contributor

The issue is that the code is a key part of our OLE.... to "just " remove it means we first have to recreate the OLE to produce what we need for our outcome. Also, a linked OLE will not work as this would affect multiple files at once, each of which need to be separate.

0 Me gusta