Skip to main content
Question

copy excel file

  • September 13, 2023
  • 1 reply
  • 49 views

Forum|alt.badge.img+3

Hello, I am copying information from some Excel files to another one. How do I make sure that this new Excel file contains the headers from the others?

LoganPrice
Most Valuable Pathfinder
Forum|alt.badge.img+12
  • Most Valuable Pathfinder
  • September 15, 2023

Hi @luis.espeleta,

 

Here is a simple way of copying a table from one Excel file to a new Excel file while preserving the headers:

 

Code:

 

Original workbook:

Original table in original workbook


New workbook:

New table in new workbook

This is the easiest way of copying a table over to a new workbook that I can think of.

 

You could also do this another way. If you open an Excel file and deselect “Sheet contains a header”, you can then loop “For each row in worksheet” and copy the table line by line to the new excel workbook. This will grab the header row as well because you unchecked “Sheet contains a header” so the row will be treated as any other row.

 

Please let me know if this helps you.

 

Thanks,

Logan P.

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings