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

WRITECSV not working

SOLVED
TU
Newbie
Newbie

WRITECSV not working

I have MathCAD version 15.0 and the new WRITECSV function does not appear to work. I made a simple matrix (M) and tried to write the file using WRITECSV("data.csv",M) and I get the error "this value must be a string" on the M. I tried changing M to "M" and then I get the error "The seond parameter must be a matrix", which I expect since, yes, M is supposed to be a matrix but WRITECSV doesn't accept a matrix! What's wrong? Has anyone else had this problem?

writecsv1.JPG

1 ACCEPTED SOLUTION

Accepted Solutions

Re: WRITECSV not working

Just switch the two arguments and it works.

Regards,

Magnus

View solution in original post

7 REPLIES 7

Re: WRITECSV not working

Todd Umstot wrote:

I have MathCAD version 15.0 and the new WRITECSV function does not appear to work. I made a simple matrix (M) and tried to write the file using WRITECSV("data.csv",M) and I get the error "this value must be a string" on the M. I tried changing M to "M" and then I get the error "The seond parameter must be a matrix", which I expect since, yes, M is supposed to be a matrix but WRITECSV doesn't accept a matrix! What's wrong? Has anyone else had this problem?

Yes. I see the problem as well.

Stuart

Re: WRITECSV not working

This seems to be a bug.

In the help pages it says M is a matrix of values to write to the specified file for a WRITECSV function, but it says M is a matrix of scalars for the WRITEEXCEL function, does anyone know the difference?

Mike

Re: WRITECSV not working

Mike Armstrong wrote:

This seems to be a bug.

In the help pages it says M is a matrix of values to write to the specified file for a WRITECSV function, but it says M is a matrix of scalars for the WRITEEXCEL function, does anyone know the difference?

Mike

Seeing as the CSV doesn't appear to work, Mike, there is no way of telling by experimentation!

However, I'm guessing that (for some strange reason), the csv should allow strings in M but the xlsx doesn't permit anything but a number (scalar in Mathcad terms) ... except that 'scalar' in Mathcad should include complex numbers and WRITEEXCEL doesn't seem to allow that, so just reals.

Stuart

Re: WRITECSV not working

Seeing as the CSV doesn't appear to work, Mike, there is no way of telling by experimentation!

However, I'm guessing that (for some strange reason), the csv should allow strings in M but the xlsx doesn't permit anything but a number (scalar in Mathcad terms) ... except that 'scalar' in Mathcad should include complex numbers and WRITEEXCEL doesn't seem to allow that, so just reals.

Before spending a little time on this forum I struggled to come to terms with Mathcad terminology.

I have just searched through the help files and there doesn't seem to be anything in there to help. How is a new user meant to know the difference between scalars, values ect?

Mike

Re: WRITECSV not working

Just switch the two arguments and it works.

Regards,

Magnus

View solution in original post

Re: WRITECSV not working

Magnus Eklund wrote:

Just switch the two arguments and it works.

Regards,

Magnus

Ah. Documentation error and it should have been in line with the WRITEEXCEL arg list.

And another doc error ... WRITEEXCEL will write strings.

Stuart

Re: WRITECSV not working

Just switch the two arguments and it works.

Just like magic

Mike

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."