Preserve format type when Merge data from two excel files

Good afternoon friends:

One question please, could you tell me how I could maintain the original format of the data that I want to add from one excel file to another.

I turned on the keep formatting options, but it didn’t work. The format in the first column is changed, it lacks a leading zero, in addition the date format changes.

Thanks a lot

Merge two (71.8 KB)

Thanks a lot

Hey, @Lynx !! Try this simple approach!! In your result sheet, format the entire column as desired format!

I put column A and E as Text type, and got your expected output!

Let me know if it helped you!!

The problem is that it is an automatic process and every day there are new files.

The date format changes quite badly for me, for example when the original says February 08, 2022 (02/08/2022), after the merger the date remains August 02, 2022 (08/02/2022). I would like the original format to be preserved.

Hey, @Lynx! It’s not a problem, bro! Let’s build a walkthrough the solution!

Step 1 - Create an “Input” folder. This folder will contain an empty template sheet, with the columns formatted correctly.

Column A and E formated as Text.

Step 2 - Create an “Output” folder. This folder will contain the result of the merge between the tables. It doesn’t need to contain anything inside beforehand.

Step 3 - At the beginning of your code make a copy of the “Template” sheet in “Input” to the “Output” folder.

Step 4 - Just change the end of your .xaml. Instead of writing the result in the merge in the worksheet “book_two” write it in the worksheet “Result” in the folder “Output”.

Final Result:

1 Like

@gabrielribas4 Thank you very much

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.