Split Excel File using C# REST API

This tutorial has guided us to split Excel file using C# REST API. You will learn to automatically split workbook using C# Low Code API based on indexes of the starting and ending sheet in the source workbook. You will learn to set the output file format and range of sheets to be converted to separate Excel files.

Prerequisite

Steps to Split Excel File into Multiple Files using C# REST Interface

  1. Define your clientId, clientSecret, and the API base URL required to authenticate with Aspose.Cells Cloud
  2. Instantiate the CellsApi object using your credentials and API endpoint to access cloud functionalities
  3. Specify the Excel workbook file that will be uploaded and later split
  4. Use the UploadFileRequest to upload the input file to Aspose Cloud
  5. Configure the PostWorkbookSplitRequest to split specific sheets (e.g. from sheets 1 to 4) and define the output format XLSX
  6. Send the split request using PostWorkbookSplit to divide the workbook into multiple parts
  7. Iterate over each resulting document in the response, download the file using DownloadFileRequest, and save it locally

These steps summarize how to separate Excel sheets into different files using C# REST Interface. Authenticate with Aspose.Cells Cloud by providing your client credentials and uploading the target Excel workbook. Configure the split parameters, execute the split operation, and download each resulting file to your local system.

Code to Split Excel into Multiple Files using C# RESTful Service

This code demonstrates an Excel sheet splitter using C# Low Code API. You may set any output format supported by Aspose.Cells Cloud API including the image types where you may set the horizontal and vertical resolutions. Each new file is created with the name of the source sheet and can be saved locally with the same name as shared in the above code.

This article has taught us the process of splitting Excel files. To merge Excel files, refer to the article Combine Excel Files using C# REST API.

 English