Forum Discussion
How to combine two Excel spreadsheets into one Sheet, side-by-side in C#?
Hello,
it's hard to answer your question without seeing the structure of the two workbooks and the desired result of the merge.
Excel has Power Query as a free add-in for 2010 and 2013, called Get and Transform in Excel 2016. It is easy to use Power Query to merge files. You don't need code, no C# or Visual Studio, just a good understanding of the logic you want to apply and the ability to click icons in the ribbon.
If you can share some sample files and the desired merge result, things can be arranged.
- Mamidre TomoeAug 16, 2017Copper Contributor
Hi,
Attached are two example documents that I want to merge (example excel has the two documents I want to merge. Note that the two examples would be different Excel files.), the result I got (actual result) and the result that I want (desired result).
I am aware of Power Query, but I have to do everything in Visual Studio C# as I need to generate the merged document with a button click on the Windows Form which will also convert the merged document into a Word document at the same time. This is therefore the reason why I am not using Power Query, and using Visual Studio C# instead.