Managing Sheet with APIs

SheetAPI.setCondition



setCondition( hd, coord, cdtName, config )

SheetAPI.setCondition method is used to insert condition to the existing sheet.

Parameters The handle information of the Sheet application your created. The specific array list to be applied condition.
[[sheetId, x1, y1, x2, y2]]
which define a list of sheetId and a range of cells need to be added condition.

The condition name to be applied. Should be one of the following item: boolstyle, colorbar, colorgrad, iconset

The configuration information for the above condition.

Example code to insert number condition


SHEET_API.setCondition(SHEET_API_HD, [[1, 25, 3, 27, 5]], 'boolstyle', {
     type:"greater",
     base:"150",
     style:{"cbgc":"rgb(248,105,107)","ccolor":"rgb(150,0,0)"} 
});
    
See Number compare condition for more detail information.

Example code to insert string condition


 SHEET_API.setCondition(SHEET_API_HD, [[1, 25, 3, 27, 5]], 'boolstyle', {
     type:"include",
     base:"test",
     style:{"cbgc":"rgb(248,105,107)","ccolor":"rgb(150,0,0)"} 
});
    
See String compare condition for more detail information.

Example code to insert date condition


 SHEET_API.setCondition(SHEET_API_HD, [[1, 25, 3, 27, 5]], 'boolstyle', {
     type:"date",
     base: 0,
     style:{"cbgc":"rgb(248,105,107)","ccolor":"rgb(150,0,0)"} 
});
    
See Date compare condition for more detail information.

Example code to insert top/bottom condition


SHEET_API.setCondition(SHEET_API_HD, [[1, 25, 3, 27, 5]], 'boolstyle', {
     type:"max",
     base: 10,
     style:{"cbgc":"rgb(248,105,107)","ccolor":"rgb(150,0,0)"} 
});
    
See Calculate condition for more detail information.

Example code to insert colorbar condition


SHEET_API.setCondition(SHEET_API_HD, [[1, 3, 3, 5, 3]], 'colorbar', {
    neg: "rgb(255,127,0)",
    pos: "rgb(0,128,255)"
});
    
See Date bar condition for more detail information.

 

 


Copyright © FeyaSoft Inc. All rights reserved.