Import Double Array into Excel Worksheet
This REST API imports double‑array data into an Excel worksheet.
You send an HTTP request with multipart content (see RFC 2046 or RFC 1341).
The first part of the multipart body contains the ImportDoubleArrayOption data and the second part contains the data file.
REST API
POST https://api.aspose.cloud/v3.0/cells/import
POST https://api.aspose.cloud/v3.0/cells/{name}/importdata
Request Parameters
ImportDoubleArrayOption
| Parameter Name | Type | Description |
|---|---|---|
| FirstRow | int | Zero‑based index of the first row where the data will be placed. |
| FirstColumn | int | Zero‑based index of the first column where the data will be placed. |
| IsVertical | boolean | true / false – determines whether the array is inserted vertically (true) or horizontally (false). |
| Data | Double[] | Array of double values to import. |
| DestinationWorksheet | string | Name of the target worksheet. |
| IsInsert | boolean | true / false – if true, data is inserted; if false, existing cells are overwritten. |
| ImportDataType | string | Type of data being imported (e.g., IntArray, DoubleArray, StringArray, TwoDimensionIntArray). |
| Source | FileSource | Specifies the data file location when the BatchData parameter is null. |
Example (XML)
<ImportDoubleArrayOption>
<DestinationWorksheet>Sheet1</DestinationWorksheet>
<IsInsert>false</IsInsert>
<ImportDataType>DoubleArray</ImportDataType>
<FirstRow>1</FirstRow>
<FirstColumn>1</FirstColumn>
<IsVertical>true</IsVertical>
<Data>1.99,1.9,2.0</Data>
<Source>
<FileSourceType>CloudFileSystem</FileSourceType>
<FilePath>Array_double_xml.txt</FilePath>
</Source>
</ImportDoubleArrayOption>
Example (JSON)
{
"Data": [1.99, 1.9, 2.0],
"DestinationWorksheet": "Sheet1",
"FirstRow": 0,
"FirstColumn": 0,
"IsVertical": false,
"IsInsert": true,
"ImportDataType": "DoubleArray"
}
Response
A successful request returns HTTP 200 with a JSON payload similar to:
{
"Code": 200,
"Status": "OK",
"Message": "Import completed successfully.",
"Data": {
"Worksheet": "Sheet1",
"FirstRow": 0,
"FirstColumn": 0
}
}
Possible status codes:
| Code | Meaning |
|---|---|
| 200 | Import succeeded |
| 400 | Bad request – missing or invalid data |
| 401 | Unauthorized – invalid or missing token |
| 500 | Internal server error |
Error Handling
When an error occurs the API returns a JSON object containing the error code and a descriptive message. Example for an unauthorized request:
{
"Code": 401,
"Status": "Error",
"Message": "Access token is missing or invalid."
}
Handle errors by checking the HTTP status code and parsing the Message field for details.
Cloud SDK Family
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: