Trim content: Fix Excel Spaces & Line Breaks

Excel API : PostTrimContent

The PostTrimContent API processes and trims content within a specified range in a spreadsheet. It removes extra spaces, line breaks, and other unnecessary characters from the content of selected cells, making it useful for cleaning data entries and ensuring consistent spreadsheet formatting.

Interface Details

Endpoint

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

Function Description

  • Efficiency – Trims content only within the designated range, saving time and resources by avoiding unnecessary operations on the entire worksheet.
  • Flexibility – Allows users to define the exact cell range to be processed, accommodating various data sets and requirements.
  • Data Integrity – Removes extra spaces and line breaks, helping maintain consistent and reliable data for analysis and reporting.
  • Ease of Use – Simple integration with minimal setup, suitable for both developers and end‑users.

Request Parameters of postTrimContent API

Parameter Name Type Location Description
trimContentOptions Class Body Options that specify how the content should be trimmed (e.g., target range, trim mode).

Response Description

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

OpenAPI Specification

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

Excel API SDK

Using an SDK is the best way to speed up development. An SDK handles low‑level details, allowing you to 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: