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?
Page 1 / 1
Hi
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:
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
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.