Get Conditional Formatting Rules This REST API retrieves the conditional formatting rules that are applied to a worksheet.
Security and Authentication
The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication .
REST API
GET https://api.aspose.cloud/v3.0/cells/{ name} /worksheets/{ sheetName} /conditionalFormattings
Request Parameters
Parameter Name
Type
Location
Description
name
string
path
The name of the Excel file.
sheetName
string
path
The name of the worksheet.
folder
string
query
The folder path where the file is stored.
storageName
string
query
The name of the storage service (optional).
Error Responses
HTTP Code
Reason
Example Body
400
Bad Request – missing or invalid parameters.
{ "Code":"400", "Message":"Invalid parameter value." }
401
Unauthorized – missing or invalid JWT token.
{ "Code":"401", "Message":"Access token is missing or invalid." }
404
Not Found – workbook or worksheet does not exist.
{ "Code":"404", "Message":"File not found." }
500
Internal Server Error – unexpected server failure.
{ "Code":"500", "Message":"An unexpected error occurred." }
The OpenAPI Specification defines a publicly accessible programming interface and lets you carry out REST interactions directly from a web browser.
You can use the cURL command‑line tool to access Aspose.Cells web services easily. The following example shows how to make a call to the Cloud API with cURL.
Request
curl -v "https://api.aspose.cloud/v3.0/cells/Book1.xlsx/worksheets/sheet1/conditionalFormattings" \
-X GET \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer <access_token>"
Response
{
"Status" : "OK" ,
"ConditionalFormattings" : {
"Count" : 1 ,
"ConditionalFormattingList" : [
{
"sqref" : "A1:B10" ,
"FormatConditions" : [
{
"Priority" : 1 ,
"Type" : "CellValue" ,
"Operator" : "GreaterThan" ,
"Formula1" : "100" ,
"Style" : {
"Font" : {
"Color" : { "A" : 255 , "R" : 255 , "G" : 0 , "B" : 0 },
"IsBold" : true
}
}
}
]
}
]
}
}
The example above shows only the most relevant fields to keep the payload concise.
Response Parameters
Parameter
Type
Description
Status
string
Result status of the request (e.g., OK ).
ConditionalFormattings
object
Container for conditional formatting data.
ConditionalFormattings.Count
integer
Number of conditional formatting rules returned.
ConditionalFormattings.ConditionalFormattingList
array
List of conditional formatting objects.
ConditionalFormattingList[].sqref
string
Cell range to which the formatting applies (e.g., A1:B10 ).
ConditionalFormattingList[].FormatConditions
array
Collection of format condition objects for the range.
FormatConditions[].Priority
integer
Evaluation priority of the condition.
FormatConditions[].Type
string
Type of condition (e.g., CellValue ).
FormatConditions[].Operator
string
Operator used for the condition (e.g., GreaterThan ).
FormatConditions[].Formula1
string
First formula or value for the condition.
FormatConditions[].Style
object
Styling applied when the condition is met.
Style.Font.Color
object
RGBA color definition for the font.
Style.Font.IsBold
boolean
Indicates whether the font is bold.
Status Codes
HTTP Code
Description
200
Successful request – returns conditional formatting rules.
202
Accepted – request is being processed (if applicable).
400
Bad Request – missing or invalid parameters.
401
Unauthorized – missing or invalid JWT token.
404
Not Found – workbook or worksheet does not exist.
500
Internal Server Error – unexpected server failure.
Cloud SDK Family
Using an SDK is the best way to speed up 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: