Copy data from one file to another

Hi,
I am trying to copy data from a file to another and was wondering if there is a way to do that. I am new to EasyMorph so I am too sure how to get this done and would appreciate some help.

Context:
I am creating a file (let’s say file1.xls in Project1.morph) by performing some calculations.

There is another easymorph project which creates the file I am trying to copy data from - (let’s say file2.xls which is in another easymorph project let’s say Project2.morph)

Additional information:
I have 2 folders where the data is saved before pushing it to the ftp:
Raw Files and
Output Files

Here’s what I am trying to achieve:

  1. create the file - file1.xls
  2. copy data from file2.xls (from Project2.morph) and paste it as a new worksheet in file1.xls (project1,morph) and rename that worksheet file2.xls
  3. export the file - file1.xls (so this file will have 2 worksheets - file1 and file2) and upload it to a location on FTP.

Here’s what I have done so far:

  1. create the file - file1.xls in table 1 (export it to the output files folder)
  2. export the file again - this time using the ‘create new worksheet’ option - export it to the Output files folder
  3. Derive a table from (project 1) table 1 - and use call/iterate action (didn’t work)

I am stuck at this point as I am not really sure how to add data from the entire file/tab/worksheet (file2.xls) to this file I am trying to create (file1.xls).

Can someone please help?

Thank you
R

Hi @RRB,

Can you please clarify if both Project1.morph and Project2.morph always executed simultaneously or there can be cases when Project2.morph is executed independently from Project1.morph and Project1.morph should use data, stored in the file2.xls, instead of executing Project2.morph one more time?

Hi andrew,

Thank you for replying.

Both the projects 1 and 2 are scheduled to run in the morning, one at 7 am and the other at 7:10 am. Both are run independently and are not connected whatsoever, as both generate different set of files, except for that one file run in Project 2. morph which I need to copy to project 1. morph file 1.

Yes, I want Project 1.morph to just use the file2.xls (there is only 1 sheet in this file) and copy all data from this sheet to the file created by Project 1.morph i.e., file1.xls (which has 2 sheets - I want file2.xls data to be copied to the new sheet created in file1.xls).

Once again thank you so much for trying to help. I really appreciate it.

R

Then you should just export the file2.xls in the Project1.morph and add the second “Export into Excel file” action" with the Mode set to “Create new sheet in existing file”. The second export should should be synchronized with the first export completion.

Hers is an example project:

Append Excel sheet.zip (11.3 KB)

Oh alright, I’ll try that and let you know how it goes.

Thank you so much. Really appreciate your help :slightly_smiling_face:

R

Hi,

Apologies for responding to this so late.

I have tried it and it worked perfectly as I wanted.

Thank you once again :slight_smile:

R