Import 2 Dimension Integer Array into Excel Worksheet
This REST API imports a two‑dimensional integer array into an Excel worksheet.
The request is an HTTP request with multipart content (see RFC 2046 or RFC 1341). The first part of the multipart content contains the Import2DimensionIntegerArrayOption data and the second part contains the data file.
The important parameters are described in the following table:
REST API
POST https://api.aspose.cloud/v3.0/cells/import
POST https://api.aspose.cloud/v3.0/cells/{name}/importdata
Security and Authentication
The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.
Import2DimensionIntegerArrayOption
| Parameter Name | Type | Description |
|---|---|---|
| FirstRow | int | The 1‑based index of the first row where the data will be placed. |
| FirstColumn | int | The 1‑based index of the first column where the data will be placed. |
| Data | Integer[,] | Two‑dimensional integer array containing the values to import. |
| DestinationWorksheet | string | Name of the destination worksheet. |
| IsInsert | string | "true" to insert the data (shifting existing cells), "false" to overwrite existing cells. |
| ImportDataType | string | Specifies the data format. Supported values: IntArray, DoubleArray, StringArray, TwoDimensionIntArray, TwoDimensionDoubleArray, TwoDimensionStringArray, BatchData, csvData. |
| Source | FileSource | Indicates the data file location when the BatchData parameter is null. |
Example
{
"Data": [
[1, 2],
[3, 4]
],
"DestinationWorksheet": "Sheet2",
"FirstRow": 4,
"FirstColumn": 1,
"ImportDataType": "TwoDimensionIntArray"
}
Response
{
"Status":"OK",
"Code":200
}
Http Status Codes
| Code | Meaning | Description |
|---|---|---|
| 200 | OK | Compression succeeded; response contains compressed file details. |
| 400 | Bad Request | Missing or invalid parameters (e.g., unsupported file type). |
| 401 | Unauthorized | Invalid or missing JWT token. |
| 413 | Payload Too Large | Uploaded file exceeds size limit. |
| 500 | Internal Server Error | Unexpected server error. |
How to Use the PostImportData API with SDKs
PostImportData API Specification
The OpenAPI Specification defines a publicly accessible programming interface that allows you to perform REST interactions directly from a web browser.
Use Aspose.Cells Cloud SDKs
Using an SDK is the best way to speed up development. An SDK handles low‑level details and lets you focus on your project tasks. Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.
The following code examples demonstrate how to call Aspose.Cells web services using various SDKs: