cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

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

jgriffiths
1-Newbie

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

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

10 REPLIES 10
LucMeekes
23-Emerald III
(To:jgriffiths)

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

Success!
Luc

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

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

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.

LucMeekes
23-Emerald III
(To:jgriffiths)

Mathcad 15 is presently at relase M045, you're using M010.

You should be able to download and install the M045 release. Certainly if you are a maintenance customer.

No guarantee that that release will fix your problem, though.

Success!
Luc

I think that this is not a service release at all. By the way, what about Mathcad and Excel document with macro?

Yes m15 050 is a service release. In anycase, it seems I'm about 4-5 releases out of date. I'll try get my companies IT department to update my Mathcad to 050 and see if that fixes my issue.

Can anyone on this site confirm whether or not they CAN get .xlsm file to work as embedded components?? Or am I chasing a dead end here?

LucMeekes
23-Emerald III
(To:jgriffiths)

"Can anyone on this site confirm whether or not they CAN get .xlsm file to work as embedded components?? Or am I chasing a dead end here?"

Isn't that what Vladimir did here: Re: Embedded 'Macro Enable' Excel Spreadsheet, i.e. **.xlsm files "It seems that there is no support for files...."?

Luc

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.

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

Top Tags