Aspose.Cells Trim Content API – Remove Spaces & Line Breaks from Excel
Excel Web 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.
POST https://api.aspose.cloud/v3.0/cells/trimcontent
Security and Authentication
The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.
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
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| trimContentOptions | Class | Body | Options that specify how the content should be trimmed (e.g., target range, trim mode). |
Response
{
"Status" : "OK",
"Code" : 200,
"Filename" : "[merged filename]",
"Filesize" : [file size],
"FileContent" : "[Base64String]"
}
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 PostRemoveCharacters API with SDKs
PostRemoveCharacters 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 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:
Last updated: 2026-03-30