Hello,
My program calculates several series of input data. I want to store all the outputs in an excel file. Is there similar function to "Appendprn" for excel file?
Thank you.
Solved! Go to Solution.
Lookup WRITEEXCEL in the hep.
As Werner said lookup WRITEEXCEL and there are also loads of scripted components in forum which have been developed which do similar.
That's if you are not using Prime.
WRITEEXCEL supports OpenXML (*.xlsx) files.
Depending on your needs WRITECSV might be an option, too.
Thank you.
But it overwrites the previously calculated values.
PAYMAN RAJAI wrote:
Thank you.
But it overwrites the previously calculated values.
No, it doesn't. You decide where the data should be written. An Excel file is not a sequential data file, so there can't be that sort of append. You have to provide some sort of counter to be able to write the data at the correct position.
As an alternative you could read in the whole Excel file with READEXCEL in a Mathcad matrix, stack that matrix on top of the new data and write the new matrix with WRITEEXCEL at position A1.
I am little slow, would you please help me with the attached example?
I have copied just the outputs of my program . The function D, performs series of calculations for each column of "inputdata" function. I need a program that performs calculation for all the columns of "inputdata" and store them preferably in an excel file.
I am a little confused here. I cannot see any calculations performed. As myself and Werner have said above there are numerous ways to pass the data to Excel.
I think you are going to have to explain a little better.
So the output is a 6x5 matrix (including the row headers) all the time?
When the first matrix is written to cell A1, where should the upper left corner of the next matrix be positioned?
At cell A7 or at cell F1 or maybe on a new sheet of the same excel file? Should there be some kind of separator?
As already stated, Excel dats is not sequential, so there are many possibilities and you decide which is the desired one.
Thank you very much Werner, it works.