Combine Excel files Online

Combine Excel files | Merge Excel using C# .NET Cloud SDK

Merging data distributed in queued Excel files is a frequently faced task. This article discusses advanced features for merging Excel documents through the .NET REST API. The architecture of the API is RESTful, allowing cloud-based operations and avoiding the need for direct installation on individual systems.

REST API to Merge Excel Files

Use Aspose.Cells Cloud SDK for .NET to seamlessly and efficiently merge Excel files into one. This powerful API simplifies the merging process, allowing developers to leverage the power of Aspose.Cells to simplify data manipulation. Additionally, this approach not only simplifies the conversion process but also ensures the accuracy and reliability of the entire merging process. Provides powerful solutions for enhanced data management workflows.

When conducting report integration, market research, event registration, financial reconciliation, and academic research, there will be a large number of excel files. By using this API, the data can be quickly integrated for viewing and analysis.

Now, in order to use the SDK, please search Aspose.Cells-Cloud in NuGet packages manager and click the Add Package button. This will add the SDK reference in your project. The next important step is to obtain your client credentials from cloud dashboard. If you do not have an existing account, simply create a free account by following the instructions specified in the quick start article.

Merge Excel Files in C# .NET

The following sections describe how to programmatically merge Excel files using C# .NET.

CellsApi cellsInstance = new CellsApi(clientID, clientSecret);

Create an object of CellsApi class where we pass client credentials as arguments.

cellsInstance.UploadFile(dictionary.Key, dictionary.Value);

Read the input Excel files and upload to cloud storage.

Aspose.Cells.Cloud.SDK.Model.FilesResult filesResult = lightCellsApi.PostMerge(mapFiles, "xls", false);

Call the API to merge Excel workbooks. Then upload the merged Excel to cloud storage.

Combine Excel

Image1:- Merge Excel

The input Excel workbooks used in above example can be downloaded from:

Merge Excel Files using cURL Commands

Aspose.Cells Cloud is an enhanced API for Excel operations that integrates seamlessly with cURL to provide you with a versatile solution for merging Excel files. By interacting with the Aspose.Cells Cloud API using cURL commands, you can initiate the merge process in a simple and scalable way. Additionally, it brings the benefits of a cloud-based architecture, ensuring scalability and reducing dependence on local resources.

The first step in this method is to generate a JWT access token using the following command:

curl -v "https://api.aspose.cloud/connect/token" \
 -X POST \
 -d "grant_type=client_credentials&client_id=921363a8-b195-426c-85f7-7d458b112383&client_secret=2bf81fca2f3ca1790e405c904b94d233" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Accept: application/json"

Now that we have the JWT token, we need to execute the following command to merge the Excel files.

curl -v "https://api.aspose.cloud/v3.0/cells/{inputFile1}/merge?mergeWith={inputFile2}" \
-X POST \
-H "accept: application/json" \
-H "authorization: Bearer {accessToken}" \
-d {}

Conclusion

In summary, the dynamic environment for data merging offers two powerful ways to merge multiple Excel files, using the feature-rich Aspose.Cells Cloud SDK for .NET and the scriptable efficiency of cURL commands. Whether you choose the comprehensive toolkit and granular control provided by Aspose.Cells Cloud SDK, or the simplicity and cross-platform compatibility of cURL commands. Nonetheless, both methods can merge Excel files.

Please visit the following links to learn more about: