Skip to content

Instantly share code, notes, and snippets.

@groupdocs-com-kb
Last active March 7, 2024 10:50
Show Gist options
  • Save groupdocs-com-kb/32cf78db8342099a6c8432cce73608ab to your computer and use it in GitHub Desktop.
Save groupdocs-com-kb/32cf78db8342099a6c8432cce73608ab to your computer and use it in GitHub Desktop.
Merge XLSX Files using C#. For more information, please follow link: https://kb.groupdocs.com/merger/net/merge-xlsx-files-using-csharp/
using GroupDocs.Merger;
namespace MergeXLSXFilesUsingCSharp
{
internal class Program
{
static void Main(string[] args)
{
// Set License to avoid the limitations of Merger library
License lic = new License();
lic.SetLicense(@"GroupDocs.Merger.lic");
// Load the source XLSX file
using (Merger merger = new Merger(@"sample1.xlsx"))
{
// Add another XLSX file to merge
merger.Join(@"sample2.xlsx");
// Merge XLSX files and save result
merger.Save(@"merged.xlsx");
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment