Swap Range Data in a Spreadsheet

Exchange data between any two columns, rows, ranges, or individual cells in an Excel file.

Swap Range API

PUT http://api.aspose.cloud/v4.0/cells/swap/range

Request Parameters:

Parameter Name Type Path/Query String/HTTPBody Description
Spreadsheet File FormData Upload the spreadsheet file.
worksheet1 String Query Specify the worksheet that is the source of the exchange data area.
range1 String Query Specify the source for the exchange data.
worksheet2 String Query Specify the worksheet that is the target of the exchange data area.
range2 String Query Specify the target for the exchange data.
outPath String Query (Optional) The folder path where the workbook is stored. The default is null.
outStorageName String Query Output file Storage Name.
region String Query The spreadsheet region setting.
password String Query The password for opening the spreadsheet file.

Response

[
    {
        "Name": "ResponseFile",
        "DataType": {
            "Identifier": "File",
            "Reference": "Stream"
        }
    }
]

Error Codes

  • 400 Bad Request: Invalid Apose.Cells Cloud API URI.
  • 401 Unauthorized: Invalid access token. Or invalid client id and secret.
  • 404 Not Found: The spreadsheet file not accessible.
  • 500 Server Error: The spreadsheet has encountered an anomaly in obtaining calculation data.

Where should we use the Swap Range API?

When you need to swap range data in a spreadsheet, you can use this API.

Why should you use the Swap Range API?

  • Quickly swap range data in an Excel spreadsheet.
  • Development can be quickly completed through the existing SDK.

How to Use the Swap Range API with SDKs

Swap Range API Specification

The Swap Range API Specification defines a publicly accessible programming interface and lets you carry out REST interactions directly from a web browser.

Use Aspose.Cells Cloud SDKs

Using the SDK is the fastest way to develop, as it abstracts away the low-level details, allowing you to swap range with short code. Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.

The following code examples demonstrate how to make calls to Aspose.Cells web services using various SDKs: