Import Data into Excel using C# REST Interface

This guide explains how to import data into Excel using C# REST API that is stored in a list or array in your program. You will learn how to import data into Excel using C# REST Interface with the help of a .NET-based Cloud SDK. It will share complete details to control the process by defining the destination of the data in the workbook.

Prerequisite

Steps for Data Import to Excel using C# Low Code API

  1. Set your client ID, client secret, and base URL to connect to Aspose.Cells Cloud
  2. Set up the CellsApi object with your credentials for API operations
  3. Specify the local Excel file that you want to upload and update
  4. Create an upload request with the file details and send it to Aspose Cloud storage
  5. Set up the import options to define where and how the double array will be inserted into the worksheet
  6. Create and execute the PostImportData call to insert the double array data into your specified worksheet
  7. Request and download the modified Excel file from the cloud to your system and save it on the disk

These steps summarize the process of data import in Excel using C# .NET-based API. First, you connect to Aspose Cloud, upload your Excel file, and set up how and where your double array data should be added. Once the data is imported using the PostImportData API call, simply download the updated file and save it to your computer.

Code to Automatically Import Data into Excel using C# RESTful Service

The above code has demonstrated how to import data into an Excel spreadsheet using C# REST Interface. You have the liberty to select the worksheet, starting cell, import data type, and data orientation, i.e. horizontal or vertical. Note that IsInsert is required for inserting the data into the sheet.

This article has taught us how to import a list or array of data into an Excel file. To import a CSV data file into an Excel file, refer to the article Import CSV to XLSX using C# REST API.

 English