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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

WRITEEXCEL function

FC_10037391
9-Granite

WRITEEXCEL function

I’m currently working on a worksheet in Mathcad Prime 9.0 where I’m evaluating several functions that generate around 100 rows of values each. I have three different functions, and I need to send these values into an Excel file so that they are neatly aligned across columns. Specifically:

  • I’d like the results from the first function, f(a), to begin at cell A1 in Excel.
  • The results from the second function, f(b)  should start at cell B1
  • Similarly, the results from the third function, f(c), should start at cell C1.

I’m trying to figure out how I can use the "Write Excel" function in Mathcad to send these values across the respective columns in the same sheet.

Due to the nature of the data, I’m unable to share my worksheet directly, but I would greatly appreciate a sample example or any guidance that can help me achieve this

Cheers,

Frank

2 REPLIES 2
ttokoro
20-Turquoise
(To:FC_10037391)

image.pngimage.pngimage.pngimage.pngimage.pngimage.pngimage.pngimage.pngimage.png

Werner_E
25-Diamond I
(To:FC_10037391)

So you already have set up your worksheet so that you have three vectors (one column n x 1 matrices) generated.

Are these vectors all of equal length?

 

If they are of equal length n, you could use the "augment" function to combine them to a n x 3 matrix and write this matrix in one go to your Excel sheet.

 

Otherwise you have to use WRITEEXCEL  three times in a row and use the optional 'range' argument (at least for the second and third column) to position the data where you want it to be.

 

BTW, you could set up a small demo worksheet with dummy functions and data to demonstrate what you are looking for and show where you failed. You sure  know about the WRITEEXCEL function and had looked up its syntax in the help and saw the ability to position the data at will. So where did you experience problems?

 

The attached Prime 9 sheet may be of help

 

Announcements

Top Tags