Add Text to Excel: Efficiently Insert Data with Spreadsheet Web API

Adds text content to a specified location within a spreadsheet. It requires an object that defines the text to be added and the insertion location.

Excel API: PostAddTextContent

POST http://api.aspose.cloud/v3.0/cells/addtext

Security and Authentication

The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.

Function Description

This method safely appends new text to specified cells, supporting multiple insertion modes and format handling.

  • Add text to the beginning of selected cells
    Prepends text to all selected cells, ensuring consistency in your data entry. Ideal for adding common identifiers or labels such as product codes, categories, or prefixes.

  • Insert characters before or after specific text
    Places characters before or after the target text in the selected cells, allowing you to create structured and organized content easily.

  • Append the same text to the end of every selected cell
    Adds identical text to the end of multiple cells in one operation, simplifying data entry and guaranteeing a uniform appearance.

  • Insert text before or after a specified number of characters
    Inserts text after a defined number of characters from the beginning or the end of each cell in the target range. Typical use cases include formatting codes, timestamps, or custom delimiters.

Request Parameter

Parameter Name Type Location Description
addTextOptions Class Body Specifies the text content and the position where the text should be added.

Response

{
  "Filename": "xxxxxx.pdf",
  "FileSize": xxxx,
  "FileContent": "File Content: base64_encoded_string"
}

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 PostAddTextContent API with SDKs

PostAddTextContent API Specification

The OpenAPI 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 an SDK is the most efficient way to accelerate development. An SDK handles low‑level details so you can 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: