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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

WRITECSV not working

TU
1-Newbie
1-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
MagnusEklund
11-Garnet
(To:TU)

Just switch the two arguments and it works.

Regards,

Magnus

View solution in original post

7 REPLIES 7
StuartBruff
23-Emerald II
(To:TU)

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

MikeArmstrong
5-Regular Member
(To:TU)

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

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

MikeArmstrong
5-Regular Member
(To:StuartBruff)

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

MagnusEklund
11-Garnet
(To:TU)

Just switch the two arguments and it works.

Regards,

Magnus

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

MikeArmstrong
5-Regular Member
(To:MagnusEklund)

Just switch the two arguments and it works.

Just like magic

Mike

Top Tags