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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

append/excel

payman
13-Aquamarine

append/excel

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Werner_E
24-Ruby V
(To:payman)

Look at the attached sheet.

Guess it should do the job.

View solution in original post

11 REPLIES 11
Werner_E
24-Ruby V
(To:payman)

Lookup WRITEEXCEL in the hep.

MikeArmstrong
5-Regular Member
(To:payman)

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.

Werner_E
24-Ruby V
(To:payman)

WRITEEXCEL supports OpenXML (*.xlsx) files.

Depending on your needs WRITECSV might be an option, too.

payman
13-Aquamarine
(To:Werner_E)

Thank you.

But it overwrites the previously calculated values.

Werner_E
24-Ruby V
(To:payman)

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.

payman
13-Aquamarine
(To:Werner_E)

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.

MikeArmstrong
5-Regular Member
(To:payman)

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.

Werner_E
24-Ruby V
(To:payman)

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.

Werner_E
24-Ruby V
(To:payman)

Look at the attached sheet.

Guess it should do the job.

payman
13-Aquamarine
(To:Werner_E)

Thank you very much Werner, it works.

Rais
1-Newbie
(To:payman)

Link to Excel Inputs


Video Link : 5443

Output to Excel

Video Link : 5445

MathCad/Input file/ppt


Top Tags