Guide for VB.NET
Core Document Formats
Additional Features

VB.NET Excel - How to Merge Excel Files

Merge Excel Files and Save to Memory/File with Excel Processing SDK in VB.NET

Home > .NET Imaging SDK > VB.NET > Merge Excel Documents
To get started with DocImage SDK for .NET, you are supposed to read VB.NET Imaging: Get Started first!

Have you ever been stuck when you need to combine and merge two or more MS Excel files into a single one in order to store data at one place? What's worse, the bunch of documents you have to combine, 1.xlsx, 2.xlsx, 3.xlsx... may consist of multiple spreadsheets. So, under such situation, you have to look for such Excel merging software that is easy to use to solve this problem. Then, this is your best choice - RasterEdge .NET Excel Merger and Combiner for VB.NET. It will handle your Excel files combining problem from aspects below:
Related .net document control helps: mvc pdf editor control: ASP.NET MVC PDF Viewer & Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC
document viewer c#: ASP.NET Document Viewer using C#: Open, View, Annotate, Redact, Convert document files in ASP.NET using C#, HTML5, JQuer... edit pdf text control: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET image viewer jquery: ASP.NET Image Viewer Control(MVC & WebForms): view, annotate, redact, convert image files in html, JQuery
powerpoint viewer mvc: ASP.NET PowerPoint Document Viewer Control (MVC & WebForms): view ppt, pptx files online in C# using ASP.NET annotate pdf control: ASP.NET Annotate PDF Control: annotate, comment, markup PDF document online using ASP.NET C# dicom web viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET
  • What can this VB.NET Excel files merging application do? And why should I select it?
  • Is it necessary to program the Excel combing methods with VB class by myself? Or can you offer some free APIs?
  • If I want to combine a list of Excel documents into one and save the created Excel file into memory, what should I do within the .NET Framework - VB.NET?
  • How can I achieve the goal of merging tons of Excel documents and save the new Excel file to local file?
Excel Files Merger
This outstanding and market-leading Excel documents merging tool of RasterEdge .NET Imaging SDK is perfectly compliant with VB.NET program in any Visual Studio (2005, 2008, 2010 & 2012) or .NET Framework (2.0, 3.0, 3.5, 4.0 & 4.5) version.
It has been designated to merge two or multiple Excel files at a time with high speed and high performance within VB.NET project. Generally speaking, we can classify its functions into two modes: combining two or a list of Excel documents into a new one and saving it to memory stream by using VB demo API and merging many Excel files whether in sing-page or multi-page mode and storing the created Excel document into local file with a user-defined name using sample VB.NET code.
In addition, this .NET Excel document merger for VB.NET is still well known for its user-friendly feature. That is to say, no matter you are not computer savvy or technical developers, you can use this Excel file handling application with relative ease, and no extra cost.
Apart from this VB.NET Excel files combiner, users still can see the related tutorial articles on: VB.NET Excel sheet processing tool of Excel document SDK for VB.NET.
Sample Combining APIs
In this part, we give the comprehensive Excel files merging & combining and saving APIs and methods in VB class. After finishing the Excel combination, users can save and store the merged new Excel document in the way of memory stream or local file. Furthermore, the saving file path is completely user-specified with the simplest VB code.
Private Sub Combine(source As List(Of BaseDocument), destn As Stream) Implements XLSXDocument.Combine
End Sub
Private Sub Combine(source As List(Of BaseDocument), destn As [String]) Implements XLSXDocument.Combine
End Sub
Private Sub Combine(source As List(Of [String]), destn As Stream) Implements XLSXDocument.Combine
End Sub
Private Sub Combine(source As List(Of [String]), destn As [String]) Implements XLSXDocument.Combine
End Sub
Simple and vital explanations for above methods:
  • XLSXDocument: the abstraction object of Excel file in VB.NET project memory. It consists of all the virtual Excel documentation properties represented in the form of XLSXPage.
  • BaseDocument: the high level of all RasterEdge documents applications, including XLSXDocument, PDFDocument, TIFFDocument, WordDocument and PPTXDocument.
Codes Demos
The whole sample codes for Excel documents merging and combining are divided into two parts: VB demo code for combining two or more Excel files into one and save to memory steam in high efficiency and VB example code to merge a list of Excel .xlsx files and save to Excel document in local file. Note: C# demo codes for Excel merging is still offered.

Combine Excel Files and Save to Memory

Please refer to following VB sample code to combine a number of Excel files into one to summarize the data source and save the created new Excel document in memory stream form.
''' <summary>
''' Combine a list of Excel documents into a single one and save it to stream
''' </summary>
''' <param name="s"></param>
''' <param name="docList"></param>
Public Sub CombineDocumentsToStream(s As MemoryStream, docList As List(Of BaseDocument))

XLSXDocument.Combine(docList, s)

End Sub

Merge Excel Files and Save to File

Apart from the way of memory storage, users are also able to save the combined new Excel document to PC local file with a user-customized file name for better further searching with VB.NET demo code below.
''' <summary>
''' Combine a list of Excel documents into a single one and save it to file
''' </summary>
''' <param name="s"></param>
''' <param name="docList"></param>
Public Sub CombineDocumentAndSaveItToFile(filePath As [String], docList As List(Of [String]))

XLSXDocument.Combine(docList, filePath)

End Sub

Recommend this to Google+ is professional provider of ASP.NET MVC Document Viewer, ASP.NET PDF Viewer, MVC PDF Viewer document, content and imaging solutions, available for ASP.NET AJAX, Silverlight, Windows Forms as well as WPF. We are dedicated to provide powerful & profession imaging controls, PDF document, image to pdf files and components for capturing, viewing, processing, converting, compressing and stroing images, documents and more.

©2000-2017 Raster