Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Oct 14, 2017
02:23 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 14, 2017
02:23 PM

WRITEEXCEL is corrupting Excel file

Hi all! I'm currently using MathCad 15 and I can't seem to get the seem together the Excel function to work correctly. It keeps writing to excel and making the file corrupt and messing with the formating, making it impossible to write all the arrays to Excel is there something I'm doing wrong?

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

Oct 16, 2017
08:44 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 16, 2017
08:44 AM

Hi,

Final pair. Excel and MathCad.

To stop the formatting from getting changed and to allow auditing of both MathCad and Excel.

Workaround is in the Excel file create a "MathCad Export" worksheet tab. No formats on this worksheet.

On the actual worksheet for the job just set cells equal to corresponding cells on the MathCad Export sheet.

16 REPLIES 16

Oct 14, 2017
02:31 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 14, 2017
02:31 PM

What about Mathcad Prime?

Oct 15, 2017
12:04 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 15, 2017
12:04 PM

I'm unable to use MathCad prime because our whole company uses 14/15

Oct 16, 2017
12:05 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 16, 2017
12:05 AM

hi,

sometimes it is better to stick to the one thing. the calculations you are trying to do can be done entirely in excel.

entry is only required in yellow cells. calculation cells can be simply copied/pasted down as required.

to do this you need to change the 4/0 designation in text to a 4.0 designation in number format.

On you mathcad sheet i cannot find the subscript(i) function so this may be your problem

Cheers

Terry

Oct 16, 2017
08:16 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 16, 2017
08:16 AM

Subscript(i) function is found in one of the tabs. I agree that having Excel do the work would be easier, but if we get an audit it is way easier to show our findings through MathCad then Excel.

Oct 16, 2017
12:14 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 16, 2017
12:14 AM

hi,

sorry mistake in last file the voltage column also needs to be input so should be yellow input cells

Oct 16, 2017
02:21 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 16, 2017
02:21 AM

Hi,

You are doing nothing wrong. Have been messing with this today. Excel can save files in 2003 "xls" and no year designation "xlsx" MathCad 15 is designed to work with 2007 "xlsx" files acciording to help. Ten years of changes in Excel file standards has not been kept up with by PTC and it is unlikely they will.

You can in Excel name ranges like "Cables" and "Circuit1" etc.

'

On Excel to MathCad

Excel 2003 "xls" MathCad can read and when you input into MathCad using Insert|Data|FileInput choose Excel Files, browse to a file, choose an xls 2003 file with named sheets and ranges, next. In the drop down list boxes for "worksheet" and "named ranges" values are there to select matching those in the excel file. With Excel "xlsx" files nothing appears in the these dialog boxes you must write it yourself in the text box.

On Mathcad to Excel

You can cut and paste no worries. Use WRITEEXCEL only supports 2007 "xlsx" files. You can't use 2003 "xls". Using your example you do loose formats and do corrupt the file. I will experiment some more but I think the problem is the "xlsx" standard has moved on beyond the 2007 era in the last ten years. I have an old laptop running Excel 2007 so I will put it through its paces with WRITEEXCEL and its "xlsx" format to see if the versioning is the problem.

Oct 16, 2017
03:39 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 16, 2017
03:39 AM

Hi,

Using Excel 2007 the same occurs.

Mathcad to Excel with WriteExcel mashes the format and you get corruption warnings on opening the excel file.

Excel to Mathcad the worksheet list box and named ranges list box are blank with xlsx but filled with values when using xls 2003 files.

What we need is PTC to get the thing to work in Mathcad 15.

Oct 16, 2017
04:50 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 16, 2017
04:50 AM

Idle hope, I'm afraid.

PTC is putting all their efforts in Prime. All their efforts? Yes, except when a really important bug needs fixing.

Mathcad (15) documentation states which versions of Excell are supported.

Writing to Excell files of unsupported version is not a bug, but a lack of functionality.

Success!

Luc

Oct 16, 2017
05:32 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 16, 2017
05:32 AM

Hi Luc,

The problem of writing to an Excel file is to the supported file type. Looking for a work around now.

Cheers

Terry

Oct 16, 2017
06:24 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 16, 2017
06:24 AM

Hi,

Enclosed is a MathCad worksheet that simplifies input and calculation of the circuit parameters.

Input takes in all the circuit inputs for one/each circuit into a matrix. One matrix for cable data. Three values epsilon, MVAbase and kVbase.

This is far less cluttered than the way you were doing it. You only need read eight main matrices.

Calculations are done once in the program and just reused.

I have not copied the MathCad results to the spreadsheet. Just wanted to show you a neater way to set out the Mathcad worksheet..

Enclosed is a slightly reworked spreadsheet I just moved a couple of columns around to keep inputs together.

The spreadsheet calculates the results itself. They are not copied from Mathcad.

Cheers

TH

Oct 16, 2017
08:25 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 16, 2017
08:25 AM

Thanks for the help I think the easiest route might be just to make MathCad produce the array then just copy the array into MathCad. Unfortunately now I'm expirencing errors between my co-workers. Has anyone had a problem accessing the excel file from MathCad?

Oct 16, 2017
08:44 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 16, 2017
08:44 AM

Hi,

Final pair. Excel and MathCad.

To stop the formatting from getting changed and to allow auditing of both MathCad and Excel.

Workaround is in the Excel file create a "MathCad Export" worksheet tab. No formats on this worksheet.

On the actual worksheet for the job just set cells equal to corresponding cells on the MathCad Export sheet.

Oct 16, 2017
10:21 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 16, 2017
10:21 AM

Thanks for the hard work! Can you explain how this works so I can use it in the future?

Oct 16, 2017
10:34 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 16, 2017
10:34 AM

Also if you could. Can you transpose this into the orignal file I had? I just need the name to stay the same and also I (my boss) prefers the formatting of the original file.

Oct 16, 2017
06:46 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 16, 2017
06:46 PM

hi,

will help if i can.

better to now take this out of the forum as we have an answer.

terryhendicott at gmail dot com

please be a bit more specific.

it is simple to change the name of the files.

"I (my boss) prefers the formatting of the original file. "

do you mean the original excel, or original mathcad? can you be more specific.

does he prefer the original mathcad because it uses names, the programming in my mathcad sheet can be slightly altered for readability and can use named variables in the program for easier checking. it just makes the program a little longer.

cheers

terry

Oct 17, 2017
03:17 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 17, 2017
03:17 AM

hi

"Can you transpose this into the orignal file I had? I just need the name to stay the same and also I (my boss) prefers the formatting of the original file. "

See enclosed