Skip to main content
1-Visitor
March 17, 2017
Question

Embedded 'Macro Enable' Excel Spreadsheet, i.e. **.xlsm files

  • March 17, 2017
  • 3 replies
  • 8597 views

Hi all,

I have a wee problem. I like to use excel spreadsheets within my mathcad files. To be exact I like the feature of using mathcad variables that feed into the excel doc, then take an excel cell and feed it out. So using an excel document as a little black box. I do this by using insert component, and selecting the number of inputs and outputs etc. However, I've recently discovered it doesn't seem to work with .xlsm files, that is macro enabled excel docs. When I attempt to do it my output mathcad variable goes red and says output range invalid. I've tried saving the excel doc as a 'Normal' .xls file and while it fixes this particular problem, the actual file no longer works.

Any ideas?

Thanks

3 replies

23-Emerald IV
March 17, 2017

Assuming you're dealing with Prime: You're not alone. See Excel and Mathcad.

Success!
Luc

1-Visitor
March 20, 2017

Actually no, I'm using Mathcad 15. Is there anyway of fixing this?

1-Visitor
March 30, 2017

Anyone else know what the problem is?

I've attached an example, file, where I've tried to embed a .xlsm as a "Component"

You'll see I can't take read any of the variables.

I can use the READEXCEL command, but that's not my intent. It needs to be a component.

My Mathcad version is MC15_M010_20110622

24-Ruby III
March 31, 2017

It seems that there is no support for files with a macro (it works fine with ".xls"/".xlsx"). Anyone tested? I use Mathcad 15 M045 and Microsoft Excel 2010.

1-Visitor
April 19, 2017

So I got the M045 update. And it hasn't made any difference. Still CAN'T use embedded .xlsm files. That's a shame. I have found you can writeexcel(.) then readexcel(...). Then do a pasted link of the spreadsheet for presentation purposes. This sort of achieves the same thing. However is annoying as there is now an additional excel file in the file folder and I have open the excel spreadsheet to get it calculate. Still not the worst option though.

1-Visitor
December 25, 2020

Hello,

 

it seems an old post. But, has PTC implemented any solution?
Because I want to use macro enabled workbook as an excel component in Mathcad Prime 5.0.
It seems, software doesn´t support macro enabled workbook.

 

Regards

Vikrant