This guide explains how to import data into Excel using Java REST API that is stored in a list or array in your program. You will learn how to import data into Excel using Java REST Interface with the help of a Java-based Cloud SDK. It will share complete details to control the process by defining the destination of the data in the workbook.
Prerequisite
- Create an account and get API credentials for inserting double array data into an Excel file
- Download Aspose.Cells Cloud SDK for Java to import lists or arrays of numbers to Excel
- Set up a Java project with the above SDK
Steps for Data Import to Excel using Java Low Code API
- Set your client ID, client secret, and base URL to connect to Aspose.Cells Cloud
- Set up the CellsApi object with your credentials for API operations
- Specify the local Excel file that you want to upload and update
- Create an upload request with the file details and send it to Aspose Cloud storage
- Set up the import options to define where and how the double array will be inserted into the worksheet
- Create and execute the PostImportData call to insert the double array data into your specified worksheet
- 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 Java-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 Java RESTful Service
The above code has demonstrated how to import data into an Excel spreadsheet using Java 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 Java REST API.