gc.spread.sheets.d.ts 1.7 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913
  1. declare module GC{
  2. module Spread{
  3. module CalcEngine{
  4. /**
  5. * Represents the expression type
  6. * @enum {number}
  7. */
  8. export enum ExpressionType{
  9. /**
  10. * Specifies the unknow type
  11. */
  12. unknow= 0,
  13. /**
  14. * Specifies the reference type
  15. */
  16. reference= 1,
  17. /**
  18. * Specifies the number type
  19. */
  20. number= 2,
  21. /**
  22. * Specifies the string type
  23. */
  24. string= 3,
  25. /**
  26. * Specifies the boolean type
  27. */
  28. boolean= 4,
  29. /**
  30. * Specifies the error type
  31. */
  32. error= 5,
  33. /**
  34. * Specifies the array type
  35. */
  36. array= 6,
  37. /**
  38. * Specifies the function type
  39. */
  40. function= 7,
  41. /**
  42. * Specifies the name type
  43. */
  44. name= 8,
  45. /**
  46. * Specifies the operator type
  47. */
  48. operator= 9,
  49. /**
  50. * Specifies the parenthesses type
  51. */
  52. parentheses= 10,
  53. /**
  54. * Specifies the missing argument type
  55. */
  56. missingArgument= 11,
  57. /**
  58. * Specifies the expand type
  59. */
  60. expand= 12,
  61. /**
  62. * Specifies the struct reference type
  63. */
  64. structReference= 13,
  65. /**
  66. * Specifies the spill reference type
  67. */
  68. spillReference= 33
  69. }
  70. export class AsyncEvaluateContext{
  71. /**
  72. * Represents an evaluate context for async functions.
  73. * @class
  74. * @param {Object} context The common evaluate context.
  75. */
  76. constructor(context: any);
  77. /**
  78. * Set the async function evaluate result to CalcEngine, CalcEngine uses this value to recalculate the cell that contains this async function and all dependents cells.
  79. * @param {Object} value The async function evaluate result.
  80. */
  81. setAsyncResult(value: any): void;
  82. }
  83. export class CalcError{
  84. /**
  85. * Represents an error in calculation.
  86. * @class
  87. * @param {string} error The description of the error.
  88. */
  89. constructor(error: string);
  90. /**
  91. * Parses the specified error from the string.
  92. * @param {string} value The error string.
  93. * @returns {GC.Spread.CalcEngine.CalcError} The calculation error.
  94. */
  95. static parse(value: string): GC.Spread.CalcEngine.CalcError;
  96. /**
  97. * Returns a string that represents this instance.
  98. * @returns {string} The error string.
  99. */
  100. toString(): string;
  101. }
  102. export class Expression{
  103. /**
  104. * Provides the base class from which the classes that represent expression tree nodes are derived. This is an abstract class.
  105. * @class
  106. */
  107. constructor(type: GC.Spread.CalcEngine.ExpressionType);
  108. /**
  109. * Indicates the expression type
  110. * @type {GC.Spread.CalcEngine.ExpressionType}
  111. */
  112. type: GC.Spread.CalcEngine.ExpressionType;
  113. }
  114. module Functions{
  115. /**
  116. * Defines a global custom function.
  117. * @param {string} name The name of the function.
  118. * @param {GC.Spread.CalcEngine.Functions.Function} fn The function to add.
  119. */
  120. function defineGlobalCustomFunction(name: string, fn: GC.Spread.CalcEngine.Functions.Function): GC.Spread.CalcEngine.Functions.Function;
  121. /**
  122. * Gets all of the global functions or one global function that specified by name.
  123. * @param {string} name The name of the function.
  124. * @returns {GC.Spread.CalcEngine.Functions.Function} If the name is empty, return all of the global functions, otherwise, return one function with the specified name.
  125. */
  126. function findGlobalFunction(name?: string): any;
  127. /**
  128. * If the name is empty, remove all of the global functions, otherwise, remove one function with the specified name.
  129. * @param {string} name The name of the function.
  130. */
  131. function removeGlobalFunction(name?: string): void;
  132. export interface IFunctionDescription{
  133. description: string;
  134. parameters: GC.Spread.CalcEngine.Functions.IParameterDescription[];
  135. }
  136. export interface IParameterDescription{
  137. name: string;
  138. repeatable?: boolean;
  139. optional?: boolean;
  140. }
  141. /**
  142. * Represents the asynchronous function evaluate mode.
  143. * @enum {number}
  144. */
  145. export enum AsyncFunctionEvaluateMode{
  146. /**
  147. * enum value is 0, Specifies that the async function evaluates the changed, referenced cells.
  148. */
  149. onRecalculation= 0,
  150. /**
  151. * enum value is 1, Specifies that the async function only evaluates once.
  152. */
  153. calculateOnce= 1,
  154. /**
  155. * enum value is 2, Specifies that the async function evaluates based on the interval.
  156. */
  157. onInterval= 2
  158. }
  159. export class AsyncFunction{
  160. /**
  161. * Represents an abstract base class for defining asynchronization functions.
  162. * @class
  163. * @param {string} name The name of the function.
  164. * @param {number} minArgs The minimum number of arguments for the function.
  165. * @param {number} maxArgs The maximum number of arguments for the function.
  166. * @param {Object} description The description of the function.
  167. */
  168. constructor(name: string, minArgs: number, maxArgs: number, description: GC.Spread.CalcEngine.Functions.IFunctionDescription);
  169. /**
  170. * Returns the default value of the evaluated function result before getting the async result.
  171. * @returns {Object} The default value of the evaluated function result before getting the async result.
  172. */
  173. defaultValue(): any;
  174. /**
  175. * Returns the result of the function applied to the arguments.
  176. * @param {GC.Spread.CalcEngine.AsyncEvaluateContext} context The evaluate context
  177. * @param {Object} args Arguments for the function evaluation
  178. * @returns {Object} The result of the function applied to the arguments.
  179. */
  180. evaluateAsync(context: GC.Spread.CalcEngine.AsyncEvaluateContext, args: any): any;
  181. /**
  182. * Decides how to re-calculate the formula.
  183. * @returns {GC.Spread.CalcEngine.Functions.AsyncFunctionEvaluateMode} The evaluate mode.
  184. */
  185. evaluateMode(): GC.Spread.CalcEngine.Functions.AsyncFunctionEvaluateMode;
  186. /**
  187. * Returns the interval.
  188. * @returns {number} The interval in milliseconds.
  189. */
  190. interval(): number;
  191. }
  192. export class Function{
  193. /**
  194. * Represents an abstract base class for defining functions.
  195. * @class
  196. * @param {string} name The name of the function.
  197. * @param {number} minArgs The minimum number of arguments for the function.
  198. * @param {number} maxArgs The maximum number of arguments for the function.
  199. * @param {Object} functionDescription The description object of the function.
  200. * @param {string} [functionDescription.description] - The description of the function.
  201. * @param {Array.<Object>} [functionDescription.parameter] - The parameters' description array of the function.
  202. * @param {string} functionDescription.parameter.name - The parameter name..
  203. * @param {boolean} [functionDescription.parameter.repeatable] - Whether the parameter is repeatable.
  204. * @param {boolean} [functionDescription.parameter.optional] - Whether the parameter is optional.
  205. */
  206. constructor(name?: string, minArgs?: number, maxArgs?: number, description?: GC.Spread.CalcEngine.Functions.IFunctionDescription);
  207. /**
  208. * Represents the maximum number of arguments for the function.
  209. * @type {number}
  210. */
  211. maxArgs: number;
  212. /**
  213. * Represents the minimum number of arguments for the function.
  214. * @type {number}
  215. */
  216. minArgs: number;
  217. /**
  218. * Represents the name of the function.
  219. * @type {string}
  220. */
  221. name: string;
  222. /**
  223. * Represents the type name string used for supporting serialization.
  224. * @type {string}
  225. */
  226. typeName: string;
  227. /**
  228. * Determines whether the function accepts array values for the specified argument.
  229. * @param {number} argIndex Index of the argument.
  230. * @function
  231. * @returns {boolean} <c>true</c> if the function accepts array values for the specified argument; otherwise, <c>false</c>.
  232. */
  233. acceptsArray(argIndex: number): boolean;
  234. /**
  235. * Indicates whether the function can process Error values.
  236. * @param {number} argIndex Index of the argument.
  237. * @returns {boolean} <c>true</c> if the function can process Error values for the specified argument; otherwise, <c>false</c>.
  238. * @function
  239. */
  240. acceptsError(argIndex: number): boolean;
  241. /**
  242. * Indicates whether the Evaluate method can process missing arguments.
  243. * @param {number} argIndex Index of the argument
  244. * @returns {boolean} <c>true</c> if the Evaluate method can process missing arguments; otherwise, <c>false</c>.
  245. */
  246. acceptsMissingArgument(argIndex: number): boolean;
  247. /**
  248. * Determines whether the function accepts Reference values for the specified argument.
  249. * @param {number} argIndex Index of the argument.
  250. * @returns {boolean} <c>true</c> if the function accepts Reference values for the specified argument; otherwise, <c>false</c>.
  251. * @function
  252. */
  253. acceptsReference(argIndex: number): boolean;
  254. /**
  255. * Returns the description of the function.
  256. * @function
  257. * @returns {Object} The description of the function.
  258. */
  259. description(): GC.Spread.CalcEngine.Functions.IFunctionDescription;
  260. /**
  261. * Returns the result of the function applied to the arguments.
  262. * @param {Object} args Arguments for the function evaluation
  263. * @returns {Object} The result of the function applied to the arguments.
  264. */
  265. evaluate(args: any): any;
  266. /**
  267. * Finds the branch argument.
  268. * @param {Object} test The test.
  269. * @returns {number} Indicates the index of the argument that would be treated as the branch condition.
  270. */
  271. findBranchArgument(test: any): number;
  272. /**
  273. * Finds the test argument when this function is branched.
  274. * @returns {number} Indicates the index of the argument that would be treated as the test condition.
  275. */
  276. findTestArgument(): number;
  277. /**
  278. * Gets a value that indicates whether this function is branched by arguments as conditional.
  279. * @returns {boolean} <c>true</c> if this instance is branched; otherwise, <c>false</c>.
  280. */
  281. isBranch(): boolean;
  282. /**
  283. * Determines whether the evaluation of the function is dependent on the context in which the evaluation occurs.
  284. * @returns {boolean} <c>true</c> if the evaluation of the function is dependent on the context; otherwise, <c>false</c>.
  285. */
  286. isContextSensitive(): boolean;
  287. /**
  288. * Determines whether the function is volatile while it is being evaluated.
  289. * @returns {boolean} <c>true</c> if the function is volatile; otherwise, <c>false</c>.
  290. */
  291. isVolatile(): boolean;
  292. }
  293. }
  294. module LanguagePackages{
  295. /**
  296. * Gets or Sets the language package for clacengine.
  297. * @param {string} languageName the clacengine language name string;
  298. * @returns {string|void} If no value is set, return the clacengine language name string;
  299. * @example
  300. * GC.Spread.CalcEngine.LanguagePackages.languagePackages('fr');
  301. * GC.Spread.CalcEngine.LanguagePackages.languagePackages();
  302. */
  303. function languagePackages(languageName?: string): any;
  304. }
  305. }
  306. module Commands{
  307. /**
  308. * Represents the key code.
  309. * @enum {number}
  310. * @example
  311. * //This example creates a custom action using the enter key.
  312. * var activeSheet = spread.getActiveSheet();
  313. * spread.commandManager().register('myCmd',
  314. * function ColorAction() {
  315. * //Click on a cell and press the Enter key.
  316. * activeSheet.getCell(activeSheet.getActiveRowIndex(), activeSheet.getActiveColumnIndex()).backColor("red");
  317. * }
  318. * );
  319. * //Map the created action to the Enter key.
  320. * spread.commandManager().setShortcutKey('myCmd', GC.Spread.Commands.Key.enter, false, false, false, false);
  321. */
  322. export enum Key{
  323. /**
  324. * Indicates the left arrow key.
  325. */
  326. left= 37,
  327. /**
  328. * Indicates the right arrow key.
  329. */
  330. right= 39,
  331. /**
  332. * Indicates the up arrow key.
  333. */
  334. up= 38,
  335. /**
  336. * Indicates the down arrow key.
  337. */
  338. down= 40,
  339. /**
  340. * Indicates the Tab key.
  341. */
  342. tab= 9,
  343. /**
  344. * Indicates the Enter key.
  345. */
  346. enter= 13,
  347. /**
  348. * Indicates the Shift key.
  349. */
  350. shift= 16,
  351. /**
  352. * Indicates the Ctrl key.
  353. */
  354. ctrl= 17,
  355. /**
  356. * Indicates the space key.
  357. */
  358. space= 32,
  359. /**
  360. * Indicates the Alt key.
  361. */
  362. altkey= 18,
  363. /**
  364. * Indicates the Home key.
  365. */
  366. home= 36,
  367. /**
  368. * Indicates the End key.
  369. */
  370. end= 35,
  371. /**
  372. * Indicates the Page Up key.
  373. */
  374. pup= 33,
  375. /**
  376. * Indicates the Page Down key.
  377. */
  378. pdn= 34,
  379. /**
  380. * Indicates the Backspace key.
  381. */
  382. backspace= 8,
  383. /**
  384. * Indicates the Delete key.
  385. */
  386. del= 46,
  387. /**
  388. * Indicates the Esc key.
  389. */
  390. esc= 27,
  391. /**
  392. * Indicates the A key
  393. */
  394. a= 65,
  395. /**
  396. * Indicates the C key.
  397. */
  398. c= 67,
  399. /**
  400. * Indicates the V key.
  401. */
  402. v= 86,
  403. /**
  404. * Indicates the X key.
  405. */
  406. x= 88,
  407. /**
  408. * Indicates the Z key.
  409. */
  410. z= 90,
  411. /**
  412. * Indicates the Y key.
  413. */
  414. y= 89
  415. }
  416. export class CommandManager{
  417. /**
  418. * Represents a command manager.
  419. * @class
  420. * @param {Object} context The execution context for all commands in the command manager.
  421. * @constructor
  422. */
  423. constructor(context: Object);
  424. /**
  425. * Executes a command and adds the command to UndoManager.
  426. * @param {Object} commandOptions The options for the command.
  427. * @param {string} commandOptions.cmd The command name, the field is required.
  428. * @param {Object} [commandOptions.arg1] The command argument, the name and type are decided by the command definition.
  429. * @param {Object} [commandOptions.arg2] The command argument, the name and type are decided by the command definition.
  430. * @param {Object} [commandOptions.argN] The command argument, the name and type are decided by the command definition.
  431. * @returns {boolean} The execute command result.
  432. * @example
  433. * //For example, the following code executes the autoFitColumn command.
  434. * var spread = GC.Spread.Sheets.findControl(document.getElementById("ss"));
  435. * spread.commandManager().execute({cmd: "autoFitColumn", sheetName: "Sheet1", columns: [{col: 1}], rowHeader: false, autoFitType: GC.Spread.Sheets.AutoFitType.cell});
  436. */
  437. execute(commandOptions: Object): boolean;
  438. /**
  439. * Registers a command with the command manager.
  440. * @param {string} name - The name of the command.
  441. * @param {Object} command - The object that defines the command.
  442. * @param {number|GC.Spread.Commands.Key} key - The key code.
  443. * @param {boolean} ctrl - <c>true</c> if the command uses the Ctrl key; otherwise, <c>false</c>.
  444. * @param {boolean} shift - <c>true</c> if the command uses the Shift key; otherwise, <c>false</c>.
  445. * @param {boolean} alt - <c>true</c> if the command uses the Alt key; otherwise, <c>false</c>.
  446. * @param {boolean} meta - <c>true</c> if the command uses the Command key on the Macintosh or the Windows key on Microsoft Windows; otherwise, <c>false</c>.
  447. * @example
  448. * //For example, the following code registers the changeBackColor command and then executes the command.
  449. * var command = {
  450. * canUndo: true,
  451. execute: function (context, options, isUndo) {
  452. var Commands = GC.Spread.Sheets.Commands;
  453. if (isUndo) {
  454. Commands.undoTransaction(context, options);
  455. return true;
  456. } else {
  457. Commands.startTransaction(context, options);
  458. var sheet = context.getSheetFromName(options.sheetName);
  459. var cell = sheet.getCell(options.row, options.col);
  460. cell.backColor(options.backColor);
  461. Commands.endTransaction(context, options);
  462. return true;
  463. }
  464. }
  465. };
  466. * var spread = GC.Spread.Sheets.findControl(document.getElementById("ss"));
  467. * var commandManager = spread.commandManager();
  468. * commandManager.register("changeBackColor", command);
  469. * commandManager.execute({cmd: "changeBackColor", sheetName: spread.getSheet(0).name(), row: 1, col: 2, backColor: "red"});
  470. */
  471. register(name: string, command: Object, key?: number|GC.Spread.Commands.Key, ctrl?: boolean, shift?: boolean, alt?: boolean, meta?: boolean): void;
  472. /**
  473. * Binds a shortcut key to a command.
  474. * @param {string} commandName The command name, setting commandName to undefined removes the bound command of the shortcut key.
  475. * @param {number|GC.Spread.Commands.Key} key The key code, setting the key code to undefined removes the shortcut key of the command.
  476. * @param {boolean} ctrl <c>true</c> if the command uses the Ctrl key; otherwise, <c>false</c>.
  477. * @param {boolean} shift <c>true</c> if the command uses the Shift key; otherwise, <c>false</c>.
  478. * @param {boolean} alt <c>true</c> if the command uses the Alt key; otherwise, <c>false</c>.
  479. * @param {boolean} meta <c>true</c> if the command uses the Command key on the Macintosh or the Windows key on Microsoft Windows; otherwise, <c>false</c>.
  480. * @example
  481. * //This example changes the behavior of default keys.
  482. * var activeSheet = spread.getActiveSheet();
  483. * //Change the default Up arrow key action to "Page Up" for the active cell.
  484. * spread.commandManager().setShortcutKey('navigationPageUp', GC.Spread.Commands.Key.up, false, false, false, false);
  485. * //Change the default Down arrow key action to "Page Down" for the active cell.
  486. * spread.commandManager().setShortcutKey('navigationPageDown', GC.Spread.Commands.Key.down, false, false, false, false);
  487. */
  488. setShortcutKey(commandName: string, key?: number|GC.Spread.Commands.Key, ctrl?: boolean, shift?: boolean, alt?: boolean, meta?: boolean): void;
  489. }
  490. export class UndoManager{
  491. /**
  492. * Represents the undo manager.
  493. * @constructor
  494. */
  495. constructor();
  496. /**
  497. * Gets whether the redo operation is allowed.
  498. * @returns {boolean} <c>true</c> if the redo operation is allowed; otherwise, <c>false</c>.
  499. */
  500. canRedo(): boolean;
  501. /**
  502. * Gets whether the undo operation is allowed.
  503. * @returns {boolean} <c>true</c> if the undo operation is allowed; otherwise, <c>false</c>.
  504. */
  505. canUndo(): boolean;
  506. /**
  507. * Clears all of the undo stack and the redo stack.
  508. */
  509. clear(): void;
  510. /**
  511. * Redoes the last command.
  512. * @returns {boolean} <c>true</c> if the redo operation is successful; otherwise, <c>false</c>.
  513. */
  514. redo(): boolean;
  515. /**
  516. * Undoes the last command.
  517. * @returns {boolean} <c>true</c> if the undo operation is successful; otherwise, <c>false</c>.
  518. */
  519. undo(): boolean;
  520. }
  521. }
  522. module Common{
  523. export interface IDateTimeFormat{
  524. abbreviatedDayNames?: string[];
  525. abbreviatedMonthGenitiveNames?: string[];
  526. abbreviatedMonthNames?: string[];
  527. amDesignator?: string;
  528. dayNames?: string[];
  529. fullDateTimePattern?: string;
  530. longDatePattern?: string;
  531. longTimePattern?: string;
  532. monthDayPattern?: string;
  533. monthGenitiveNames?: string[];
  534. monthNames?: string[];
  535. pmDesignator?: string;
  536. shortDatePattern?: string;
  537. shortTimePattern?: string;
  538. yearMonthPattern?: string;
  539. }
  540. export interface INumberFormat{
  541. currencyDecimalSeparator?: string;
  542. currencyGroupSeparator?: string;
  543. currencySymbol?: string;
  544. numberDecimalSeparator?: string;
  545. numberGroupSeparator?: string;
  546. listSeparator?: string;
  547. arrayListSeparator?: string;
  548. arrayGroupSeparator?: string;
  549. dbNumber?: Object
  550. }
  551. export class CultureInfo{
  552. /**
  553. * Represents the custom culture class. The member variable can be overwritten.
  554. * @class
  555. */
  556. constructor();
  557. /**
  558. * Indicates the date time format fields.
  559. * @type {Object}
  560. * @property {Array.<string>} abbreviatedDayNames - Specifies the day formatter for "ddd".
  561. * @property {Array.<string>} abbreviatedMonthGenitiveNames - Specifies the month formatter for "MMM".
  562. * @property {Array.<string>} abbreviatedMonthNames - Specifies the month formatter for "MMM".
  563. * @property {string} amDesignator - Indicates the AM designator.
  564. * @property {Array.<string>} dayNames - Specifies the day formatter for "dddd".
  565. * @property {string} fullDateTimePattern - Specifies the standard date formatter for "F".
  566. * @property {string} longDatePattern - Specifies the standard date formatter for "D".
  567. * @property {string} longTimePattern - Specifies the standard date formatter for "T" and "U".
  568. * @property {string} monthDayPattern - Specifies the standard date formatter for "M" and "m".
  569. * @property {Array.<string>} monthGenitiveNames - Specifies the formatter for "MMMM".
  570. * @property {Array.<string>} monthNames - Specifies the formatter for "M" or "MM".
  571. * @property {string} pmDesignator - Indicates the PM designator.
  572. * @property {string} shortDatePattern - Specifies the standard date formatter for "d".
  573. * @property {string} shortTimePattern - Specifies the standard date formatter for "t".
  574. * @property {string} yearMonthPattern - Specifies the standard date formatter for "y" and "Y".
  575. * @example
  576. * // This example creates a custom culture.
  577. * var myCulture = new GC.Spread.Common.CultureInfo();
  578. * myCulture.NumberFormat.currencySymbol = "\u20ac"
  579. * myCulture.NumberFormat.numberDecimalSeparator = ",";
  580. * myCulture.NumberFormat.numberGroupSeparator = ".";
  581. * myCulture.NumberFormat.arrayGroupSeparator = ";";
  582. * myCulture.NumberFormat.arrayListSeparator = "\\";
  583. * myCulture.NumberFormat.listSeparator = ";";
  584. * myCulture.DateTimeFormat.amDesignator = "";
  585. * myCulture.DateTimeFormat.pmDesignator = "";
  586. * myCulture.DateTimeFormat.abbreviatedMonthNames = ["Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez", ""];
  587. * myCulture.DateTimeFormat.abbreviatedDayNames = ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"];
  588. * myCulture.DateTimeFormat.abbreviatedMonthGenitiveNames = ["Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez", ""];
  589. * myCulture.DateTimeFormat.dayNames = ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"];
  590. * myCulture.DateTimeFormat.fullDateTimePattern = "dddd, d. MMMM yyyy HH:mm:ss";
  591. * myCulture.DateTimeFormat.longDatePattern = "dddd, d. MMMM yyyy";
  592. * myCulture.DateTimeFormat.longTimePattern = "HH:mm:ss";
  593. * myCulture.DateTimeFormat.monthDayPattern = "dd MMMM";
  594. * myCulture.DateTimeFormat.monthNames = ["Januar", "Februar", "M\xe4rz", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember", ""];
  595. * myCulture.DateTimeFormat.monthGenitiveNames = ["Januar", "Februar", "M\xe4rz", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember", ""];
  596. * myCulture.DateTimeFormat.shortDatePattern = "dd.MM.yyyy";
  597. * myCulture.DateTimeFormat.shortTimePattern = "HH:mm";
  598. * myCulture.DateTimeFormat.yearMonthPattern = "MMMM yyyy";
  599. * //add one culture
  600. * GC.Spread.Common.CultureManager.addCultureInfo("de-DE", myCulture);
  601. * //switch to "de-DE" culture
  602. * GC.Spread.Common.CultureManager.culture("de-DE");
  603. * var d = new Date();
  604. * //With culture
  605. * activeSheet.setValue(1, 0, new Date(d.setDate(d.getDate() + 1)));
  606. * activeSheet.getCell(1, 0).formatter("mmm");
  607. * var dvalue = 12345.6789;
  608. * activeSheet.setColumnWidth(0, 200);
  609. * activeSheet.setColumnWidth(1, 200);
  610. * activeSheet.setColumnWidth(2, 200);
  611. * activeSheet.setValue(0, 0, dvalue);
  612. * activeSheet.getCell(0, 0).formatter("###,###.00");
  613. * activeSheet.setValue(2, 0, new Date(d.setDate(d.getDate() + 1)));
  614. * //With culture
  615. * activeSheet.getCell(3, 0).formatter("yyyy/mmm/dddd");
  616. * activeSheet.setValue(3, 0, new Date());
  617. */
  618. DateTimeFormat: GC.Spread.Common.IDateTimeFormat;
  619. /**
  620. * Indicates all the number format fields.
  621. * @type {Object}
  622. * @property {string} currencyDecimalSeparator - Indicates the currency decimal point.
  623. * @property {string} currencyGroupSeparator - Indicates the currency thousand separator.
  624. * @property {string} currencySymbol - Indicates the currency symbol.
  625. * @property {string} numberDecimalSeparator - Indicates the decimal point.
  626. * @property {string} numberGroupSeparator - Indicates the thousand separator.
  627. * @property {string} listSeparator - Indicates the separator for function arguments in a formula.
  628. * @property {string} arrayListSeparator - Indicates the separator for the constants in one row of an array constant in a formula.
  629. * @property {string} arrayGroupSeparator - Indicates the separator for the array rows of an array constant in a formula.
  630. * @property {object} dbNumber - Specifies the DBNumber characters.
  631. * The dbNumber object structure as follow:
  632. * {
  633. * 1: {letters: ['\u5146', '\u5343', '\u767e', '\u5341', '\u4ebf', '\u5343', '\u767e', '\u5341', '\u4e07', '\u5343', '\u767e', '\u5341', ''], // \u5146\u5343\u767e\u5341\u4ebf\u5343\u767e\u5341\u4e07\u5343\u767e\u5341
  634. * numbers: ['\u25cb', '\u4e00', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d'] }, // \u25cb\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d
  635. * 2: {letters: ['\u5146', '\u4edf', '\u4f70', '\u62fe', '\u4ebf', '\u4edf', '\u4f70', '\u62fe', '\u4e07', '\u4edf', '\u4f70', '\u62fe', ''], // \u5146\u4edf\u4f70\u62fe\u4ebf\u4edf\u4f70\u62fe\u4e07\u4edf\u4f70\u62fe
  636. * numbers: ['\u96f6', '\u58f9', '\u8d30', '\u53c1', '\u8086', '\u4f0d', '\u9646', '\u67d2', '\u634c', '\u7396']}, // \u96f6\u58f9\u8d30\u53c1\u8086\u4f0d\u9646\u67d2\u634c\u7396
  637. * 3: {letters: null,
  638. * numbers: ['\uff10', '\uff11', '\uff12', '\uff13', '\uff14', '\uff15', '\uff16', '\uff17', '\uff18', '\uff19']} // \uff10\uff11\uff12\uff13\uff14\uff15\uff16\uff17\uff18\uff19
  639. * };
  640. * @example
  641. * // This example creates a custom culture.
  642. * var myCulture = new GC.Spread.Common.CultureInfo();
  643. * myCulture.NumberFormat.currencySymbol = "\u20ac"
  644. * myCulture.NumberFormat.numberDecimalSeparator = ",";
  645. * myCulture.NumberFormat.numberGroupSeparator = ".";
  646. * myCulture.NumberFormat.arrayGroupSeparator = ";";
  647. * myCulture.NumberFormat.arrayListSeparator = "\\";
  648. * myCulture.NumberFormat.listSeparator = ";";
  649. * myCulture.DateTimeFormat.amDesignator = "";
  650. * myCulture.DateTimeFormat.pmDesignator = "";
  651. * myCulture.DateTimeFormat.abbreviatedMonthNames = ["Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez", ""];
  652. * myCulture.DateTimeFormat.abbreviatedDayNames = ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"];
  653. * myCulture.DateTimeFormat.abbreviatedMonthGenitiveNames = ["Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez", ""];
  654. * myCulture.DateTimeFormat.dayNames = ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"];
  655. * myCulture.DateTimeFormat.fullDateTimePattern = "dddd, d. MMMM yyyy HH:mm:ss";
  656. * myCulture.DateTimeFormat.longDatePattern = "dddd, d. MMMM yyyy";
  657. * myCulture.DateTimeFormat.longTimePattern = "HH:mm:ss";
  658. * myCulture.DateTimeFormat.monthDayPattern = "dd MMMM";
  659. * myCulture.DateTimeFormat.monthNames = ["Januar", "Februar", "M\xe4rz", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember", ""];
  660. * myCulture.DateTimeFormat.monthGenitiveNames = ["Januar", "Februar", "M\xe4rz", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember", ""];
  661. * myCulture.DateTimeFormat.shortDatePattern = "dd.MM.yyyy";
  662. * myCulture.DateTimeFormat.shortTimePattern = "HH:mm";
  663. * myCulture.DateTimeFormat.yearMonthPattern = "MMMM yyyy";
  664. * //add one culture
  665. * GC.Spread.Common.CultureManager.addCultureInfo("de-DE", myCulture);
  666. * //switch to "de-DE" culture
  667. * GC.Spread.Common.CultureManager.culture("de-DE");
  668. * var d = new Date();
  669. * //With culture
  670. * activeSheet.setValue(1, 0, new Date(d.setDate(d.getDate() + 1)));
  671. * activeSheet.getCell(1, 0).formatter("mmm");
  672. * var dvalue = 12345.6789;
  673. * activeSheet.setColumnWidth(0, 200);
  674. * activeSheet.setColumnWidth(1, 200);
  675. * activeSheet.setColumnWidth(2, 200);
  676. * activeSheet.setValue(0, 0, dvalue);
  677. * activeSheet.getCell(0, 0).formatter("###,###.00");
  678. * activeSheet.setValue(2, 0, new Date(d.setDate(d.getDate() + 1)));
  679. * //With culture
  680. * activeSheet.getCell(3, 0).formatter("yyyy/mmm/dddd");
  681. * activeSheet.setValue(3, 0, new Date());
  682. */
  683. NumberFormat: GC.Spread.Common.INumberFormat;
  684. }
  685. export class CultureManager{
  686. /**
  687. * Represente a culture manager.
  688. * @constructor
  689. */
  690. constructor();
  691. /**
  692. * Adds the cultureInfo or custom language into the culture manager.
  693. * @static
  694. * @param {string} cultureName The culture name to set.
  695. * @param {GC.Spread.Common.CultureInfo} cultureInfo The cultureInfo set to the culture.
  696. * @param {object} language The custom language set to the culture. If already set, it will overwrite the old language.
  697. */
  698. static addCultureInfo(cultureName: string, culture: GC.Spread.Common.CultureInfo, language?: object): void;
  699. /**
  700. * Get or set the Sheets culture.
  701. * @static
  702. * @param {string} cultureName The culture name to get.
  703. * @returns {string}. The current culture name of Sheets.
  704. */
  705. static culture(cultureName?: string): string;
  706. /**
  707. * Gets the specified cultureInfo. If no culture name, get current cultureInfo.
  708. * @static
  709. * @param {string | number} cultureName Culture name or culture ID
  710. * @returns {GC.Spread.Common.CultureInfo} The specified cultureInfo object.
  711. */
  712. static getCultureInfo(cultureName: string | number): GC.Spread.Common.CultureInfo;
  713. /**
  714. * Gets the specified custome language.
  715. * @static
  716. * @param {string} cultureName The culture name to get.
  717. * @returns {object} The specified object. Null if not define the language.
  718. */
  719. static getLanguage(cultureName: string): object;
  720. }
  721. }
  722. module Formatter{
  723. export class FormatterBase{
  724. /**
  725. * Represents a custom formatter with the specified format string.
  726. * @class
  727. * @param {string} format The format.
  728. * @param {string} cultureName The culture name.
  729. */
  730. constructor(format: string, cultureName: string);
  731. /** Represents the type name string used for supporting serialization.
  732. * @type {string}
  733. */
  734. typeName: string;
  735. /**
  736. * Formats the specified object as a string with a conditional color. This function should be overwritten.
  737. * @param {Object} obj - The object with cell data to format.
  738. * @param {Object} [options] - The additonal format data.
  739. * @param {string} [options.conditionalForeColor] - The conditonal foreColor when format pattern contains color patter, such as [red]###.##
  740. * @returns {string} The formatted string.
  741. * @example
  742. * //This example creates a custom formatter.
  743. * var customFormatterTest = {};
  744. * customFormatterTest.prototype = GC.Spread.Formatter.FormatterBase;
  745. * customFormatterTest.format = function (obj, data) {
  746. * data.conditionalForeColor = "blue";
  747. * return "My format result : " + obj.toString();
  748. * };
  749. * customFormatterTest.parse = function (str) {
  750. * if (!str) {
  751. * return "";
  752. * }
  753. * return str;
  754. * }
  755. * activeSheet.getCell(1, 0).formatter(customFormatterTest);
  756. * activeSheet.getCell(1, 0).value("Test");
  757. */
  758. format(obj: Object): string;
  759. /**
  760. * Loads the object state from the specified JSON string.
  761. * @param {Object} settings The custom formatter data from deserialization.
  762. */
  763. fromJSON(settings: Object): void;
  764. /**
  765. * Parses the specified text. This function should be overwritten.
  766. * @param {string} text The text.
  767. * @returns {Object} The parsed object.
  768. * @example
  769. * //This example creates a custom formatter.
  770. * var customFormatterTest = {};
  771. * customFormatterTest.prototype = GC.Spread.Formatter.FormatterBase;
  772. * customFormatterTest.format = function (obj, conditionalForeColor) {
  773. * conditionalForeColor.value = "blue";
  774. * return "My format result : " + obj.toString();
  775. * };
  776. * customFormatterTest.parse = function (str) {
  777. * if (!str) {
  778. * return "";
  779. * }
  780. * return str;
  781. * }
  782. * activeSheet.getCell(1, 0).formatter(customFormatterTest);
  783. * activeSheet.getCell(1, 0).value("Test")
  784. */
  785. parse(str: string): Object;
  786. /**
  787. * Saves the object state to a JSON string.
  788. * @returns {Object} The custom formatter data.
  789. */
  790. toJSON(): Object;
  791. }
  792. export class GeneralFormatter{
  793. /**
  794. * Represents a formatter with the specified format mode and format string.
  795. * @class
  796. * @param {string} format The format.
  797. * @param {string} cultureName The culture name.
  798. */
  799. constructor(format: string, cultureName: string);
  800. /**
  801. * Formats the specified object as a string with a formatted data Object.
  802. * @param {Object} obj The object with cell data to format.
  803. * @param {Object} formattedData The object with formatted data.
  804. * @param {Array} [formattedData.content] - The formatted data array, each item is an object that has two properties type and value, And it may contain these types: 'number', 'text', 'fillingChar', 'placeholder', 'exponent', 'decimalSeparator', 'groupSeparator', 'numberPlaceholder', 'percent', 'permille' and 'currency'. For example: {type: 'number', value: '123'}.
  805. * @param {string} [formattedData.conditionalForeColor] - The conditional foreground color.
  806. * @returns {string} The formatted string.
  807. */
  808. format(obj: Object, formattedData: Object): string;
  809. /**
  810. * Gets or sets the format string for this formatter.
  811. * @param {string} value The format string for this formatter.
  812. * @returns {string|GC.Spread.Formatter.GeneralFormatter} If no value is set, returns the formatter string for this formatter; otherwise, returns the formatter.
  813. */
  814. formatString(value?: string): string | GC.Spread.Formatter.GeneralFormatter;
  815. /**
  816. * Parses the specified text.
  817. * @param {string} text The text.
  818. * @returns {Object} The parsed object.
  819. */
  820. parse(str: string): Object;
  821. }
  822. }
  823. module Sheets{
  824. /**
  825. * Represents the license key for evaluation version and production version.
  826. */
  827. var LicenseKey: string;
  828. /**
  829. * Gets the Workbook instance by the host element.
  830. * @param {HTMLElement|string} host The host element or the host element id.
  831. * @returns {GC.Spread.Sheets.Workbook} The Workbook instance.
  832. */
  833. function findControl(host: HTMLElement|string): GC.Spread.Sheets.Workbook;
  834. /**
  835. * Gets the type from the type string. This method is used for supporting the serialization of the custom object.
  836. * @param {string} typeString The type string.
  837. * @returns {Object} The type.
  838. */
  839. function getTypeFromString(typeString: string): any;
  840. export interface FloatingObjectLoadedEventArgs{
  841. sheet: GC.Spread.Sheets.Worksheet;
  842. sheetName: string;
  843. floatingObject: FloatingObjects.FloatingObject;
  844. element: HTMLElement;
  845. }
  846. export interface FormattedData{
  847. conditionalForeColor?: string | CanvasGradient | CanvasPattern;
  848. value?: string | CanvasGradient | CanvasPattern;
  849. content?: {
  850. type: string;
  851. value: string;
  852. }[];
  853. }
  854. export interface IActiveSheetChangedEventArgs{
  855. oldSheet: GC.Spread.Sheets.Worksheet;
  856. newSheet: GC.Spread.Sheets.Worksheet;
  857. }
  858. export interface IActiveSheetChangingEventArgs{
  859. oldSheet: GC.Spread.Sheets.Worksheet;
  860. newSheet: GC.Spread.Sheets.Worksheet;
  861. cancel: boolean;
  862. }
  863. export interface IBounds{
  864. x?: number;
  865. y?: number;
  866. width: number;
  867. height: number;
  868. }
  869. export interface IButtonClickedEventArgs{
  870. sheet: GC.Spread.Sheets.Worksheet;
  871. sheetName: string;
  872. row: number;
  873. col: number;
  874. sheetArea: SheetArea;
  875. }
  876. export interface ICalendarOption{
  877. startDay?: GC.Spread.Sheets.CalendarStartDay;
  878. calendarPage?: GC.Spread.Sheets.CalendarPage;
  879. showTime?: boolean;
  880. }
  881. export interface ICellButton{
  882. position?: GC.Spread.Sheets.ButtonPosition;
  883. useButtonStyle?: boolean;
  884. enabled?: boolean;
  885. width?: number;
  886. caption?: string;
  887. imageSrc?: string;
  888. imageSize?: { width: number, height: number };
  889. captionAlign?: GC.Spread.Sheets.CaptionAlignment;
  890. command?: string | ((sheet: GC.Spread.Sheets.Worksheet, row: number, col: number, option: any) => void);
  891. imageType?: GC.Spread.Sheets.ButtonImageType;
  892. visibility?: GC.Spread.Sheets.ButtonVisibility;
  893. }
  894. export interface ICellChangedEventArgs{
  895. sheet: GC.Spread.Sheets.Worksheet;
  896. sheetName: string;
  897. row: number;
  898. col: number;
  899. sheetArea: SheetArea;
  900. propertyName: string;
  901. oldValue: any;
  902. newValue: any;
  903. isUndo?: boolean;
  904. }
  905. export interface ICellClickEventArgs{
  906. sheet: GC.Spread.Sheets.Worksheet;
  907. sheetName: string;
  908. sheetArea: SheetArea;
  909. row: number;
  910. col: number;
  911. }
  912. export interface ICellDoubleClickEventArgs{
  913. sheet: GC.Spread.Sheets.Worksheet;
  914. sheetName: string;
  915. sheetArea: SheetArea;
  916. row: number;
  917. col: number;
  918. }
  919. export interface ICellPosition{
  920. row: number;
  921. col: number;
  922. }
  923. export interface ICellsInfo{
  924. row: number;
  925. col: number;
  926. rowCount: number;
  927. colCount: number;
  928. sheetName: string;
  929. }
  930. export interface IClipboardChangedEventArgs{
  931. sheet: GC.Spread.Sheets.Worksheet;
  932. sheetName: string;
  933. copyData: string;
  934. }
  935. export interface IClipboardChangingEventArgs{
  936. sheet: GC.Spread.Sheets.Worksheet;
  937. sheetName: string;
  938. copyData: string;
  939. cancel: boolean;
  940. }
  941. export interface IClipboardPastedEventArgs{
  942. sheet: GC.Spread.Sheets.Worksheet;
  943. sheetName: string;
  944. cellRange: Range;
  945. pasteOption: ClipboardPasteOptions;
  946. }
  947. export interface IClipboardPastingEventArgs{
  948. sheet: GC.Spread.Sheets.Worksheet;
  949. sheetName: string;
  950. cellRange: Range;
  951. pasteOption: ClipboardPasteOptions;
  952. cancel: boolean;
  953. }
  954. export interface IColorPickerGroup{
  955. name?: string;
  956. colors: string[][];
  957. needScaleColor?: boolean;
  958. }
  959. export interface IColorPickerOption{
  960. colorBlockSize?: number;
  961. groups?: GC.Spread.Sheets.IColorPickerGroup[];
  962. }
  963. export interface IColumn{
  964. name?: string;
  965. formatter?: string;
  966. cellType?: number;
  967. width?: number;
  968. visible?: boolean;
  969. resizable?: boolean;
  970. pageBreak?: boolean;
  971. displayName?: string;
  972. size?: number;
  973. value?: Function;
  974. starSize?: string;
  975. }
  976. export interface IColumnChangedEventArgs{
  977. sheet: GC.Spread.Sheets.Worksheet;
  978. sheetName: string;
  979. col: number;
  980. sheetArea: SheetArea;
  981. propertyName: string;
  982. oldValue: any;
  983. newValue: any;
  984. count?: number;
  985. isUndo?: boolean;
  986. }
  987. export interface IColumnWidthChangedEventArgs{
  988. sheet: GC.Spread.Sheets.Worksheet;
  989. sheetName: string;
  990. colList: number[];
  991. header: boolean;
  992. }
  993. export interface IColumnWidthChangingEventArgs{
  994. sheet: GC.Spread.Sheets.Worksheet;
  995. sheetName: string;
  996. colList: any[];
  997. header: boolean;
  998. cancel: boolean;
  999. }
  1000. export interface ICommentChangedEventArgs{
  1001. sheet: GC.Spread.Sheets.Worksheet;
  1002. sheetName: string;
  1003. comment: Comments.Comment;
  1004. propertyName: string;
  1005. }
  1006. export interface ICommentRemovedEventArgs{
  1007. sheet: GC.Spread.Sheets.Worksheet;
  1008. sheetName: string;
  1009. comment: Comments.Comment;
  1010. }
  1011. export interface ICommentRemovingEventArgs{
  1012. sheet: GC.Spread.Sheets.Worksheet;
  1013. sheetName: string;
  1014. comment: Comments.Comment;
  1015. cancel: boolean;
  1016. }
  1017. export interface IDirtyCellInfo{
  1018. row: number;
  1019. col: number;
  1020. newValue: any;
  1021. oldValue: any;
  1022. }
  1023. export interface IDragDropBlockCompletedEventArgs{
  1024. sheet: GC.Spread.Sheets.Worksheet;
  1025. sheetName: string;
  1026. fromRow: number;
  1027. fromCol: number;
  1028. toRow: number;
  1029. toCol: number;
  1030. rowCount: number;
  1031. colCount: number;
  1032. copy: boolean;
  1033. insert: boolean;
  1034. copyOption: CopyToOptions;
  1035. }
  1036. export interface IDragDropBlockEventArgs{
  1037. sheet: GC.Spread.Sheets.Worksheet;
  1038. sheetName: string;
  1039. fromRow: number;
  1040. fromCol: number;
  1041. toRow: number;
  1042. toCol: number;
  1043. rowCount: number;
  1044. colCount: number;
  1045. copy: boolean;
  1046. insert: boolean;
  1047. copyOption: CopyToOptions;
  1048. cancel: boolean;
  1049. }
  1050. export interface IDragFillBlockCompletedEventArgs{
  1051. sheet: GC.Spread.Sheets.Worksheet;
  1052. sheetName: string;
  1053. fillRange: GC.Spread.Sheets.Range;
  1054. autoFillType: GC.Spread.Sheets.Fill.AutoFillType;
  1055. fillDirection: GC.Spread.Sheets.Fill.FillDirection;
  1056. }
  1057. export interface IDragFillBlockEventArgs{
  1058. sheet: GC.Spread.Sheets.Worksheet;
  1059. sheetName: string;
  1060. fillRange: GC.Spread.Sheets.Range;
  1061. autoFillType: GC.Spread.Sheets.Fill.AutoFillType;
  1062. fillDirection: GC.Spread.Sheets.Fill.FillDirection;
  1063. cancel: boolean;
  1064. }
  1065. export interface IDropdown{
  1066. type: GC.Spread.Sheets.DropDownType;
  1067. option?: object;
  1068. submitCommand?: string | ((sheet: GC.Spread.Sheets.Worksheet, value:any, option: any) => void);
  1069. }
  1070. export interface IEditChangeEventArgs{
  1071. sheet: GC.Spread.Sheets.Worksheet;
  1072. sheetName: string;
  1073. row: number;
  1074. col: number;
  1075. editingText: any;
  1076. }
  1077. export interface IEditEndedEventArgs{
  1078. sheet: GC.Spread.Sheets.Worksheet;
  1079. sheetName: string;
  1080. row: number;
  1081. col: number;
  1082. editingText: Object;
  1083. }
  1084. export interface IEditEndingEventArgs{
  1085. sheet: GC.Spread.Sheets.Worksheet;
  1086. sheetName: string;
  1087. row: number;
  1088. col: number;
  1089. editor: Object;
  1090. editingText: Object;
  1091. cancel: boolean;
  1092. }
  1093. export interface IEditorStatusChangedEventArgs{
  1094. sheet: GC.Spread.Sheets.Worksheet;
  1095. sheetName: string;
  1096. oldStatus: EditorStatus;
  1097. newStatus: EditorStatus;
  1098. }
  1099. export interface IEditStartingEventArgs{
  1100. sheet: GC.Spread.Sheets.Worksheet;
  1101. sheetName: string;
  1102. row: number;
  1103. col: number;
  1104. cancel: boolean;
  1105. }
  1106. export interface IEnterCellEventArgs{
  1107. sheet: GC.Spread.Sheets.Worksheet;
  1108. sheetName: string;
  1109. row: number;
  1110. col: number;
  1111. }
  1112. export interface IFilterButtonHitInfo{
  1113. rowFilter: GC.Spread.Sheets.Filter.RowFilterBase;
  1114. row?: number;
  1115. col?: number;
  1116. x?: number;
  1117. y?: number;
  1118. width?: number;
  1119. height?: number;
  1120. sheetArea?: GC.Spread.Sheets.SheetArea;
  1121. }
  1122. export interface IFloatingObjectChangedEventArgs{
  1123. sheet: GC.Spread.Sheets.Worksheet;
  1124. sheetName: string;
  1125. floatingObject: FloatingObjects.FloatingObject;
  1126. propertyName: string;
  1127. }
  1128. export interface IFloatingObjectRemovedEventArgs{
  1129. sheet: GC.Spread.Sheets.Worksheet;
  1130. sheetName: string;
  1131. floatingObject: FloatingObjects.FloatingObject;
  1132. }
  1133. export interface IFloatingObjectRemovingEventArgs{
  1134. sheet: GC.Spread.Sheets.Worksheet;
  1135. sheetName: string;
  1136. floatingObject: FloatingObjects.FloatingObject;
  1137. cancel: boolean;
  1138. }
  1139. export interface IFloatingObjectSelectionChangedEventArgs{
  1140. sheet: GC.Spread.Sheets.Worksheet;
  1141. sheetName: string;
  1142. floatingObject: FloatingObjects.FloatingObject;
  1143. }
  1144. export interface IFormulaInfo{
  1145. hasFormula?: boolean;
  1146. baseRange?: GC.Spread.Sheets.Range;
  1147. isArrayFormula?: boolean;
  1148. formula?: string;
  1149. formulaWithCulture?: string;
  1150. isDynamicArray?: boolean;
  1151. }
  1152. export interface IFormulaRangeHitInfo{
  1153. paramRange: GC.Spread.Sheets.IParamRange; //param range info
  1154. inTopLeft?: boolean;
  1155. inTopRight?: boolean;
  1156. inBottomLeft?: boolean;
  1157. inBottomRight?: boolean;
  1158. inBorder?: boolean;
  1159. }
  1160. export interface IHitTestCellTypeHitInfo{
  1161. x?: number;
  1162. y?: number;
  1163. row?: number;
  1164. col?: number;
  1165. cellRect?: GC.Spread.Sheets.Rect;
  1166. sheetArea?: GC.Spread.Sheets.SheetArea;
  1167. isReservedLocation?: boolean;
  1168. }
  1169. export interface IHitTestCommentHitInfo{
  1170. x?: number;
  1171. y?: number;
  1172. comment?: GC.Spread.Sheets.Comments.Comment;
  1173. area?: string;
  1174. }
  1175. export interface IHitTestDragInfo{
  1176. action?: string;
  1177. side?: string;
  1178. outside?: boolean;
  1179. }
  1180. export interface IHitTestFloatingObjectHitInfo{
  1181. x?: number;
  1182. y?: number;
  1183. floatingObject?: GC.Spread.Sheets.FloatingObjects.FloatingObject;
  1184. }
  1185. export interface IHitTestFooterCornerInfo{
  1186. element?: string,
  1187. }
  1188. export interface IHitTestInformation{
  1189. x?: number;
  1190. y?: number;
  1191. rowViewportIndex?: number;
  1192. colViewportIndex?: number;
  1193. row?: number;
  1194. col?: number;
  1195. hitTestType?: GC.Spread.Sheets.SheetArea;
  1196. resizeInfo?: GC.Spread.Sheets.IHitTestResizeInfo;
  1197. outlineHitInfo?: GC.Spread.Sheets.IHitTestOutlineHitInfo;
  1198. filterButtonHitInfo?: GC.Spread.Sheets.IFilterButtonHitInfo;
  1199. dragInfo?: GC.Spread.Sheets.IHitTestDragInfo;
  1200. cellTypeHitInfo?: GC.Spread.Sheets.IHitTestCellTypeHitInfo;
  1201. floatingObjectHitInfo?: GC.Spread.Sheets.IHitTestFloatingObjectHitInfo;
  1202. formulaRangeHitInfo?: GC.Spread.Sheets.IFormulaRangeHitInfo;
  1203. commentHitInfo?: GC.Spread.Sheets.IHitTestCommentHitInfo;
  1204. }
  1205. export interface IHitTestOutlineHitInfo{
  1206. what?: string;
  1207. info?: GC.Spread.Sheets.IOutlineHitInfo;
  1208. }
  1209. export interface IHitTestResizeInfo{
  1210. action?: string;
  1211. index?: number;
  1212. sheetArea?: GC.Spread.Sheets.SheetArea;
  1213. startY?: number;
  1214. movingY?: number;
  1215. startX?: number;
  1216. movingX?: number;
  1217. }
  1218. export interface IHitTestScrollBarInfo{
  1219. element?: string,
  1220. }
  1221. export interface IHyperlink{
  1222. url: string;
  1223. tooltip?: string;
  1224. linkColor?: string;
  1225. visitedLinkColor?: string;
  1226. target?: number;
  1227. drawUnderline?: boolean;
  1228. command?: string | ((sheet: GC.Spread.Sheets.Worksheet, row: number, col: number, sheetArea?: GC.Spread.Sheets.SheetArea) => void);
  1229. }
  1230. export interface IIHitTestTabStripInfo{
  1231. navButton?: string;
  1232. sheetTab?: GC.Spread.Sheets.SheetTabInfo;
  1233. resize?: boolean;
  1234. blank?: boolean;
  1235. }
  1236. export interface IInvalidOperationEventArgs{
  1237. sheet: GC.Spread.Sheets.Worksheet;
  1238. sheetName: string;
  1239. invalidType: InvalidOperationType;
  1240. message: string;
  1241. }
  1242. export interface ILabelOptions{
  1243. alignment: GC.Spread.Sheets.LabelAlignment;
  1244. visibility: GC.Spread.Sheets.LabelVisibility;
  1245. font: string;
  1246. foreColor: string;
  1247. margin: string;
  1248. }
  1249. export interface ILeaveCellEventArgs{
  1250. sheet: GC.Spread.Sheets.Worksheet;
  1251. sheetName: string;
  1252. row: number;
  1253. col: number;
  1254. cancel: boolean;
  1255. }
  1256. export interface ILeftColumnChangedEventArgs{
  1257. sheet: GC.Spread.Sheets.Worksheet;
  1258. sheetName: string;
  1259. oldLeftCol: number;
  1260. newLeftCol: number;
  1261. }
  1262. export interface IListItem{
  1263. text?: string;
  1264. value?: string;
  1265. icon?: string;
  1266. }
  1267. export interface IListLayout{
  1268. direction?: GC.Spread.Sheets.LayoutDirection;
  1269. displayAs?: GC.Spread.Sheets.LayoutDisplayAs;
  1270. collapsible?: boolean;
  1271. }
  1272. export interface IListOption{
  1273. text?: string;
  1274. layout?: GC.Spread.Sheets.IListLayout;
  1275. multiSelect?: boolean;
  1276. valueType?: GC.Spread.Sheets.DropdownListValue;
  1277. onItemSelected?: (arg: MouseEvent) => string;
  1278. items: GC.Spread.Sheets.IListItem[] | GC.Spread.Sheets.IListOption[] | (() => HTMLElement); // a function returns a DOM element
  1279. }
  1280. export interface IMonthPickerOption{
  1281. startYear?: number;
  1282. stopYear?: number;
  1283. height?: number;
  1284. }
  1285. export interface IOutlineColumnCheckStatusChanged{
  1286. sheet: GC.Spread.Sheets.Worksheet;
  1287. sheetName: string;
  1288. row: number,
  1289. col: number,
  1290. status: boolean
  1291. }
  1292. export interface IOutlineHitInfo{
  1293. index?: number;
  1294. isExpanded?: boolean;
  1295. level?: number;
  1296. lineDirection?: GC.Spread.Sheets.Outlines.OutlineDirection;
  1297. paintLine?: boolean;
  1298. }
  1299. export interface IParamRange{
  1300. textOffset: number; // range text offset in formulatextbox's value
  1301. text: string; // range text
  1302. index: number; // index in all ranges
  1303. }
  1304. export interface IPictureChangedEventArgs{
  1305. sheet: GC.Spread.Sheets.Worksheet;
  1306. sheetName: string;
  1307. picture: FloatingObjects.Picture;
  1308. propertyName: string;
  1309. }
  1310. export interface IPictureSelectionChangedEventArgs{
  1311. sheet: GC.Spread.Sheets.Worksheet;
  1312. sheetName: string;
  1313. picture: FloatingObjects.Picture;
  1314. }
  1315. export interface IProtectionOptions{
  1316. allowSelectLockedCells?: boolean; //True or undefined if the user can select locked cells.
  1317. allowSelectUnlockedCells?: boolean; //True or undefined if the user can select unlocked cells.
  1318. allowSort?: boolean; //True if the user can sort ranges.
  1319. allowFilter?: boolean; //True if the user can filter ranges.
  1320. allowEditObjects?: boolean; //True if the user can edit floating objects.
  1321. allowResizeRows?: boolean; //True if the user can resize rows.
  1322. allowResizeColumns?: boolean; //True if the user can resize columns.
  1323. allowDragInsertRows?: boolean; //True if the user can drag to insert rows.
  1324. allowDragInsertColumns?: boolean; //True if the user can drag to insert columns.
  1325. allowInsertRows?: boolean; //True if the user can insert rows.
  1326. allowInsertColumns?: boolean; //True if the user can insert columns.
  1327. allowDeleteRows?: boolean; //True if the user can delete rows.
  1328. allowDeleteColumns?: boolean; //True if the user can delete columns.
  1329. }
  1330. export interface IRangeChangedEventArgs{
  1331. sheet: GC.Spread.Sheets.Worksheet;
  1332. sheetName: string;
  1333. row: number;
  1334. col: number;
  1335. rowCount: number;
  1336. colCount: number;
  1337. changedCells: ICellPosition[];
  1338. action: RangeChangedAction;
  1339. tableNames?: string[];
  1340. }
  1341. export interface IRangeFilterClearedEventArgs{
  1342. sheet: GC.Spread.Sheets.Worksheet;
  1343. sheetName: string;
  1344. col: number;
  1345. }
  1346. export interface IRangeFilterClearingEventArgs{
  1347. sheet: GC.Spread.Sheets.Worksheet;
  1348. sheetName: string;
  1349. col: number;
  1350. }
  1351. export interface IRangeFilteredEventArgs{
  1352. sheet: GC.Spread.Sheets.Worksheet;
  1353. sheetName: string;
  1354. col: number;
  1355. filterValues: any[];
  1356. }
  1357. export interface IRangeFilteringEventArgs{
  1358. sheet: GC.Spread.Sheets.Worksheet;
  1359. sheetName: string;
  1360. col: number;
  1361. filterValues: any[];
  1362. conditionInfo : Object;
  1363. }
  1364. export interface IRangeGroupStateChangedEventArgs{
  1365. sheet: GC.Spread.Sheets.Worksheet;
  1366. sheetName: string;
  1367. isRowGroup: boolean;
  1368. index: number;
  1369. level: number;
  1370. }
  1371. export interface IRangeGroupStateChangingEventArgs{
  1372. sheet: GC.Spread.Sheets.Worksheet;
  1373. sheetName: string;
  1374. isRowGroup: boolean;
  1375. index: number;
  1376. level: number;
  1377. cancel: boolean;
  1378. }
  1379. export interface IRangeSortedEventArgs{
  1380. sheet: GC.Spread.Sheets.Worksheet;
  1381. sheetName: string;
  1382. col: number;
  1383. ascending: boolean;
  1384. }
  1385. export interface IRangeSortingEventArgs{
  1386. sheet: GC.Spread.Sheets.Worksheet;
  1387. sheetName: string;
  1388. col: number;
  1389. ascending: boolean;
  1390. compareFunction?: ((value1: any, value2: any) => number);
  1391. }
  1392. export interface IRowChangedEventArgs{
  1393. sheet: GC.Spread.Sheets.Worksheet;
  1394. sheetName: string;
  1395. row: number;
  1396. sheetArea: SheetArea;
  1397. propertyName: string;
  1398. oldValue: any;
  1399. newValue: any;
  1400. count?: number;
  1401. isUndo?: boolean;
  1402. }
  1403. export interface IRowHeightChangedEventArgs{
  1404. sheet: GC.Spread.Sheets.Worksheet;
  1405. sheetName: string;
  1406. rowList: number[];
  1407. header: boolean;
  1408. }
  1409. export interface IRowHeightChangingEventArgs{
  1410. sheet: GC.Spread.Sheets.Worksheet;
  1411. sheetName: string;
  1412. rowList: any[];
  1413. header: boolean;
  1414. cancel: boolean;
  1415. }
  1416. export interface ISelectionChangedEventArgs{
  1417. sheet: GC.Spread.Sheets.Worksheet;
  1418. sheetName: string;
  1419. oldSelections: Sheets.Range[];
  1420. newSelections: Sheets.Range[];
  1421. }
  1422. export interface ISelectionChangingEventArgs{
  1423. sheet: GC.Spread.Sheets.Worksheet;
  1424. sheetName: string;
  1425. oldSelections: GC.Spread.Sheets.Range[];
  1426. newSelections: GC.Spread.Sheets.Range[];
  1427. }
  1428. export interface ISetBorderOptions{
  1429. all?: boolean;
  1430. left?: boolean;
  1431. top?: boolean;
  1432. right?: boolean;
  1433. bottom?: boolean;
  1434. outline?: boolean;
  1435. inside?: boolean;
  1436. innerHorizontal?: boolean;
  1437. innerVertical?: boolean;
  1438. diagonalUp?:boolean;
  1439. diagonalDown?:boolean;
  1440. }
  1441. export interface IShapeChangedEventArgs{
  1442. sheet: GC.Spread.Sheets.Worksheet;
  1443. sheetName: string;
  1444. shape: GC.Spread.Sheets.Shapes.Shape;
  1445. propertyName: string;
  1446. }
  1447. export interface IShapeRemovedEventArgs{
  1448. sheet: GC.Spread.Sheets.Worksheet;
  1449. sheetName: string;
  1450. shape: Shapes.Shape;
  1451. }
  1452. export interface IShapeRemovingEventArgs{
  1453. sheet: GC.Spread.Sheets.Worksheet;
  1454. sheetName: string;
  1455. shape: Shapes.Shape;
  1456. cancel: boolean;
  1457. }
  1458. export interface IShapeSelectionChangedEventArgs{
  1459. sheet: GC.Spread.Sheets.Worksheet;
  1460. sheetName: string;
  1461. shape: Shapes.Shape;
  1462. }
  1463. export interface ISheetChangedEventArgs{
  1464. sheetName: string;
  1465. propertyName: string;
  1466. sheetIndex: number;
  1467. newValue?: boolean;
  1468. oldValue?: boolean;
  1469. }
  1470. export interface ISheetChangingEventArgs{
  1471. sheetName: string;
  1472. propertyName: string;
  1473. sheetIndex: number;
  1474. cancel: boolean;
  1475. newValue?: boolean;
  1476. oldValue?: boolean;
  1477. }
  1478. export interface ISheetDefaultOption{
  1479. rowHeight?: number;
  1480. colHeaderRowHeight?: number;
  1481. colWidth?: number;
  1482. rowHeaderColWidth?: number;
  1483. }
  1484. export interface ISheetNameChangedEventArgs{
  1485. sheet: GC.Spread.Sheets.Worksheet;
  1486. oldValue: string;
  1487. newValue: string;
  1488. }
  1489. export interface ISheetNameChangingEventArgs{
  1490. sheet: GC.Spread.Sheets.Worksheet;
  1491. oldValue: string;
  1492. newValue: string;
  1493. cancel: boolean;
  1494. }
  1495. export interface ISheetTabClickEventArgs{
  1496. sheet: GC.Spread.Sheets.Worksheet;
  1497. sheetName: string;
  1498. sheetTabIndex: number;
  1499. }
  1500. export interface ISheetTabDoubleClickEventArgs{
  1501. sheet: GC.Spread.Sheets.Worksheet;
  1502. sheetName: string;
  1503. sheetTabIndex: number;
  1504. }
  1505. export interface ISlicerChangedEventArgs{
  1506. sheet: GC.Spread.Sheets.Worksheet;
  1507. sheetName: string;
  1508. slicer: GC.Spread.Sheets.Slicers.Slicer;
  1509. propertyName: string;
  1510. }
  1511. export interface ISliderOption{
  1512. max?: number;
  1513. min?: number;
  1514. step?: number;
  1515. direction? :GC.Spread.Sheets.LayoutDirection;
  1516. tooltipVisible?: boolean;
  1517. scaleVisible ?: boolean;
  1518. marks?: number[];
  1519. width?: number;
  1520. height?: number;
  1521. formatString?: string;
  1522. }
  1523. export interface ISortInfo{
  1524. ascending: boolean;
  1525. index: number;
  1526. color?: string;
  1527. isBackColor?: boolean;
  1528. compareFunction?: ((value1: any, value2: any) => number);
  1529. }
  1530. export interface ISparklineChangedEventArgs{
  1531. sheet: GC.Spread.Sheets.Worksheet;
  1532. sheetName: string;
  1533. sparkline: Sparklines.Sparkline;
  1534. }
  1535. export interface ITableFilterClearedEventArgs{
  1536. sheet: GC.Spread.Sheets.Worksheet;
  1537. sheetName: string;
  1538. table: GC.Spread.Sheets.Tables.Table;
  1539. tableCol: number;
  1540. }
  1541. export interface ITableFilterClearingEventArgs{
  1542. sheet: GC.Spread.Sheets.Worksheet;
  1543. sheetName: string;
  1544. table: GC.Spread.Sheets.Tables.Table;
  1545. tableCol: number;
  1546. }
  1547. export interface ITableFilteredEventArgs{
  1548. sheet: GC.Spread.Sheets.Worksheet;
  1549. sheetName: string;
  1550. table: GC.Spread.Sheets.Tables.Table;
  1551. tableCol: number;
  1552. filterValues: any[];
  1553. }
  1554. export interface ITableFilteringEventArgs{
  1555. sheet: GC.Spread.Sheets.Worksheet;
  1556. sheetName: string;
  1557. table: GC.Spread.Sheets.Tables.Table;
  1558. tableCol: number;
  1559. filterValues: any[];
  1560. conditionInfo: Object;
  1561. }
  1562. export interface ITimePickerOption{
  1563. min?: GC.Spread.Sheets.ITimePickerValue;
  1564. max?: GC.Spread.Sheets.ITimePickerValue;
  1565. step?: GC.Spread.Sheets.ITimePickerValue;
  1566. formatString?: string;
  1567. height?: number;
  1568. }
  1569. export interface ITimePickerValue{
  1570. hour?: number;
  1571. minute?: number;
  1572. second?: number;
  1573. }
  1574. export interface ITopRowChangedEventArgs{
  1575. sheet: GC.Spread.Sheets.Worksheet;
  1576. sheetName: string;
  1577. oldTopRow: number;
  1578. newTopRow: number;
  1579. }
  1580. export interface ITouchToolStripOpeningEventArgs{
  1581. x: number;
  1582. y: number;
  1583. handled: boolean;
  1584. }
  1585. export interface IUserFormulaEnteredEventArgs{
  1586. sheet: GC.Spread.Sheets.Worksheet;
  1587. sheetName: string;
  1588. row: number;
  1589. col: number;
  1590. formula: string;
  1591. }
  1592. export interface IUserZoomingEventArgs{
  1593. sheet: GC.Spread.Sheets.Worksheet;
  1594. sheetName: string;
  1595. oldZoomFactor: number;
  1596. newZoomFactor: number;
  1597. }
  1598. export interface IValidationErrorEventArgs{
  1599. sheet: GC.Spread.Sheets.Worksheet;
  1600. sheetName: string;
  1601. row: number;
  1602. col: number;
  1603. validator: DataValidation.DefaultDataValidator;
  1604. validationResult: DataValidation.DataValidationResult;
  1605. }
  1606. export interface IValueChangedEventArgs{
  1607. sheet: GC.Spread.Sheets.Worksheet;
  1608. sheetName: string;
  1609. row: number;
  1610. col: number;
  1611. oldValue: any;
  1612. newValue: any;
  1613. }
  1614. export interface IWorkBookDefaultOptions{
  1615. allowUserDragDrop?: boolean;
  1616. allowUserDragFill?: boolean;
  1617. allowUserZoom?: boolean;
  1618. allowUndo?: boolean;
  1619. allowUserResize?: boolean;
  1620. allowSheetReorder?: boolean;
  1621. allowContextMenu?: boolean;
  1622. allowUserDeselect?: boolean;
  1623. defaultDragFillType?: GC.Spread.Sheets.Fill.AutoFillType;
  1624. showDragFillSmartTag?: boolean;
  1625. showHorizontalScrollbar?: boolean;
  1626. showVerticalScrollbar?: boolean;
  1627. scrollbarShowMax?: boolean;
  1628. scrollbarMaxAlign?: boolean;
  1629. tabStripVisible?: boolean;
  1630. tabStripRatio?: number;
  1631. tabEditable?: boolean;
  1632. newTabVisible?: boolean;
  1633. cutCopyIndicatorVisible?: boolean;
  1634. cutCopyIndicatorBorderColor?: string;
  1635. tabNavigationVisible?: boolean;
  1636. backColor?: string;
  1637. backgroundImage?: null | string;
  1638. backgroundImageLayout?: GC.Spread.Sheets.ImageLayout;
  1639. showResizeTip?: GC.Spread.Sheets.ShowResizeTip;
  1640. showDragDropTip?: boolean;
  1641. showDragFillTip?: boolean;
  1642. scrollIgnoreHidden?: boolean;
  1643. highlightInvalidData?: boolean;
  1644. showScrollTip?: GC.Spread.Sheets.ShowScrollTip;
  1645. columnResizeMode?: GC.Spread.Sheets.ResizeMode;
  1646. rowResizeMode?: GC.Spread.Sheets.ResizeMode;
  1647. grayAreaBackColor?: null | string;
  1648. useTouchLayout?: boolean;
  1649. hideSelection?: boolean;
  1650. resizeZeroIndicator?: GC.Spread.Sheets.ResizeZeroIndicator;
  1651. allowUserEditFormula?: boolean;
  1652. enableFormulaTextbox?: boolean;
  1653. referenceStyle?: number;
  1654. allowDynamicArray?: boolean;
  1655. autoFitType?: GC.Spread.Sheets.AutoFitType;
  1656. calcOnDemand?: boolean;
  1657. allowCopyPasteExcelStyle?: boolean;
  1658. allowExtendPasteRange?: boolean;
  1659. copyPasteHeaderOptions?: GC.Spread.Sheets.CopyPasteHeaderOptions;
  1660. allowUserDragMerge?: boolean;
  1661. scrollByPixel?: boolean;
  1662. scrollPixel?: number;
  1663. sheetCount?: number;
  1664. font?: null | string;
  1665. allowAutoCreateHyperlink?: boolean;
  1666. customList?: string[][];
  1667. }
  1668. export interface IWorkbookHitTestInformation{
  1669. x?: number;
  1670. y?: number;
  1671. worksheetHitInfo: GC.Spread.Sheets.IHitTestInformation;
  1672. tabStripHitInfo: GC.Spread.Sheets.IIHitTestTabStripInfo;
  1673. horizontalScrollBarHitInfo: GC.Spread.Sheets.IHitTestScrollBarInfo;
  1674. verticalScrollBarHitInfo: GC.Spread.Sheets.IHitTestScrollBarInfo;
  1675. footerCornerHitInfo: GC.Spread.Sheets.IHitTestFooterCornerInfo;
  1676. }
  1677. export interface IWorkbookOptions{
  1678. allowUserDragMerge:boolean ; // Whether to allow the user to drag merge cells.
  1679. allowUserDragDrop :boolean ; // Whether to allow the user to drag and drop range data.
  1680. allowUserDragFill :boolean ; // Whether to allow the user to drag fill a range.
  1681. allowUserZoom :boolean ; // Whether to zoom the display by scrolling the mouse wheel while pressing the Ctrl key.
  1682. allowUserResize :boolean ; // Whether to allow the user to resize columns and rows.
  1683. allowUndo :boolean ; // Whether to allow the user to undo edits.
  1684. allowSheetReorder :boolean ; // Whether the user can reorder the sheets in the Spread component.
  1685. allowContextMenu :boolean; // Whether to allow the user to open the built-in context menu.
  1686. allowUserDeselect :boolean; // Whether to allow the user to can use deselect in selection.
  1687. defaultDragFillType :GC.Spread.Sheets.Fill.AutoFillType; // The default fill type.
  1688. showDragFillSmartTag :boolean ; // Whether to display the drag fill dialog.
  1689. showHorizontalScrollbar :boolean ; // Whether to display the horizontal scroll bar.
  1690. showVerticalScrollbar :boolean ; // Whether to display the vertical scroll bar.
  1691. scrollbarShowMax :boolean ; // Whether the displayed scroll bars are based on the entire number of columns and rows in the sheet.
  1692. scrollbarMaxAlign :boolean ; // Whether the scroll bar aligns with the last row and column of the active sheet.
  1693. tabStripVisible :boolean ; // Whether to display the sheet tab strip.
  1694. tabStripRatio :number; // The width of the tab strip expressed as a percentage of the overall horizontal scroll bar width.
  1695. tabEditable :boolean ; // Whether to allow the user to edit the sheet tab strip.
  1696. newTabVisible :boolean ; // Whether the spreadsheet displays the special tab to let users insert new sheets.
  1697. tabNavigationVisible :boolean ; // Whether to display the sheet tab navigation.
  1698. cutCopyIndicatorVisible :boolean ; // Whether to display an indicator when copying or cutting the selected item.
  1699. cutCopyIndicatorBorderColor :string; // The border color for the indicator displayed when the user cuts or copies the selection.
  1700. backColor :string; // A color string used to represent the background color of the Spread component, such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5", and so on.
  1701. backgroundImage :string; // The background image of the Spread component.
  1702. backgroundImageLayout :GC.Spread.Sheets.ImageLayout; // The background image layout for the Spread component.
  1703. grayAreaBackColor :string; // A color string used to represent the background color of the gray area , such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5", and so on.
  1704. showResizeTip :GC.Spread.Sheets.ShowResizeTip; // How to display the resize tip.
  1705. showDragDropTip :boolean ; // Whether to display the drag-drop tip.
  1706. showDragFillTip :boolean ; // Whether to display the drag-fill tip.
  1707. showScrollTip :GC.Spread.Sheets.ShowScrollTip; // How to display the scroll tip.
  1708. scrollIgnoreHidden :boolean ; // Whether the scroll bar ignores hidden rows or columns.
  1709. highlightInvalidData :boolean ; // Whether to highlight invalid data.
  1710. useTouchLayout :boolean ; // Whether to use touch layout to present the Spread component.
  1711. hideSelection :boolean ; // Whether to display the selection highlighting when the Spread component does not have focus.
  1712. resizeZeroIndicator :GC.Spread.Sheets.ResizeZeroIndicator; // The drawing policy when the row or column is resized to zero.
  1713. allowUserEditFormula :boolean ; // Whether the user can edit formulas in a cell in the spreadsheet.
  1714. enableFormulaTextbox :boolean ; // Whether to enable the formula text box in the spreadsheet.
  1715. autoFitType :GC.Spread.Sheets.AutoFitType; // Whether content will be formatted to fit in cells or in cells and headers.
  1716. referenceStyle :GC.Spread.Sheets.ReferenceStyle; // The style for cell and range references in cell formulas on this sheet.
  1717. allowDynamicArray :boolean ; //Whether to enable the dynamic array.
  1718. calcOnDemand :boolean; // Whether to calculate formulas only when they are demanded.
  1719. allowCopyPasteExcelStyle :boolean ; //Whether the user can copy style from Spread Sheets then paste to Excel, or copy style from Excel then paste to Spread Sheets.
  1720. allowExtendPasteRange :boolean ; //Whether extend paste range if the paste range is not enough for pasting.
  1721. copyPasteHeaderOptions :GC.Spread.Sheets.CopyPasteHeaderOptions; // Which headers are included when data is copied to or pasted.
  1722. scrollByPixel: boolean; // Whether to enable the precision scrolling by pixel.
  1723. scrollPixel: number; // Decides scrolling by that number of pixels at a time when scrollByPixel is true. The final scrolling pixels are the result of scrolling delta multiply scrollPixel. For example, the scrolling delta is 3, and the scrollPixel is 5, the final scrolling pixels are 15.
  1724. allowAutoCreateHyperlink: boolean; // Whether to enable auto creating hyperlink in the spreadsheet.
  1725. columnResizeMode: GC.Spread.Sheets.ResizeMode; // Specifies the way to resize column.
  1726. rowResizeMode: GC.Spread.Sheets.ResizeMode; // Specifies the way to resize row.
  1727. customList?: string[][]; // The list for user to customize drag fill, prioritize matching this list in each fill. Each array item is type of string array.
  1728. }
  1729. export interface IWorkFlowItem{
  1730. value: string;
  1731. transitions: number[]|string[];
  1732. }
  1733. export interface IWorkFlowOption{
  1734. items:GC.Spread.Sheets.IWorkFlowItem[];
  1735. }
  1736. export interface IWorkSheetGridlineOption{
  1737. color?: string; //The grid line color
  1738. showVerticalGridline?: boolean; //Whether to show the vertical grid line.
  1739. showHorizontalGridline?: boolean; //Whether to show the horizontal grid line.
  1740. }
  1741. export interface IWorksheetOptions{
  1742. allowCellOverflow: boolean; //indicates whether data can overflow into adjacent empty cells.
  1743. showFormulas: boolean; //indicates whether display the formulas string not the formula result.
  1744. sheetTabColor: string; //A color string used to represent the sheet tab color, such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5", and so on.
  1745. frozenlineColor: string; //A color string used to represent the frozen line color, such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5", and so on.
  1746. clipBoardOptions: GC.Spread.Sheets.ClipboardPasteOptions; //The clipboard option.
  1747. gridline: GC.Spread.Sheets.IWorkSheetGridlineOption; //The grid line's options.
  1748. rowHeaderVisible: boolean; //Indicates whether the row header is visible.
  1749. colHeaderVisible: boolean; //Indicates whether the column header is visible.
  1750. rowHeaderAutoText: GC.Spread.Sheets.HeaderAutoText; //Indicates whether the row header displays letters or numbers or is blank.
  1751. colHeaderAutoText: GC.Spread.Sheets.HeaderAutoText; //Indicates whether the column header displays letters or numbers or is blank.
  1752. rowHeaderAutoTextIndex: GC.Spread.Sheets.HeaderAutoText; //Specifies which row header column displays the automatic text when there are multiple row header columns.
  1753. colHeaderAutoTextIndex: GC.Spread.Sheets.HeaderAutoText; //Specifies which column header row displays the automatic text when there are multiple column header rows.
  1754. isProtected: boolean; //Indicates whether cells on this sheet that are marked as protected cannot be edited.
  1755. protectionOptions: GC.Spread.Sheets.IProtectionOptions; //A value that indicates the elements that you want users to be able to change.
  1756. selectionBackColor: string; //The selection's background color for the sheet.
  1757. selectionBorderColor: string; //The selection's border color for the sheet.
  1758. }
  1759. export interface IWorkSheetSheetAreaOffsetOption{
  1760. left?: number; //The offset left of sheet from host.
  1761. top?: number; //The offset top of sheet from host
  1762. }
  1763. export interface SheetTabInfo{
  1764. sheetName?: string;
  1765. sheetIndex?: number;
  1766. }
  1767. /**
  1768. * Represents whether the component automatically resizes cells or headers.
  1769. * @enum {number}
  1770. * @example
  1771. * //This example uses the AutoFitType enumeration.
  1772. * spread.options.autoFitType = GC.Spread.Sheets.AutoFitType.cellWithHeader;
  1773. */
  1774. export enum AutoFitType{
  1775. /**
  1776. * The component autofits cells.
  1777. */
  1778. cell= 0,
  1779. /**
  1780. * The component autofits cells and headers.
  1781. */
  1782. cellWithHeader= 1
  1783. }
  1784. /**
  1785. * Specifies the type of cellbutton.
  1786. * @enum {number}
  1787. * @example
  1788. * //This example sets the type of cellbutton.
  1789. * //create config
  1790. * leftButtonConfig1 = {
  1791. * caption: "left",
  1792. * enabled: true,
  1793. * isLeft: true,
  1794. * imageType:GC.Spread.Sheets.ButtonImageType.always,
  1795. * };
  1796. * rightButtonConfig1 = {
  1797. * caption: "left",
  1798. * enabled: true,
  1799. * isLeft: false,
  1800. * imageType:GC.Spread.Sheets.ButtonImageType.onseleciton,
  1801. * };
  1802. * //create style
  1803. * var style = new GC.Spread.Sheets.Style();
  1804. * style.cellButtons=[
  1805. * leftButtonConfig1,
  1806. * rightButtonConfig1
  1807. * ];
  1808. * sheet.setStyle(0, 0, style);
  1809. */
  1810. export enum ButtonImageType{
  1811. /** Indicates the cellbutton image type is none.
  1812. * @type {number}
  1813. */
  1814. none= 0,
  1815. /** Indicates the cellbutton type is custom.
  1816. * @type {number}
  1817. */
  1818. custom= 1,
  1819. /** Indicates the cellbutton type is clear.
  1820. * @type {number}
  1821. */
  1822. clear= 2,
  1823. /** Indicates the cellbutton type is calcel.
  1824. * @type {number}
  1825. */
  1826. calcel= 3,
  1827. /** Indicates the cellbutton type is ok.
  1828. * @type {number}
  1829. */
  1830. ok= 4,
  1831. /** Indicates the cellbutton type is dropdown.
  1832. * @type {number}
  1833. */
  1834. dropdown= 5,
  1835. /** Indicates the cellbutton type is ellipsis.
  1836. * @type {number}
  1837. */
  1838. ellipsis= 6,
  1839. /** Indicates the cellbutton type is left.
  1840. * @type {number}
  1841. */
  1842. left= 7,
  1843. /** Indicates the cellbutton type is right.
  1844. * @type {number}
  1845. */
  1846. right= 8,
  1847. /** Indicates the cellbutton type is plus.
  1848. * @type {number}
  1849. */
  1850. plus= 9,
  1851. /** Indicates the cellbutton type is minus.
  1852. * @type {number}
  1853. */
  1854. minus= 10,
  1855. /** Indicates the cellbutton type is undo.
  1856. * @type {number}
  1857. */
  1858. undo= 11,
  1859. /** Indicates the cellbutton type is redo.
  1860. * @type {number}
  1861. */
  1862. redo= 12,
  1863. /** Indicates the cellbutton type is search.
  1864. * @type {number}
  1865. */
  1866. search= 13,
  1867. /** Indicates the cellbutton type is separator.
  1868. * @type {number}
  1869. */
  1870. separator= 14,
  1871. /** Indicates the cellbutton type is spinLeft.
  1872. * @type {number}
  1873. */
  1874. spinLeft= 15,
  1875. /** Indicates the cellbutton type is spinRight.
  1876. * @type {number}
  1877. */
  1878. spinRight= 16
  1879. }
  1880. /**
  1881. * Specifies the position of cellbutton.
  1882. * @enum {number}
  1883. * @example
  1884. * //This example sets the position of cellbutton.
  1885. * //create config
  1886. * leftButtonConfig1 = {
  1887. * caption: "left",
  1888. * enabled: true,
  1889. * position: GC.Spread.Sheets.ButtonPosition.right,
  1890. * visibility:GC.Spread.Sheets.ButtonVisibility.always,
  1891. * };
  1892. * rightButtonConfig1 = {
  1893. * caption: "left",
  1894. * enabled: true,
  1895. * position: GC.Spread.Sheets.ButtonPosition.left,
  1896. * visibility:GC.Spread.Sheets.ButtonVisibility.onseleciton,
  1897. * };
  1898. * //create style
  1899. * var style = new GC.Spread.Sheets.Style();
  1900. * style.cellButtons=[
  1901. * leftButtonConfig1,
  1902. * rightButtonConfig1
  1903. * ];
  1904. * sheet.setStyle(0, 0, style);
  1905. */
  1906. export enum ButtonPosition{
  1907. /** Indicates the cellbutton is in left of the cell.
  1908. * @type {number}
  1909. */
  1910. left= 0,
  1911. /** Indicates the cellbutton is in right of the cell.
  1912. * @type {number}
  1913. */
  1914. right= 1
  1915. }
  1916. /**
  1917. * Specifies the visibility of cellbutton.
  1918. * @enum {number}
  1919. * @example
  1920. * //This example sets the visibility of cellbutton.
  1921. * //create config
  1922. * leftButtonConfig1 = {
  1923. * caption: "left",
  1924. * enabled: true,
  1925. * isLeft: true,
  1926. * visibility:GC.Spread.Sheets.ButtonVisibility.always,
  1927. * };
  1928. * rightButtonConfig1 = {
  1929. * caption: "left",
  1930. * enabled: true,
  1931. * isLeft: false,
  1932. * visibility:GC.Spread.Sheets.ButtonVisibility.onseleciton,
  1933. * };
  1934. * //create style
  1935. * var style = new GC.Spread.Sheets.Style();
  1936. * style.cellButtons=[
  1937. * leftButtonConfig1,
  1938. * rightButtonConfig1
  1939. * ];
  1940. * sheet.setStyle(0, 0, style);
  1941. */
  1942. export enum ButtonVisibility{
  1943. /** Indicates the cellbutton alway visible.
  1944. * @type {number}
  1945. */
  1946. always= 0,
  1947. /** Indicates the cellbutton visible when the cell is active.
  1948. * @type {number}
  1949. */
  1950. onSelected= 1,
  1951. /** Indicates the cellbutton visible when the cell enter edit.
  1952. * @type {number}
  1953. */
  1954. onEditing= 2
  1955. }
  1956. /**
  1957. * Specifies the calendar's default page.
  1958. * @enum {number}
  1959. */
  1960. export enum CalendarPage{
  1961. /**
  1962. * Specifies the calendar's default page is year.
  1963. */
  1964. year= 1,
  1965. /**
  1966. * Specifies the calendar's default page is month.
  1967. */
  1968. month= 2,
  1969. /**
  1970. * Specifies the calendar's default page is day.
  1971. */
  1972. day= 3
  1973. }
  1974. /**
  1975. * Specifies the calendar's start day.
  1976. * @enum {number}
  1977. */
  1978. export enum CalendarStartDay{
  1979. /**
  1980. * Specifies the calendar's start day is Monday.
  1981. */
  1982. monday= 1,
  1983. /**
  1984. * Specifies the calendar's start day is Tuesday.
  1985. */
  1986. tuesday= 2,
  1987. /**
  1988. * Specifies the calendar's start day is Wednesday.
  1989. */
  1990. wednesday= 3,
  1991. /**
  1992. * Specifies the calendar's start day is Thursday.
  1993. */
  1994. thursday= 4,
  1995. /**
  1996. * Specifies the calendar's start day is Friday.
  1997. */
  1998. friday= 5,
  1999. /**
  2000. * Specifies the calendar's start day is Saturday.
  2001. */
  2002. saturday= 6,
  2003. /**
  2004. * Specifies the calendar's start day is Sunday.
  2005. */
  2006. sunday= 7
  2007. }
  2008. /**
  2009. * Specifies the position of caption.
  2010. * @enum {number}
  2011. * @example
  2012. * //This example sets the position of caption.
  2013. * //create config
  2014. * leftButtonConfig1 = {
  2015. * caption: "left",
  2016. * enabled: true,
  2017. * position: GC.Spread.Sheets.ButtonPosition.right,
  2018. * captionAlign:GC.Spread.Sheets.CaptionAlignment.right,
  2019. * };
  2020. * rightButtonConfig1 = {
  2021. * caption: "left",
  2022. * enabled: true,
  2023. * position: GC.Spread.Sheets.ButtonPosition.left,
  2024. * captionAlign:GC.Spread.Sheets.CaptionAlignment.left,
  2025. * };
  2026. * //create style
  2027. * var style = new GC.Spread.Sheets.Style();
  2028. * style.cellButtons=[
  2029. * leftButtonConfig1,
  2030. * rightButtonConfig1
  2031. * ];
  2032. * sheet.setStyle(0, 0, style);
  2033. */
  2034. export enum CaptionAlignment{
  2035. /** Indicates the caption is in left of the button.
  2036. * @type {number}
  2037. */
  2038. left= 0,
  2039. /** Indicates the caption is in right of the button.
  2040. * @type {number}
  2041. */
  2042. right= 1
  2043. }
  2044. /**
  2045. * Specifies the type of CellState.
  2046. * @enum {number}
  2047. */
  2048. export enum CellStatesType{
  2049. /** When mouse hover on the cell , cell state include "hover" state.
  2050. * @type {number}
  2051. */
  2052. hover= 1,
  2053. /** When the data-validation conditional evaluate fail, cell state include "invalid" state.
  2054. * @type {number}
  2055. */
  2056. invalid= 2,
  2057. /** When the cell is locked in protect worksheet , cell state include "readonly" state.
  2058. * @type {number}
  2059. */
  2060. readonly= 4,
  2061. /** When the cell is editing, cell state include "edit" state.
  2062. * @type {number}
  2063. */
  2064. edit= 8,
  2065. /** When the cell is focus, cell state include "active" state.
  2066. * @type {number}
  2067. */
  2068. active= 16,
  2069. /** When the cell is in the selection range, cell state include "selected" state.
  2070. * @type {number}
  2071. */
  2072. selected= 32,
  2073. /** When cell value is changed, cell state include "dirty" state.
  2074. * @type {number}
  2075. */
  2076. dirty= 64
  2077. }
  2078. /**
  2079. * Specifies what data is pasted from the Clipboard.
  2080. * @enum {number}
  2081. * @example
  2082. * //This example uses the ClipboardPasteOptions enumeration.
  2083. * activeSheet.options.clipBoardOptions = GC.Spread.Sheets.ClipboardPasteOptions.values;
  2084. */
  2085. export enum ClipboardPasteOptions{
  2086. /**
  2087. * Pastes all data objects, including values, formatting, and formulas.
  2088. */
  2089. all= 0,
  2090. /**
  2091. * Pastes only values.
  2092. */
  2093. values= 1,
  2094. /**
  2095. * Pastes only formatting.
  2096. */
  2097. formatting= 2,
  2098. /**
  2099. * Pastes only formulas.
  2100. */
  2101. formulas= 3,
  2102. /**
  2103. * Pastes values and formatting.
  2104. */
  2105. valuesAndFormatting= 4,
  2106. /**
  2107. * Pastes formulas and formatting.
  2108. */
  2109. formulasAndFormatting= 5
  2110. }
  2111. /**
  2112. * Specifies which headers are included when data is copied to or pasted.
  2113. * @enum {number}
  2114. * @example
  2115. * //This example allows you to copy and paste headers.
  2116. * spread.options.copyPasteHeaderOptions = GC.Spread.Sheets.CopyPasteHeaderOptions.allHeaders;
  2117. * activeSheet.setRowCount(2,GC.Spread.Sheets.SheetArea.colHeader);
  2118. * activeSheet.setColumnCount(2,GC.Spread.Sheets.SheetArea.rowHeader);
  2119. * activeSheet.setValue(0, 2,"Column",GC.Spread.Sheets.SheetArea.colHeader);
  2120. * activeSheet.setValue(1, 0,"Row",GC.Spread.Sheets.SheetArea.rowHeader);
  2121. */
  2122. export enum CopyPasteHeaderOptions{
  2123. /**
  2124. * Includes neither column nor row headers when data is copied; does not overwrite selected column or row headers when data is pasted.
  2125. */
  2126. noHeaders= 0,
  2127. /**
  2128. * Includes selected row headers when data is copied; overwrites selected row headers when data is pasted.
  2129. */
  2130. rowHeaders= 1,
  2131. /**
  2132. * Includes selected column headers when data is copied; overwrites selected column headers when data is pasted.
  2133. */
  2134. columnHeaders= 2,
  2135. /**
  2136. * Includes selected headers when data is copied; overwrites selected headers when data is pasted.
  2137. */
  2138. allHeaders= 3
  2139. }
  2140. /**
  2141. * Specifies the copy to option.
  2142. * @enum {number}
  2143. * @example
  2144. * //This example uses the CopyToOption enumeration.
  2145. * activeSheet.getCell(0,0).value("1");
  2146. * activeSheet.copyTo(0,0,1,1,2,2,GC.Spread.Sheets.CopyToOptions.value);
  2147. */
  2148. export enum CopyToOptions{
  2149. /**
  2150. * Indicates the type of data is pure data.
  2151. */
  2152. value= 1,
  2153. /**
  2154. * Indicates the type of data is a formula.
  2155. */
  2156. formula= 2,
  2157. /**
  2158. * Indicates the type of data is a comment.
  2159. */
  2160. comment= 4,
  2161. /**
  2162. * Indicates to copy a range group.
  2163. */
  2164. outline= 8,
  2165. /**
  2166. * Indicates the type of data is a sparkline.
  2167. */
  2168. sparkline= 16,
  2169. /**
  2170. * Indicates to copy a span.
  2171. */
  2172. span= 32,
  2173. /**
  2174. * Indicates the type of data is a style.
  2175. */
  2176. style= 64,
  2177. /**
  2178. * Indicates the type of data is a tag.
  2179. */
  2180. tag= 128,
  2181. /**
  2182. * Indicates the type of data is a binding path.
  2183. */
  2184. bindingPath= 256,
  2185. /**
  2186. * Indicates the type of data is a conditional format.
  2187. */
  2188. conditionalFormat= 512,
  2189. /**
  2190. * Indicates the type of data is a hyperlink.
  2191. */
  2192. hyperlink= 1024,
  2193. /**
  2194. * Indicates all types of data.
  2195. */
  2196. all= 2047
  2197. }
  2198. /**
  2199. * Specifies the cell value type of dropdown list result.
  2200. * @enum {number}
  2201. */
  2202. export enum DropdownListValue{
  2203. /**
  2204. * Use the string of list select result, use comma to split.
  2205. */
  2206. string= 0,
  2207. /**
  2208. * Specifies the sort will move the group containt with sort.
  2209. */
  2210. array= 1
  2211. }
  2212. /**
  2213. * Specifies the type of dropdown.
  2214. * @enum {number}
  2215. * @example
  2216. * //This example sets the type of dropdown.
  2217. * //create style
  2218. * var style = new GC.Spread.Sheets.Style();
  2219. * style.dropDowns=[
  2220. * {
  2221. * type:GC.Spread.Sheets.DropDownType.dateTimePicker,
  2222. * option: {
  2223. * showTime:false
  2224. * }
  2225. * }
  2226. * ];
  2227. * sheet.setStyle(0, 0, style);
  2228. */
  2229. export enum DropDownType{
  2230. /** Indicates the type of dropdown is colorpicker.
  2231. * @type {number}
  2232. */
  2233. colorPicker= 0,
  2234. /** Indicates the type of dropdown is dateTimePicker.
  2235. * @type {number}
  2236. */
  2237. dateTimePicker= 1,
  2238. /** Indicates the type of dropdown is timePicker.
  2239. * @type {number}
  2240. */
  2241. timePicker= 2,
  2242. /** Indicates the type of dropdown is monthPicker.
  2243. * @type {number}
  2244. */
  2245. monthPicker= 3,
  2246. /** Indicates the type of dropdown is list.
  2247. * @type {number}
  2248. */
  2249. list= 4,
  2250. /** Indicates the type of dropdown is slider.
  2251. * @type {number}
  2252. */
  2253. slider= 5,
  2254. /** Indicates the type of dropdown is calculator.
  2255. * @type {number}
  2256. */
  2257. calculator= 6,
  2258. /** Indicates the type of dropdown is workflowList.
  2259. * @type {number}
  2260. */
  2261. workflowList= 7
  2262. }
  2263. /**
  2264. * Specifies the editor status.
  2265. * @enum {number}
  2266. */
  2267. export enum EditorStatus{
  2268. /**
  2269. * Cell is in Ready mode.
  2270. */
  2271. ready= 0,
  2272. /**
  2273. * Cell is in editing mode and can commit the input value and navigate to or select other cells when invoking navigation or selection actions.
  2274. */
  2275. enter= 1,
  2276. /**
  2277. * Cell is in editing mode and cannot commit the input value and navigate to or select other cells.
  2278. */
  2279. edit= 2
  2280. }
  2281. /**
  2282. * Specifies which default labels are displayed in headers.
  2283. * @enum {number}
  2284. */
  2285. export enum HeaderAutoText{
  2286. /**
  2287. * Displays blanks in the headers.
  2288. */
  2289. blank= 0,
  2290. /**
  2291. * Displays numbers in the headers.
  2292. */
  2293. numbers= 1,
  2294. /**
  2295. * Displays letters in the headers.
  2296. */
  2297. letters= 2
  2298. }
  2299. /**
  2300. * Specifies the horizontal alignment.
  2301. * @enum {number}
  2302. * @example
  2303. * //This example uses the HorizontalAlign type.
  2304. * var style = new GC.Spread.Sheets.Style();
  2305. * style.font = "8pt Arial";
  2306. * style.hAlign = GC.Spread.Sheets.HorizontalAlign.center;
  2307. * style.vAlign = GC.Spread.Sheets.VerticalAlign.center;
  2308. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  2309. * activeSheet.getCell(1,1).value("B2");
  2310. */
  2311. export enum HorizontalAlign{
  2312. /**
  2313. * Indicates that the cell content is left-aligned.
  2314. */
  2315. left= 0,
  2316. /**
  2317. * Indicates that the cell content is centered.
  2318. */
  2319. center= 1,
  2320. /**
  2321. * Indicates that the cell content is right-aligned.
  2322. */
  2323. right= 2,
  2324. /**
  2325. * Indicates that the horizontal alignment is based on the value type.
  2326. */
  2327. general= 3
  2328. }
  2329. /**
  2330. * Specifies the horizontal position of the cell or column in the component.
  2331. * @enum {number}
  2332. * @example
  2333. * //This example uses the HorizontalPosition enumeration.
  2334. * activeSheet.setActiveCell(10,5);
  2335. * activeSheet.showCell(10, 5, GC.Spread.Sheets.VerticalPosition.top, GC.Spread.Sheets.HorizontalPosition.center);
  2336. */
  2337. export enum HorizontalPosition{
  2338. /**
  2339. * Positions the cell or column to the left.
  2340. */
  2341. left= 0,
  2342. /**
  2343. * Positions the cell or column in the center.
  2344. */
  2345. center= 1,
  2346. /**
  2347. * Positions the cell or column to the right.
  2348. */
  2349. right= 2,
  2350. /**
  2351. * Positions the cell or column to the nearest edge.
  2352. */
  2353. nearest= 3
  2354. }
  2355. /**
  2356. * Defines the background image layout.
  2357. * @enum {number}
  2358. * @example
  2359. * var rowImage = "./css/images/quarter1.png";
  2360. * sheet.getCell(1, -1).backgroundImage(rowImage);
  2361. * sheet.getCell(1, -1).backgroundImageLayout(GC.Spread.Sheets.ImageLayout.center);
  2362. */
  2363. export enum ImageLayout{
  2364. /** Specifies that the background image fills the area.
  2365. * @type {number}
  2366. */
  2367. stretch= 0,
  2368. /** Specifies that the background image displays in the center of the area.
  2369. * @type {number}
  2370. */
  2371. center= 1,
  2372. /** Specifies that the background image displays in the area with its original aspect ratio.
  2373. * @type {number}
  2374. */
  2375. zoom= 2,
  2376. /** Specifies that the background image displays in the upper left corner of the area with its original size.
  2377. * @type {number}
  2378. */
  2379. none= 3
  2380. }
  2381. /**
  2382. * Defines the IME mode to control the state of the Input Method Editor (IME).
  2383. * @enum {number}
  2384. * @example
  2385. * //This example uses the imeMode method.
  2386. * activeSheet.getRange(-1, 2, -1, 1).imeMode(GC.Spread.Sheets.ImeMode.auto);
  2387. */
  2388. export enum ImeMode{
  2389. /**
  2390. * No change is made to the current input method editor state.
  2391. */
  2392. auto= 1,
  2393. /** All characters are entered through the IME. Users can still deactivate the IME.
  2394. */
  2395. active= 2,
  2396. /**
  2397. * All characters are entered without IME. Users can still activate the IME.
  2398. */
  2399. inactive= 4,
  2400. /**
  2401. * The input method editor is disabled and may not be activated by the user.
  2402. */
  2403. disabled= 0
  2404. }
  2405. /**
  2406. * Specifies paste the direction of the insertion finger.
  2407. * @enum {number}
  2408. */
  2409. export enum InsertShiftCell{
  2410. /** Specifies paste the direction right.
  2411. * @type {number}
  2412. */
  2413. right= 0,
  2414. /** Specifies paste the direction down.
  2415. * @type {number}
  2416. */
  2417. down= 1
  2418. }
  2419. /**
  2420. * Identifies which operation was invalid.
  2421. * @enum {number}
  2422. * @example
  2423. * //This example gets the invalid type.
  2424. * activeSheet.getCell(1,1).locked(true);
  2425. * activeSheet.options.isProtected = true;
  2426. * activeSheet.getCell(1,1).value(2);
  2427. * //Bind event
  2428. * activeSheet.bind(GC.Spread.Sheets.Events.InvalidOperation, function (e, info) {
  2429. * alert("Message (" + info.invalidType + ")");
  2430. * });
  2431. */
  2432. export enum InvalidOperationType{
  2433. /**
  2434. * Specifes the formula is invalid.
  2435. */
  2436. setFormula= 0,
  2437. /**
  2438. * Specifies the copy paste is invalid.
  2439. */
  2440. copyPaste= 1,
  2441. /**
  2442. * Specifies the drag fill is invalid.
  2443. */
  2444. dragFill= 2,
  2445. /**
  2446. * Specifies the drag drop is invalid.
  2447. */
  2448. dragDrop= 3,
  2449. /**
  2450. * Specifies the insert row is invalid.
  2451. */
  2452. changePartOfArrayFormula= 4,
  2453. /**
  2454. * Specifies the changed sheet name is invalid.
  2455. */
  2456. changeSheetName= 5
  2457. }
  2458. /**
  2459. * Specifies the cell label position.
  2460. * @enum {number}
  2461. * @example
  2462. * //This example sets cell padding, alignment, and other options.
  2463. * var type = new GC.Spread.Sheets.Style();
  2464. * type.watermark = "User name";
  2465. * type.cellPadding = "20";
  2466. * type.labelOptions = {alignment:GC.Spread.Sheets.LabelAlignment.topLeft, visibility: GC.Spread.Sheets.LabelVisibility.visible};
  2467. * activeSheet.setStyle(0, 1, type);
  2468. * activeSheet.getRange(0, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).height(60);
  2469. * activeSheet.getRange(-1, 1, -1, 1).width(150);
  2470. * var combo = new GC.Spread.Sheets.CellTypes.ComboBox();
  2471. * combo.items([{ text: "Oranges", value: "11k" }, { text: "Apples", value: "15k" }, { text: "Grape", value: "100k" }]);
  2472. * combo.editorValueType(GC.Spread.Sheets.CellTypes.EditorValueType.text);
  2473. * activeSheet.setCellType(2, 1, combo, GC.Spread.Sheets.SheetArea.viewport);
  2474. * activeSheet.getCell(2, 1, GC.Spread.Sheets.SheetArea.viewport).watermark("ComboBox Cell Type").cellPadding('10 10 20 10');
  2475. * activeSheet.getCell(2, 1, GC.Spread.Sheets.SheetArea.viewport).labelOptions({alignment: GC.Spread.Sheets.LabelAlignment.bottomCenter, foreColor: 'yellowgreen', font: 'bold 15px Arial'});
  2476. * activeSheet.getRange(2, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).height(60);
  2477. */
  2478. export enum LabelAlignment{
  2479. /**
  2480. * Indicates that the cell label position is top-left.
  2481. */
  2482. topLeft= 0,
  2483. /**
  2484. * Indicates that the cell label position is top-center.
  2485. */
  2486. topCenter= 1,
  2487. /**
  2488. * Indicates that the cell label position is top-right.
  2489. */
  2490. topRight= 2,
  2491. /**
  2492. * Indicates that the cell label position is bottom-left.
  2493. */
  2494. bottomLeft= 3,
  2495. /**
  2496. * Indicates that the cell label position is bottom-center.
  2497. */
  2498. bottomCenter= 4,
  2499. /**
  2500. * Indicates that the cell label position is bottom-right.
  2501. */
  2502. bottomRight= 5
  2503. }
  2504. /**
  2505. * Specifies the cell label visibility.
  2506. * @enum {number}
  2507. * @example
  2508. * //This example sets label options for the watermark.
  2509. * var type = new GC.Spread.Sheets.Style();
  2510. * type.watermark = "User name";
  2511. * type.cellPadding = "20";
  2512. * type.labelOptions = {alignment:GC.Spread.Sheets.LabelAlignment.topLeft, visibility: GC.Spread.Sheets.LabelVisibility.visible};
  2513. * activeSheet.setStyle(0, 1, type);
  2514. * activeSheet.getRange(0, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).height(60);
  2515. * activeSheet.getRange(-1, 1, -1, 1).width(150);
  2516. * var combo = new GC.Spread.Sheets.CellTypes.ComboBox();
  2517. * combo.items([{ text: "Oranges", value: "11k" }, { text: "Apples", value: "15k" }, { text: "Grape", value: "100k" }]);
  2518. * combo.editorValueType(GC.Spread.Sheets.CellTypes.EditorValueType.text);
  2519. * activeSheet.setCellType(2, 1, combo, GC.Spread.Sheets.SheetArea.viewport);
  2520. * activeSheet.getCell(2, 1, GC.Spread.Sheets.SheetArea.viewport).watermark("ComboBox Cell Type").cellPadding('10 10 20 10');
  2521. * activeSheet.getCell(2, 1, GC.Spread.Sheets.SheetArea.viewport).labelOptions({alignment: GC.Spread.Sheets.LabelAlignment.bottomCenter, foreColor: 'yellowgreen', font: 'bold 15px Arial'});
  2522. * activeSheet.getRange(2, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).height(60);
  2523. */
  2524. export enum LabelVisibility{
  2525. /**
  2526. * Specifies to always show the watermark in the padding area and not to show the watermark in the cell area, regardless of the cell value.
  2527. */
  2528. visible= 0,
  2529. /**
  2530. * Specifies to not show the watermark in the padding area, but to show the watermark in the cell area based on a value condition.
  2531. */
  2532. hidden= 1,
  2533. /**
  2534. * Specifies to show the watermark in the padding area when the cell has a value or to show the watermark in the cell area if the cell does not have a value.
  2535. */
  2536. auto= 2
  2537. }
  2538. /**
  2539. * Specifies the layout direction.
  2540. * @enum {number}
  2541. */
  2542. export enum LayoutDirection{
  2543. /**
  2544. * Specifies layout direction is horizontal.
  2545. */
  2546. horizontal= 0,
  2547. /**
  2548. * Specifies layout direction is vertical.
  2549. */
  2550. vertical= 1
  2551. }
  2552. /**
  2553. * Specifies the layout display.
  2554. * @enum {number}
  2555. */
  2556. export enum LayoutDisplayAs{
  2557. /**
  2558. * Specifies layout display is inline.
  2559. */
  2560. inline= 0,
  2561. /**
  2562. * Specifies layout display is popup
  2563. */
  2564. popup= 1,
  2565. /**
  2566. * Specifies layout display is tree
  2567. */
  2568. tree= 2
  2569. }
  2570. /**
  2571. * Specifies the line drawing style for the border.
  2572. * @enum {number}
  2573. * @example
  2574. * //This example creates a border.
  2575. * var border = new GC.Spread.Sheets.LineBorder
  2576. * border.color = "#7FFFD4";
  2577. * border.style = GC.Spread.Sheets.LineStyle.double;
  2578. * var cell = activeSheet.getCell(1, 1, GC.Spread.Sheets.SheetArea.viewport);
  2579. * cell.borderLeft(border);
  2580. */
  2581. export enum LineStyle{
  2582. /**
  2583. * Indicates a border line without a style.
  2584. */
  2585. empty= 0,
  2586. /**
  2587. * Indicates a border line with a solid thin line.
  2588. */
  2589. thin= 1,
  2590. /**
  2591. * Indicates a medium border line with a solid line.
  2592. */
  2593. medium= 2,
  2594. /**
  2595. * Indicates a border line with dashes.
  2596. */
  2597. dashed= 3,
  2598. /**
  2599. * Indicates a border line with dots.
  2600. */
  2601. dotted= 4,
  2602. /**
  2603. * Indicates a thick border line with a solid line.
  2604. */
  2605. thick= 5,
  2606. /**
  2607. * Indicates a double border line.
  2608. */
  2609. double= 6,
  2610. /**
  2611. * Indicates a border line with all dots.
  2612. */
  2613. hair= 7,
  2614. /**
  2615. * Indicates a medium border line with dashes.
  2616. */
  2617. mediumDashed= 8,
  2618. /**
  2619. * Indicates a border line with dash-dot.
  2620. */
  2621. dashDot= 9,
  2622. /**
  2623. * Indicates a medium border line with dash-dot-dot.
  2624. */
  2625. mediumDashDot= 10,
  2626. /**
  2627. * Indicates a border line with dash-dot-dot.
  2628. */
  2629. dashDotDot= 11,
  2630. /**
  2631. * Indicates a medium border line with dash-dot-dot.
  2632. */
  2633. mediumDashDotDot= 12,
  2634. /**
  2635. * Indicates a slanted border line with dash-dot.
  2636. */
  2637. slantedDashDot= 13
  2638. }
  2639. /**
  2640. * Defines the type of action that raised the RangeChanged event.
  2641. * @enum {number}
  2642. */
  2643. export enum RangeChangedAction{
  2644. /**
  2645. * Indicates drag drop undo action.
  2646. */
  2647. dragDrop= 0,
  2648. /**
  2649. * Indicates drag fill undo action.
  2650. */
  2651. dragFill= 1,
  2652. /**
  2653. * Indicates clear range value undo action.
  2654. */
  2655. clear= 2,
  2656. /**
  2657. * Indicates paste undo action.
  2658. */
  2659. paste= 3,
  2660. /**
  2661. * Indicates sorting a range of cells.
  2662. */
  2663. sort= 4,
  2664. /**
  2665. * Indicates setting a formula in a specified range of cells .
  2666. */
  2667. setArrayFormula= 5,
  2668. /**
  2669. * Indicates setting a formula in a specified range of cells .
  2670. */
  2671. evaluateFormula= 6
  2672. }
  2673. /**
  2674. * Specifies the formula reference style.
  2675. * @enum {number}
  2676. * @example
  2677. * //This example sets the reference style for the active sheet.
  2678. * activeSheet.options.referenceStyle = GC.Spread.Sheets.ReferenceStyle.r1c1;
  2679. */
  2680. export enum ReferenceStyle{
  2681. /**
  2682. * Indicates a1 style.
  2683. */
  2684. a1= 0,
  2685. /**
  2686. * Indicates r1c1 style.
  2687. */
  2688. r1c1= 1
  2689. }
  2690. /**
  2691. * Specifies the way resizing use.
  2692. * @enum {number}
  2693. * @example
  2694. * //This example shows you how to specify the resize way.
  2695. * spread.options.columnResizeMode = GC.Spread.Sheets.ResizeMode.split;
  2696. * spread.options.rowResizeMode = GC.Spread.Sheets.ResizeMode.normal;
  2697. */
  2698. export enum ResizeMode{
  2699. /** Specifies use normal way to resize.
  2700. * @type {number}
  2701. */
  2702. normal= 0,
  2703. /** Specifies use split way to resize.
  2704. * @type {number}
  2705. */
  2706. split= 1
  2707. }
  2708. /**
  2709. * Specifies the drawing policy of the row or column when it is resized to zero.
  2710. * @enum {number}
  2711. * @example
  2712. * //This example displays double grid lines for the column or row with zero width or height.
  2713. * spread.options.resizeZeroIndicator = GC.Spread.Sheets.ResizeZeroIndicator.enhanced;
  2714. * activeSheet.getRange(-1, 2, -1, 1).width(0);
  2715. * activeSheet.getRange(1, -1, 1, -1).height(0);
  2716. */
  2717. export enum ResizeZeroIndicator{
  2718. /**
  2719. * Uses the current drawing policy when the row or column is resized to zero.
  2720. */
  2721. default= 0,
  2722. /**
  2723. * Draws two short lines when the row or column is resized to zero.
  2724. */
  2725. enhanced= 1
  2726. }
  2727. /**
  2728. * Specifies how users can select items in the control.
  2729. * @enum {number}
  2730. * @example
  2731. * //This example sets the selection policy.
  2732. * activeSheet.selectionUnit(GC.Spread.Sheets.SelectionUnit.row);
  2733. * activeSheet.selectionPolicy(GC.Spread.Sheets.SelectionPolicy.range);
  2734. */
  2735. export enum SelectionPolicy{
  2736. /**
  2737. * Allows users to only select single items.
  2738. */
  2739. single= 0,
  2740. /**
  2741. * Allows users to select single items and ranges of items, but not multiple ranges.
  2742. */
  2743. range= 1,
  2744. /**
  2745. * Allows users to select single items and ranges of items, including multiple ranges.
  2746. */
  2747. multiRange= 2
  2748. }
  2749. /**
  2750. * Specifies the smallest unit users or the application can select.
  2751. * @enum {number}
  2752. * @example
  2753. * //This example sets the unit type.
  2754. * activeSheet.selectionUnit(GC.Spread.Sheets.SelectionUnit.row);
  2755. * activeSheet.selectionPolicy(GC.Spread.Sheets.SelectionPolicy.range);
  2756. */
  2757. export enum SelectionUnit{
  2758. /**
  2759. * Indicates that the smallest unit that can be selected is a cell.
  2760. */
  2761. cell= 0,
  2762. /**
  2763. * Indicates that the smallest unit that can be selected is a row.
  2764. */
  2765. row= 1,
  2766. /**
  2767. * Indicates that the smallest unit that can be selected is a column.
  2768. */
  2769. column= 2
  2770. }
  2771. /**
  2772. * Specifies the sheet area.
  2773. * @enum {number}
  2774. * @example
  2775. * //Creates log text describing which area in the sheet was clicked.
  2776. * // Use IE to see the console log text
  2777. * activeSheet.bind(GC.Spread.Sheets.Events.CellClick, function (sender, args) {
  2778. * if(args.sheetArea === GC.Spread.Sheets.SheetArea.colHeader){
  2779. * console.log("The column header was clicked.");
  2780. * }
  2781. * if(args.sheetArea === GC.Spread.Sheets.SheetArea.rowHeader){
  2782. * console.log("The row header was clicked.");
  2783. * }
  2784. * if(args.sheetArea === GC.Spread.Sheets.SheetArea.corner){
  2785. * console.log("The corner header was clicked.");
  2786. * }
  2787. * console.log("Clicked column index: " + args.col);
  2788. * console.log("Clicked row index: " + args.row);
  2789. * });
  2790. * //Bind event
  2791. * activeSheet.bind(GC.Spread.Sheets.Events.CellDoubleClick, function (sender, args) {
  2792. * if(args.sheetArea === GC.Spread.Sheets.SheetArea.colHeader){
  2793. * console.log("The column header was double clicked.");
  2794. * }
  2795. * if(args.sheetArea === GC.Spread.Sheets.SheetArea.rowHeader){
  2796. * console.log("The row header was double clicked.");
  2797. * }
  2798. * if(args.sheetArea === GC.Spread.Sheets.SheetArea.corner){
  2799. * console.log("The corner header was double clicked.");
  2800. * }
  2801. * console.log("Double clicked column index: " + args.col);
  2802. * console.log("Double clicked row index: " + args.row);
  2803. * });
  2804. */
  2805. export enum SheetArea{
  2806. /**
  2807. * Indicates the sheet corner.
  2808. */
  2809. corner= 0,
  2810. /**
  2811. * Indicates the column header.
  2812. */
  2813. colHeader= 1,
  2814. /**
  2815. * Indicates the row header.
  2816. */
  2817. rowHeader= 2,
  2818. /**
  2819. * Indicates the viewport.
  2820. */
  2821. viewport= 3
  2822. }
  2823. /**
  2824. * Defines how the resize tip is displayed.
  2825. * @enum {number}
  2826. * @example
  2827. * //This example displays both resize tips.
  2828. * spread.options.showDragDropTip = true;
  2829. * spread.options.showDragFillTip = true;
  2830. * spread.options.showScrollTip = GC.Spread.Sheets.ShowScrollTip.both;
  2831. * spread.options.showResizeTip = GC.Spread.Sheets.ShowResizeTip.both;
  2832. */
  2833. export enum ShowResizeTip{
  2834. /** Specifies that no resize tip is displayed.
  2835. * @type {number}
  2836. */
  2837. none= 0,
  2838. /** Specifies that only the horizontal resize tip is displayed.
  2839. * @type {number}
  2840. */
  2841. column= 1,
  2842. /** Specifies that only the vertical resize tip is displayed.
  2843. * @type {number}
  2844. */
  2845. row= 2,
  2846. /** Specifies that horizontal and vertical resize tips are displayed.
  2847. * @type {number}
  2848. */
  2849. both= 3
  2850. }
  2851. /**
  2852. * Specifies how the scroll tip is displayed.
  2853. * @enum {number}
  2854. * @example
  2855. * //This example displays both resize tips.
  2856. * spread.options.showDragDropTip = true;
  2857. * spread.options.showDragFillTip = true;
  2858. * spread.options.showScrollTip = GC.Spread.Sheets.ShowScrollTip.both;
  2859. * spread.options.showResizeTip = GC.Spread.Sheets.ShowResizeTip.both;
  2860. */
  2861. export enum ShowScrollTip{
  2862. /** Specifies that no scroll tip is displayed.
  2863. * @type {number}
  2864. */
  2865. none= 0,
  2866. /** Specifies that only the horizontal scroll tip is displayed.
  2867. * @type {number}
  2868. */
  2869. horizontal= 1,
  2870. /** Specifies that only the vertical scroll tip is displayed.
  2871. * @type {number}
  2872. */
  2873. vertical= 2,
  2874. /** Specifies that horizontal and vertical scroll tips are displayed.
  2875. * @type {number}
  2876. */
  2877. both= 3
  2878. }
  2879. /**
  2880. * Specifies the type of sorting to perform.
  2881. * @enum {number}
  2882. * @example
  2883. * //This example sets the sort order of the items in the slicer.
  2884. * //create a table
  2885. * datas = [
  2886. * ["1", "NewYork", "1968/6/8", "80", "180"],
  2887. * ["4", "NewYork", "1972/7/3", "72", "168"],
  2888. * ["4", "NewYork", "1964/3/2", "71", "179"],
  2889. * ["5", "Washington", "1972/8/8","80", "171"],
  2890. * ["6", "Washington", "1986/2/2", "89", "161"],
  2891. * ["7", "Washington", "2012/2/15", "71", "240"]];
  2892. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  2893. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  2894. * table.setColumnName(0, dataColumns[0]);
  2895. * table.setColumnName(1, dataColumns[1]);
  2896. * table.setColumnName(2, dataColumns[2]);
  2897. * table.setColumnName(3, dataColumns[3]);
  2898. * table.setColumnName(4, dataColumns[4]);
  2899. * //create style
  2900. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light4();
  2901. * //add a slicer to the sheet and return the slicer instance
  2902. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Height");
  2903. * //set slicer properties
  2904. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  2905. * slicer.sortState(GC.Spread.Sheets.SortState.descending);
  2906. * slicer.style(style1);
  2907. */
  2908. export enum SortState{
  2909. /** Indicates the sorting is disabled.
  2910. * @type {number}
  2911. */
  2912. none= 0,
  2913. /** Indicates the sorting is ascending.
  2914. * @type {number}
  2915. */
  2916. ascending= 1,
  2917. /** Indicates the sorting is descending.
  2918. * @type {number}
  2919. */
  2920. descending= 2
  2921. }
  2922. /**
  2923. * Represents the storage data type.
  2924. * @enum {number}
  2925. * @example
  2926. * //This example uses the StorageType enumeration.
  2927. * activeSheet.getCell(0,0).value("A1");
  2928. * activeSheet.clear(0,0,3,3,GC.Spread.Sheets.SheetArea.viewport,GC.Spread.Sheets.StorageType.data);
  2929. */
  2930. export enum StorageType{
  2931. /**
  2932. * Indicates the storage data type is pure value.
  2933. */
  2934. data= 1,
  2935. /**
  2936. * Indicates the storage data type is style.
  2937. */
  2938. style= 2,
  2939. /**
  2940. * Indicates the storage data type is comment.
  2941. */
  2942. comment= 4,
  2943. /**
  2944. * Indicates the storage data type is tag.
  2945. */
  2946. tag= 8,
  2947. /**
  2948. * Indicates the storage data type is sparkline.
  2949. */
  2950. sparkline= 16,
  2951. /**
  2952. * Indicates the storage data type is the axis information.
  2953. */
  2954. axis= 32,
  2955. /**
  2956. * Indicates the storage data type is data binding path.
  2957. */
  2958. bindingPath= 64,
  2959. /**
  2960. * Indicates the storage data type is hyperlink.
  2961. */
  2962. hyperlink= 256
  2963. }
  2964. /**
  2965. * Defines the type of the text decoration.
  2966. * @enum {number}
  2967. * @example
  2968. * //This example uses the TextDecorationType enumeration.
  2969. * activeSheet.getCell(0, 0).textDecoration(GC.Spread.Sheets.TextDecorationType.underline);
  2970. * activeSheet.getRange(1, -1, 1, -1).textDecoration(GC.Spread.Sheets.TextDecorationType.overline | GC.Spread.Sheets.TextDecorationType.underline);
  2971. * activeSheet.getRange(-1, 1, -1, 1).textDecoration(GC.Spread.Sheets.TextDecorationType.overline | GC.Spread.Sheets.TextDecorationType.lineThrough | GC.Spread.Sheets.TextDecorationType.underline);
  2972. * var style = new GC.Spread.Sheets.Style();
  2973. * style.textDecoration = GC.Spread.Sheets.TextDecorationType.overline | GC.Spread.Sheets.TextDecorationType.underline;
  2974. * activeSheet.setStyle(1, 1, style, GC.Spread.Sheets.SheetArea.viewport);
  2975. * activeSheet.getCell(0, 0).value("Test");
  2976. * activeSheet.getCell(1, 0).value("Test");
  2977. * activeSheet.getCell(0, 1).value("Test");
  2978. */
  2979. export enum TextDecorationType{
  2980. /** Specifies to display a line below the text.
  2981. */
  2982. underline= 1,
  2983. /** Specifies to display a line through the text.
  2984. */
  2985. lineThrough= 2,
  2986. /** Specifies to display a line above the text.
  2987. */
  2988. overline= 4,
  2989. /** Specifies to display double line below the text.
  2990. */
  2991. doubleUnderline= 8,
  2992. /** Specifies normal text.
  2993. */
  2994. none= 0
  2995. }
  2996. /**
  2997. * Specifies cell value's type.
  2998. * @enum {number}
  2999. */
  3000. export enum ValueType{
  3001. /**
  3002. * indicate normal value type.
  3003. */
  3004. normal= 0,
  3005. /**
  3006. * indicate rich text value type.
  3007. */
  3008. richText= 1
  3009. }
  3010. /**
  3011. * Defines the type of the text vertAlign.
  3012. * @enum {number}
  3013. * @example
  3014. * //This example uses the VertAlign enumeration.
  3015. * activeSheet.setValue(1, 1, {richText:[{style:{vertAlign:GC.Spread.Sheets.Style.VertAlign.subscript},text:'SpreadJS'}]}, GC.Spread.Sheets.SheetArea.viewport);
  3016. */
  3017. export enum VertAlign{
  3018. /**
  3019. * indicate normal text align.
  3020. */
  3021. normal= 0,
  3022. /**
  3023. * indicate superscript.
  3024. */
  3025. superscript= 1,
  3026. /**
  3027. * indicate subscript.
  3028. */
  3029. subscript= 2
  3030. }
  3031. /**
  3032. * Specifies the vertical alignment.
  3033. * @enum {number}
  3034. * @example
  3035. * //This example uses the VerticalAlign type.
  3036. * var style = new GC.Spread.Sheets.Style();
  3037. * style.font = "8pt Arial";
  3038. * style.hAlign = GC.Spread.Sheets.HorizontalAlign.center;
  3039. * style.vAlign = GC.Spread.Sheets.VerticalAlign.center;
  3040. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  3041. * activeSheet.getCell(1,1).value("B2");
  3042. */
  3043. export enum VerticalAlign{
  3044. /**
  3045. * Indicates that the cell content is top-aligned.
  3046. */
  3047. top= 0,
  3048. /**
  3049. * Indicates that the cell content is centered.
  3050. */
  3051. center= 1,
  3052. /**
  3053. * Indicates that the cell content is bottom-aligned.
  3054. */
  3055. bottom= 2
  3056. }
  3057. /**
  3058. * Specifies the vertical position of the cell or row in the component.
  3059. * @enum {number}
  3060. * @example
  3061. * //This example uses the VerticalPosition enumeration.
  3062. * activeSheet.setActiveCell(10,5);
  3063. * activeSheet.showCell(10, 5, GC.Spread.Sheets.VerticalPosition.top, GC.Spread.Sheets.HorizontalPosition.center);
  3064. */
  3065. export enum VerticalPosition{
  3066. /**
  3067. * Positions the cell or row at the top.
  3068. */
  3069. top= 0,
  3070. /**
  3071. * Positions the cell or row in the center.
  3072. */
  3073. center= 1,
  3074. /**
  3075. * Positions the cell or row at the bottom.
  3076. */
  3077. bottom= 2,
  3078. /**
  3079. * Positions the cell or row at the nearest edge.
  3080. */
  3081. nearest= 3
  3082. }
  3083. /**
  3084. * Specifies the visual state.
  3085. * @enum {number}
  3086. */
  3087. export enum VisualState{
  3088. /**
  3089. * Indicates normal visual state.
  3090. */
  3091. normal= 0,
  3092. /**
  3093. * Indicates highlight visual state.
  3094. */
  3095. highlight= 1,
  3096. /**
  3097. * Indicates selected visual state.
  3098. */
  3099. selected= 2,
  3100. /**
  3101. * Indicates active visual state.
  3102. */
  3103. active= 3,
  3104. /**
  3105. * Indicates hover visual state.
  3106. */
  3107. hover= 4
  3108. }
  3109. export class CellRange{
  3110. /**
  3111. * Represents a cell range in a sheet.
  3112. * @class
  3113. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that contains this cell range.
  3114. * @param {number} row The row index of the cell.
  3115. * @param {number} col The column index of the cell.
  3116. * @param {number} [rowCount] The row count of the cell. If you do not provide this parameter, it defaults to <b>1</b>.
  3117. * @param {number} [colCount] The column count of the cell. If you do not provide this parameter, it defaults to <b>1</b>.
  3118. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If you do not provide this parameter, it defaults to <b>viewport</b>.
  3119. * If row is -1 and rowCount is -1, the range represents columns. For example, new GC.Spread.Sheets.CellRange(-1,4,-1,6) represents columns "E:J".
  3120. * If col is -1 and colCount is -1, the range represents rows. For example, new GC.Spread.Sheets.CellRange(4,-1,6,-1) represents rows "5:10".
  3121. */
  3122. constructor(sheet: GC.Spread.Sheets.Worksheet, row: number, col: number, rowCount?: number, colCount?: number, sheetArea?: GC.Spread.Sheets.SheetArea);
  3123. /**
  3124. * Gets the starting column index.
  3125. * @type {number}
  3126. */
  3127. col: number;
  3128. /**
  3129. * Gets the column count.
  3130. * @type {number}
  3131. */
  3132. colCount: number;
  3133. /**
  3134. * Gets the starting row index.
  3135. *@type {number}
  3136. */
  3137. row: number;
  3138. /**
  3139. * Gets the row count.
  3140. * @type {number}
  3141. */
  3142. rowCount: number;
  3143. /**
  3144. * Gets the sheet that contains this cell range.
  3145. * @type {GC.Spread.Sheets.Worksheet}
  3146. */
  3147. sheet: GC.Spread.Sheets.Worksheet;
  3148. /**
  3149. * Gets the area that contains this cell range.
  3150. * @type {GC.Spread.Sheets.SheetArea}
  3151. */
  3152. sheetArea: GC.Spread.Sheets.SheetArea;
  3153. /**
  3154. * Gets or sets the background color for the cell, such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5", and so on.
  3155. * @param {string} [value] The cell background color.
  3156. * @returns {string|GC.Spread.Sheets.CellRange} If no value is set, returns the cell background color; otherwise, returns the cell.
  3157. * @example
  3158. * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).backColor("pink");
  3159. */
  3160. backColor(value?: string): any;
  3161. /**
  3162. * Gets or sets the background image for the cell.
  3163. * @param {string} [value] The cell background image.
  3164. * @returns {string|GC.Spread.Sheets.CellRange} If no value is set, returns the cell background image; otherwise, returns the cell.
  3165. * @example
  3166. * activeSheet.getCell(1,1).backgroundImage("images/example.jpg");
  3167. */
  3168. backgroundImage(value?: string): any;
  3169. /**
  3170. * Gets or sets the background image layout for the cell.
  3171. * @param {GC.Spread.Sheets.ImageLayout} [value] The cell background image layout.
  3172. * @returns {GC.Spread.Sheets.ImageLayout|GC.Spread.Sheets.CellRange} If no value is set, returns the cell background image layout; otherwise, returns the cell.
  3173. * @example
  3174. * var layout = GC.Spread.Sheets.ImageLayout.stretch;
  3175. * activeSheet.getRange(-1, 1, -1, 1, GC.Spread.Sheets.SheetArea.viewport).backgroundImageLayout(layout);
  3176. */
  3177. backgroundImageLayout(value?: GC.Spread.Sheets.ImageLayout): any;
  3178. /**
  3179. * Gets or sets the binding path for cell binding.
  3180. * @param {string} path The binding path for cell binding.
  3181. * @returns {string | GC.Spread.Sheets.CellRange} If no value is set, returns the binding path for cell binding; otherwise, returns the worksheet.
  3182. * @example
  3183. * //This example uses the bindingPath method.
  3184. * var test = {name: "John"};
  3185. * activeSheet.getCell(0,0).bindingPath( "name");
  3186. * activeSheet.setDataSource(new GC.Spread.Sheets.Bindings.CellBindingSource(test));
  3187. */
  3188. bindingPath(path?: string): any;
  3189. /**
  3190. * Gets or sets the bottom border of the cell.
  3191. * @param {GC.Spread.Sheets.LineBorder} [value] The cell bottom border line.
  3192. * @returns {GC.Spread.Sheets.LineBorder|GC.Spread.Sheets.CellRange} If no value is set, returns the cell bottom border line; otherwise, returns the cell.
  3193. * @example
  3194. * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).borderBottom(new GC.Spread.Sheets.LineBorder("blue", GC.Spread.Sheets.LineStyle.mediumDashed));
  3195. */
  3196. borderBottom(value?: GC.Spread.Sheets.LineBorder): any;
  3197. /**
  3198. * Gets or sets the left border of the cell.
  3199. * @param {GC.Spread.Sheets.LineBorder} [value] The cell left border line.
  3200. * @returns {GC.Spread.Sheets.LineBorder|GC.Spread.Sheets.CellRange} If no value is set, returns the cell left border line; otherwise, returns the cell.
  3201. * @example
  3202. * activeSheet.getRange(2, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).borderLeft(new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.mediumDashed));
  3203. * @example
  3204. * activeSheet.getCell(1,1).borderLeft(new GC.Spread.Sheets.LineBorder("red", GC.Spread.Sheets.LineStyle.double));
  3205. * @example
  3206. * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).borderLeft(new GC.Spread.Sheets.LineBorder("blue", GC.Spread.Sheets.LineStyle.mediumDashed));
  3207. */
  3208. borderLeft(value?: GC.Spread.Sheets.LineBorder): any;
  3209. /**
  3210. * Gets or sets the right border of the cell.
  3211. * @param {GC.Spread.Sheets.LineBorder} [value] The cell right border line.
  3212. * @returns {GC.Spread.Sheets.LineBorder|GC.Spread.Sheets.CellRange} If no value is set, returns the cell right border line; otherwise, returns the cell.
  3213. * @example
  3214. * activeSheet.getRange(2, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).borderRight(new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.mediumDashed));
  3215. * @example
  3216. * activeSheet.getCell(1,1).borderRight(new GC.Spread.Sheets.LineBorder("red", GC.Spread.Sheets.LineStyle.double));
  3217. * @example
  3218. * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).borderRight(new GC.Spread.Sheets.LineBorder("blue", GC.Spread.Sheets.LineStyle.mediumDashed));
  3219. */
  3220. borderRight(value?: GC.Spread.Sheets.LineBorder): any;
  3221. /**
  3222. * Gets or sets the top border of the cell.
  3223. * @param {GC.Spread.Sheets.LineBorder} [value] The cell top border line.
  3224. * @returns {GC.Spread.Sheets.LineBorder|GC.Spread.Sheets.CellRange} If no value is set, returns the cell top border line; otherwise, returns the cell.
  3225. * @example
  3226. * activeSheet.getRange(2, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).borderTop(new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.mediumDashed));
  3227. * @example
  3228. * activeSheet.getCell(1,1).borderTop(new GC.Spread.Sheets.LineBorder("red", GC.Spread.Sheets.LineStyle.double));
  3229. * @example
  3230. * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).borderTop(new GC.Spread.Sheets.LineBorder("blue", GC.Spread.Sheets.LineStyle.mediumDashed));
  3231. */
  3232. borderTop(value?: GC.Spread.Sheets.LineBorder): any;
  3233. /**
  3234. * Gets or sets the cellButtons of the cell.
  3235. * @param {Object[]} value the cellButtons of the cell.
  3236. * @returns {Object[] |GC.Spread.Sheets.CellRange} If no value is set, returns the cellButtons of the cell; otherwise, returns the cell.
  3237. * @example
  3238. * activeSheet.getRange(2,-1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).cellButtons([caption:"Text"]]);
  3239. * @example
  3240. * var cellButtons = activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).cellButtons();
  3241. */
  3242. cellButtons(value?: GC.Spread.Sheets.ICellButton[]): any;
  3243. /**
  3244. * Gets or sets the cell padding.
  3245. * @param {string} [value] The cell padding.
  3246. * @returns {string|GC.Spread.Sheets.CellRange} If no value is set, returns the value of the cell padding; otherwise, returns the cell.
  3247. * @example
  3248. * // This example adds cell padding around the watermark.
  3249. * var type = new GC.Spread.Sheets.Style();
  3250. * type.watermark = "User name";
  3251. * type.cellPadding = "20";
  3252. * type.labelOptions = {alignment:GC.Spread.Sheets.LabelAlignment.topLeft, visibility: GC.Spread.Sheets.LabelVisibility.visible};
  3253. * activeSheet.setStyle(0, 1, type);
  3254. * activeSheet.getRange(0, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).height(60);
  3255. * activeSheet.getRange(-1, 1, -1, 1).width(150);
  3256. * var combo = new GC.Spread.Sheets.CellTypes.ComboBox();
  3257. * combo.items([{ text: "Oranges", value: "11k" }, { text: "Apples", value: "15k" }, { text: "Grape", value: "100k" }]);
  3258. * combo.editorValueType(GC.Spread.Sheets.CellTypes.EditorValueType.text);
  3259. * activeSheet.setCellType(2, 1, combo, GC.Spread.Sheets.SheetArea.viewport);
  3260. * activeSheet.getCell(2, 1, GC.Spread.Sheets.SheetArea.viewport).watermark("ComboBox Cell Type").cellPadding('10 10 20 10');
  3261. * activeSheet.getCell(2, 1, GC.Spread.Sheets.SheetArea.viewport).labelOptions({alignment: GC.Spread.Sheets.LabelAlignment.bottomCenter, foreColor: 'yellowgreen', font: 'bold 15px Arial'});
  3262. * activeSheet.getRange(2, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).height(60);
  3263. */
  3264. cellPadding(value?: string): any;
  3265. /**
  3266. * Gets or sets the cell type of the cell.
  3267. * @param {GC.Spread.Sheets.CellTypes.Base} [value] The cell type.
  3268. * @returns {GC.Spread.Sheets.CellTypes.Base|GC.Spread.Sheets.CellRange} If no value is set, returns the cell type; otherwise, returns the cell.
  3269. * @example
  3270. * activeSheet.getRange(-1, 1, -1, 1, GC.Spread.Sheets.SheetArea.viewport).cellType(new GC.Spread.Sheets.CellTypes.CheckBox());
  3271. */
  3272. cellType(value?: GC.Spread.Sheets.CellTypes.Base): any;
  3273. /**
  3274. * Clears the specified area.
  3275. * @param {GC.Spread.Sheets.StorageType} type The clear type.
  3276. */
  3277. clear(type: GC.Spread.Sheets.StorageType): void;
  3278. /**
  3279. * Gets or sets the comment for the cell.
  3280. * @param {GC.Spread.Sheets.Comments.Comment} value The comment to set in the cell.
  3281. * @returns {GC.Spread.Sheets.Comments.Comment | GC.Spread.Sheets.CellRange} If no value is set, returns the comment in the cell; otherwise, returns the cell range.
  3282. * @example
  3283. * // This example creates a cell comment.
  3284. * var comment = new GC.Spread.Sheets.Comments.Comment();
  3285. * comment.text("new comment!");
  3286. * comment.backColor("yellow");
  3287. * comment.foreColor("green");
  3288. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  3289. * activeSheet.getCell(5,5).comment(comment);
  3290. */
  3291. comment(value?: GC.Spread.Sheets.Comments.Comment): any;
  3292. /**
  3293. * Gets or sets the diagonalDown of the cell.
  3294. * @param {GC.Spread.Sheets.LineBorder} [value] The cell diagonalDown line.
  3295. * @returns {GC.Spread.Sheets.LineBorder|GC.Spread.Sheets.CellRange} If no value is set, returns the cell diagonalDown line; otherwise, returns the cell.
  3296. * @example
  3297. * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).diagonalDown(new GC.Spread.Sheets.LineBorder("blue", GC.Spread.Sheets.LineStyle.mediumDashed));
  3298. */
  3299. diagonalDown(value?: GC.Spread.Sheets.LineBorder): any;
  3300. /**
  3301. * Gets or sets the diagonalUp of the cell.
  3302. * @param {GC.Spread.Sheets.LineBorder} [value] The cell diagonalUp line.
  3303. * @returns {GC.Spread.Sheets.LineBorder|GC.Spread.Sheets.CellRange} If no value is set, returns the cell diagonalUp line; otherwise, returns the cell.
  3304. * @example
  3305. * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).diagonalUp(new GC.Spread.Sheets.LineBorder("blue", GC.Spread.Sheets.LineStyle.mediumDashed));
  3306. */
  3307. diagonalUp(value?: GC.Spread.Sheets.LineBorder): any;
  3308. /**
  3309. * Gets or sets the dropDowns of the cell.
  3310. * @param {Object[]} [value] the dropDowns of the cell.
  3311. * @returns {Object[] |GC.Spread.Sheets.CellRange} If no value is set, returns the dropDowns of the cell; otherwise, returns the cell.
  3312. * @example
  3313. * activeSheet.getRange(2,-1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).dropDowns([caption:"Text"]]);
  3314. * @example
  3315. * var dropDowns = activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).dropDowns();
  3316. */
  3317. dropDowns(value?: GC.Spread.Sheets.IDropdown[]): any;
  3318. /**
  3319. * Gets or sets the font for the cell, such as "normal normal normal 20px/normal Arial".
  3320. * @param {string} [value] The cell font.
  3321. * @returns {string|GC.Spread.Sheets.CellRange} If no value is set, returns the cell's font; otherwise, returns the cell.
  3322. * @example
  3323. * activeSheet.getRange(2, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).font("12pt Arial");
  3324. * @example
  3325. * activeSheet.getCell(1,1).font("8pt Arial");
  3326. * @example
  3327. * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).font("12pt Arial");
  3328. */
  3329. font(value?: string): any;
  3330. /**
  3331. * Gets or sets the color of the text in the cell, such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5", and so on.
  3332. * @param {string} [value] The color of the text.
  3333. * @returns {string|GC.Spread.Sheets.CellRange} If no value is set, returns the cell foreground color; otherwise, returns the cell.
  3334. * @example
  3335. * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).foreColor("blue");
  3336. */
  3337. foreColor(value?: string): any;
  3338. /**
  3339. * Gets or sets the formatter for the cell.
  3340. * @param {string | GC.Spread.Formatter.GeneralFormatter} [value] The cell formatter string or object.
  3341. * @returns {string | GC.Spread.Formatter.GeneralFormatter |GC.Spread.Sheets.CellRange} If no value is set, returns the cell formatter string or object; otherwise, returns the cell.
  3342. * @example
  3343. * activeSheet.getCell(1,1).formatter("0.000%");
  3344. * @example
  3345. * activeSheet.getCell(1, -1).formatter("0.000%");
  3346. * activeSheet.getCell(1,0).value("2");
  3347. * @example
  3348. * activeSheet.getCell(-1, 0).formatter("0.000%");
  3349. * activeSheet.getCell(0,0).value("2");
  3350. */
  3351. formatter(value?: string | GC.Spread.Formatter.GeneralFormatter): any;
  3352. /**
  3353. * Gets or sets the formula for the cell.
  3354. * @param {string} [value] The cell formula.
  3355. * @returns {string|GC.Spread.Sheets.CellRange} If no value is set, returns the cell formula; otherwise, returns the cell.
  3356. * @example
  3357. * activeSheet.getCell(0,2).formula("DATEDIF(DATE(2003,1,1),DATE(2016,1,1),\"Y\")");
  3358. */
  3359. formula(value?: string): any;
  3360. /**
  3361. * Gets or sets the horizontal alignment of the contents of the cell.
  3362. * @param {GC.Spread.Sheets.HorizontalAlign} [value] The horizontal alignment.
  3363. * @returns {GC.Spread.Sheets.HorizontalAlign|GC.Spread.Sheets.CellRange} If no value is set, returns the horizontal alignment of the contents of the cell; otherwise, returns the cell.
  3364. * @example
  3365. * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).hAlign(GC.Spread.Sheets.HorizontalAlign.right);
  3366. */
  3367. hAlign(value?: GC.Spread.Sheets.HorizontalAlign): any;
  3368. /**
  3369. * Gets or sets the height of the row in pixels.
  3370. * @param {number} [value] The cell row height.
  3371. * @returns {number|GC.Spread.Sheets.CellRange} If no value is set, returns the row height; otherwise, returns the row.
  3372. * @example
  3373. * activeSheet.getRange(0, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).height(90);
  3374. */
  3375. height(value?: number): any;
  3376. /**
  3377. * Gets or sets the imeMode of the cell.
  3378. * @param {GC.Spread.Sheets.ImeMode} [value] The cell imeMode.
  3379. * @returns {GC.Spread.Sheets.ImeMode|GC.Spread.Sheets.CellRange} If no value is set, returns the cell imeMode; otherwise, returns the cell.
  3380. * @example
  3381. * activeSheet.getCell(0, 0).imeMode(GC.Spread.Sheets.ImeMode.disabled);
  3382. * //or
  3383. * var style = new GC.Spread.Sheets.Style();
  3384. * style.imeMode = GC.Spread.Sheets.ImeMode.disabled;
  3385. * activeSheet.setStyle(0, 0, style);
  3386. * @example
  3387. * activeSheet.getRange(2, -1, 1, -1).imeMode(GC.Spread.Sheets.ImeMode.active);
  3388. * @example
  3389. * activeSheet.getRange(-1, 2, -1, 1).imeMode(GC.Spread.Sheets.ImeMode.auto);
  3390. */
  3391. imeMode(value?: GC.Spread.Sheets.ImeMode): any;
  3392. /**
  3393. * Gets or sets whether the cell's text is vertical.
  3394. * @param {boolean} [value] Set to <c>true</c> to have the cell's text vertical.
  3395. * @returns {boolean|GC.Spread.Sheets.CellRange} If no value is set, returns whether the cell's text vertical; otherwise, returns the cell.
  3396. * @example
  3397. * activeSheet.getRange(2,-1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).isVerticalText(false);
  3398. * activeSheet.setText(2,0,"This is a test");
  3399. * @example
  3400. * activeSheet.getCell(1,1).isVerticalText(true);
  3401. * @example
  3402. * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).isVerticalText(true);
  3403. */
  3404. isVerticalText(value?: boolean): any;
  3405. /**
  3406. * Gets or sets the cell label options.
  3407. * @param {Object} [value] The cell label options.
  3408. * @param {GC.Spread.Sheets.LabelAlignment} [value.alignment] - The cell label position.
  3409. * @param {GC.Spread.Sheets.LabelVisibility} [value.visibility] - The cell label visibility.
  3410. * @param {string} [value.font] - The cell label font.
  3411. * @param {string} [value.foreColor] - The cell label forecolor.
  3412. * @param {string} [value.margin] - The cell label margin.
  3413. * @returns {Object|GC.Spread.Sheets.CellRange} If no value is set, returns the value of the cell label options; otherwise, returns the cell.
  3414. * @example
  3415. * //This example sets label options for the watermark.
  3416. * var type = new GC.Spread.Sheets.Style();
  3417. * type.watermark = "User name";
  3418. * type.cellPadding = "20";
  3419. * type.labelOptions = {alignment:GC.Spread.Sheets.LabelAlignment.topLeft, visibility: GC.Spread.Sheets.LabelVisibility.visible};
  3420. * activeSheet.setStyle(0, 1, type);
  3421. * activeSheet.getRange(0, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).height(60);
  3422. * activeSheet.getRange(-1, 1, -1, 1).width(150);
  3423. * var combo = new GC.Spread.Sheets.CellTypes.ComboBox();
  3424. * combo.items([{ text: "Oranges", value: "11k" }, { text: "Apples", value: "15k" }, { text: "Grape", value: "100k" }]);
  3425. * combo.editorValueType(GC.Spread.Sheets.CellTypes.EditorValueType.text);
  3426. * activeSheet.setCellType(2, 1, combo, GC.Spread.Sheets.SheetArea.viewport);
  3427. * activeSheet.getCell(2, 1, GC.Spread.Sheets.SheetArea.viewport).watermark("ComboBox Cell Type").cellPadding('10 10 20 10');
  3428. * activeSheet.getCell(2, 1, GC.Spread.Sheets.SheetArea.viewport).labelOptions({alignment: GC.Spread.Sheets.LabelAlignment.bottomCenter, foreColor: 'yellowgreen', font: 'bold 15px Arial'});
  3429. * activeSheet.getRange(2, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).height(60);
  3430. */
  3431. labelOptions(value?: GC.Spread.Sheets.ILabelOptions): any;
  3432. /**
  3433. * Gets or sets whether the cell is locked. When the sheet is protected, the locked cell cannot be edited.
  3434. * @param {boolean} [value] Set to <c>true</c> to lock the cell.
  3435. * @returns {boolean|GC.Spread.Sheets.CellRange} If no value is set, returns whether the cell is locked; otherwise, returns the cell.
  3436. * @example
  3437. * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).locked(true);
  3438. */
  3439. locked(value?: boolean): any;
  3440. /**
  3441. * Gets or sets the quote Prefix the cell watermark.
  3442. * @param {boolean} [value] The value of the quote Prefix.
  3443. * @returns {boolean|GC.Spread.Sheets.CellRange} If no value is set, returns the content of the quotePrefix; otherwise, returns the cell.
  3444. * @example
  3445. * activeSheet.getCell(1,1).quotePrefix(true);
  3446. */
  3447. quotePrefix(value?: boolean): any;
  3448. /**
  3449. * Gets or sets whether the row or column can be resized by the user.
  3450. * @param {boolean} [value] Set to <c>true</c> to make the row resizable.
  3451. * @returns {boolean|GC.Spread.Sheets.CellRange} If no value is set, returns whether the user can resize the row; otherwise, returns the row or column.
  3452. * @example
  3453. * activeSheet.getRange(-1, 3, -1, 1. GC.Spread.Sheets.SheetArea.viewport).resizable(true);
  3454. */
  3455. resizable(value?: boolean): any;
  3456. /**
  3457. * Sets the border for the specified area.
  3458. * @param {GC.Spread.Sheets.LineBorder} border The border line.
  3459. * @param {Object} option Determines which part of the cell range to set, the option object contains {all:true, left:true, top:true, right:true, bottom:true, diagonalUp:true, diagonalDown:true, outline:true,inside:true, innerHorizontal:true, innerVertical:true}
  3460. * @param {boolean} [options.all] - all border.
  3461. * @param {boolean} [options.left] - left border.
  3462. * @param {boolean} [options.top] - top border.
  3463. * @param {boolean} [options.right] - right border.
  3464. * @param {boolean} [options.bottom] - bottom border.
  3465. * @param {boolean} [options.outline] - outline border.
  3466. * @param {boolean} [options.inside] - inside border.
  3467. * @param {boolean} [options.innerHorizontal] - innerHorizontal border.
  3468. * @param {boolean} [options.innerVertical] - innerVertical border.
  3469. * @param {boolean} [options.diagonalUp] - diagonalUp border.
  3470. * @param {boolean} [options.diagonalDown] - diagonalDown border.
  3471. * @example
  3472. * //This example creates borders.
  3473. * sheet.getCell(1, 1).borderTop(new GC.Spread.Sheets.LineBorder("#F0F8FF",GC.Spread.Sheets.LineStyle.double));
  3474. * sheet.getCell(1, 1).borderLeft(new GC.Spread.Sheets.LineBorder("#F0F8FF",GC.Spread.Sheets.LineStyle.hair));
  3475. * sheet.getCell(1, 1).borderRight(new GC.Spread.Sheets.LineBorder("#FAEBD7",GC.Spread.Sheets.LineStyle.dashDot));
  3476. * sheet.getCell(1, 1).borderBottom(new GC.Spread.Sheets.LineBorder("#00FFFF",GC.Spread.Sheets.LineStyle.medium));
  3477. * sheet.getRange(-1, 5, -1, 1, GC.Spread.Sheets.SheetArea.viewport).borderTop(new GC.Spread.Sheets.LineBorder("#F0FFFF",GC.Spread.Sheets.LineStyle.medium));
  3478. * sheet.getRange(-1, 5, -1, 1, GC.Spread.Sheets.SheetArea.viewport).borderLeft(new GC.Spread.Sheets.LineBorder("#F5F5DC",GC.Spread.Sheets.LineStyle.medium));
  3479. * sheet.getRange(-1, 5, -1, 1, GC.Spread.Sheets.SheetArea.viewport).borderRight(new GC.Spread.Sheets.LineBorder("#FF02FF", GC.Spread.Sheets.LineStyle.dashDot));
  3480. * sheet.getRange(-1, 5, -1, 1, GC.Spread.Sheets.SheetArea.viewport).borderBottom (new GC.Spread.Sheets.LineBorder("#FFE4C4",GC.Spread.Sheets.LineStyle.thin));
  3481. * sheet.getRange(2, 2, 2, 2, GC.Spread.Sheets.SheetArea.viewport).setBorder(new GC.Spread.Sheets.LineBorder("#8A2BE2",GC.Spread.Sheets.LineStyle.thick), { all:true });
  3482. * sheet.getRange(5, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).borderTop( new GC.Spread.Sheets.LineBorder("#A52A2A",GC.Spread.Sheets.LineStyle.mediumDashed));
  3483. * sheet.getRange(5, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).borderLeft( new GC.Spread.Sheets.LineBorder("#FF02FF",GC.Spread.Sheets.LineStyle.medium));
  3484. * sheet.getRange(5, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).borderRight(new GC.Spread.Sheets.LineBorder("#5F9EA0", GC.Spread.Sheets.LineStyle.dashDot));
  3485. * sheet.getRange(5, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).borderBottom(new GC.Spread.Sheets.LineBorder("#6495ED",GC.Spread.Sheets.LineStyle.dotted));
  3486. * sheet.getRange(5, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).diagonalUp(new GC.Spread.Sheets.LineBorder("#FF02FF",GC.Spread.Sheets.LineStyle.dotted));
  3487. * sheet.getRange(5, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).diagonalDown(new GC.Spread.Sheets.LineBorder("#6495ED",GC.Spread.Sheets.LineStyle.medium));
  3488. */
  3489. setBorder(border: GC.Spread.Sheets.LineBorder, option: GC.Spread.Sheets.ISetBorderOptions): void;
  3490. /**
  3491. * Gets or sets the cell ellipsis property.
  3492. * @param {boolean} [value] Set to <c>true</c> to have the cell test show ellipsis.
  3493. * @returns {boolean|GC.Spread.Sheets.CellRange} If no value is set, returns whether the cell ellipsis property.
  3494. * @example
  3495. * activeSheet.getRange(2,-1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).showEllipsis(false);
  3496. * activeSheet.setText(2,0,"This is a test");
  3497. * @example
  3498. * activeSheet.getCell(1,1).showEllipsis(true);
  3499. */
  3500. showEllipsis(value?: boolean): any;
  3501. /**
  3502. * Gets or sets whether the cell shrinks the text to fit the cell size.
  3503. * @param {boolean} [value] Set to <c>true</c> to have the cell shrink text to fit.
  3504. * @returns {boolean|GC.Spread.Sheets.CellRange} If no value is set, returns whether the cell shrinks the text to fit; otherwise, returns the cell.
  3505. * @example
  3506. * activeSheet.getRange(2,-1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).shrinkToFit(false);
  3507. * activeSheet.setText(2,0,"This is a test");
  3508. * @example
  3509. * activeSheet.getCell(1,1).shrinkToFit(true);
  3510. * @example
  3511. * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).shrinkToFit(true);
  3512. */
  3513. shrinkToFit(value?: boolean): any;
  3514. /**
  3515. * Gets or sets a value that indicates whether the user can set focus to the cell using the Tab key.
  3516. * @param {boolean} [value] Set to <c>true</c> to set focus to the cell using the Tab key.
  3517. * @returns {boolean|GC.Spread.Sheets.CellRange} If no value is set, returns whether the user can set focus to the cell using the Tab key; otherwise, returns the cell.
  3518. * @example
  3519. * activeSheet.getCell(1,1).tabStop(false);
  3520. * activeSheet.getRange(1, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).tabStop(false);
  3521. * activeSheet.getRange(-1, 1, -1, 1, GC.Spread.Sheets.SheetArea.viewport).tabStop(false);
  3522. */
  3523. tabStop(value?: boolean): any;
  3524. /**
  3525. * Gets or sets the tag for the cell.
  3526. * @param {Object} [value] The tag value.
  3527. * @returns {Object|GC.Spread.Sheets.CellRange} If no value is set, returns the tag value; otherwise, returns the cell.
  3528. * @example
  3529. * activeSheet.getCell(1,1).tag("cell tag");
  3530. */
  3531. tag(value?: any): any;
  3532. /**
  3533. * Gets or sets the formatted text for the cell.
  3534. * @param {string} [value] The cell text.
  3535. * @returns {string|GC.Spread.Sheets.CellRange} If no value is set, returns the cell text; otherwise, returns the cell.
  3536. * @example
  3537. * activeSheet.getCell(1,1).text("cell object");
  3538. */
  3539. text(value?: string): any;
  3540. /**
  3541. * Gets or sets the type of the decoration added to the cell's text.
  3542. * @param {GC.Spread.Sheets.TextDecorationType} [value] The type of the decoration.
  3543. * @returns {GC.Spread.Sheets.TextDecorationType|GC.Spread.Sheets.CellRange} If no value is set, returns the type of the decoration; otherwise, returns the cell.
  3544. * @example
  3545. * activeSheet.getRange(1, -1, 1, -1).textDecoration(GC.Spread.Sheets.TextDecorationType.overline | GC.Spread.Sheets.TextDecorationType.underline);
  3546. */
  3547. textDecoration(value?: GC.Spread.Sheets.TextDecorationType): any;
  3548. /**
  3549. * Gets or sets the text indent of the cell.
  3550. * @param {number} [value] The cell text indent.
  3551. * @returns {number|GC.Spread.Sheets.CellRange} If no value is set, returns the cell text indent; otherwise, returns the cell.
  3552. * @example
  3553. * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).textIndent(1);
  3554. */
  3555. textIndent(value?: number): any;
  3556. /**
  3557. * Gets or sets the text rotation angle of the cell.
  3558. * @param {number} [value] The cell text rotation angle, form -90 to 90 angle.
  3559. * @returns {number|GC.Spread.Sheets.CellRange} If no value is set, returns the cell text rotation angle; otherwise, returns the cell.
  3560. * @example
  3561. * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).textOrientation(66);
  3562. */
  3563. textOrientation(value?: number): any;
  3564. /**
  3565. * Gets or sets the theme font for the cell.
  3566. * @param {string} [value] The cell's theme font.
  3567. * @returns {string|GC.Spread.Sheets.CellRange} If no value is set, returns the cell's theme font; otherwise, returns the cell.
  3568. * @example
  3569. * activeSheet.getCell(-1, 0).themeFont("Body");
  3570. * activeSheet.getCell(0,0).value("Test");
  3571. */
  3572. themeFont(value?: string): any;
  3573. /**
  3574. * Gets or sets the data validator for the cell.
  3575. * @param {GC.Spread.Sheets.DataValidation.DefaultDataValidator} value The cell data validator.
  3576. * @returns {GC.Spread.Sheets.DataValidation.DefaultDataValidator|GC.Spread.Sheets.CellRange} If no value is set, returns the cell data validator; otherwise, returns the cell.
  3577. * @example
  3578. * spread.options.highlightInvalidData = true;
  3579. * var dv = GC.Spread.Sheets.DataValidation.createDateValidator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between, new Date(2012, 11, 31), new Date(2013, 11, 31));
  3580. * dv.showInputMessage(true);
  3581. * dv.inputMessage("Enter a date between 12/31/2012 and 12/31/2013.");
  3582. * dv.inputTitle("Tip");
  3583. * activeSheet.getCell(0,0).validator(dv);
  3584. * @example
  3585. * spread.options.highlightInvalidData = true;
  3586. * var dv = GC.Spread.Sheets.DataValidation.createDateValidator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between, new Date(2012, 11, 31), new Date(2013, 11, 31));
  3587. * dv.showInputMessage(true);
  3588. * dv.inputMessage("Enter a date between 12/31/2012 and 12/31/2013.");
  3589. * dv.inputTitle("Tip");
  3590. * activeSheet.getCell(1, -1).validator(dv);
  3591. * @example
  3592. * spread.options.highlightInvalidData = true;
  3593. * var dv = GC.Spread.Sheets.DataValidation.createListValidator("1,2,3");
  3594. * dv.showInputMessage(true);
  3595. * dv.inputMessage("Value must be 1,2 or 3");
  3596. * dv.inputTitle("tip");
  3597. * activeSheet.setDataValidator(-1,0,dv);
  3598. */
  3599. validator(value?: GC.Spread.Sheets.DataValidation.DefaultDataValidator): any;
  3600. /**
  3601. * Gets or sets the vertical alignment of the contents of the cell.
  3602. * @param {GC.Spread.Sheets.VerticalAlign} [value] The vertical alignment.
  3603. * @returns {GC.Spread.Sheets.VerticalAlign|GC.Spread.Sheets.CellRange} If no value is set, returns the vertical alignment of the contents of the cell; otherwise, returns the cell.
  3604. * @example
  3605. * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).vAlign(GC.Spread.Sheets.VerticalAlign.top);
  3606. */
  3607. vAlign(value?: GC.Spread.Sheets.VerticalAlign): any;
  3608. /**
  3609. * Gets or sets the unformatted value of the cell.
  3610. * @param {Object} [value] The cell value.
  3611. * @returns {Object|GC.Spread.Sheets.CellRange} If no value is set, returns the cell value; otherwise, returns the cell.
  3612. * @example
  3613. * activeSheet.getCell(1,1).value(10);
  3614. */
  3615. value(value?: any): any;
  3616. /**
  3617. * Gets or sets whether the row or column is displayed.
  3618. * @param {boolean} [value] Set to <c>true</c> to make the row visible.
  3619. * @returns {boolean|GC.Spread.Sheets.CellRange} If no value is set, returns the visible of the row or column; otherwise, returns the row or column.
  3620. * @example
  3621. * activeSheet.getCell(-1, 0).visible(false);
  3622. */
  3623. visible(value?: boolean): any;
  3624. /**
  3625. * Gets or sets the content of the cell watermark.
  3626. * @param {string} [value] The content of the watermark.
  3627. * @returns {string|GC.Spread.Sheets.CellRange} If no value is set, returns the content of the watermark; otherwise, returns the cell.
  3628. * @example
  3629. * activeSheet.getCell(1,1).watermark("lightgreen");
  3630. */
  3631. watermark(value?: string): any;
  3632. /**
  3633. * Gets or sets the width of the column in pixels.
  3634. * @param {number} [value] The column width.
  3635. * @returns {number|GC.Spread.Sheets.CellRange} If no value is set, returns the column width; otherwise, returns the column.
  3636. * @example
  3637. * activeSheet.getCell(-1, 0).width(20);
  3638. */
  3639. width(value?: number): any;
  3640. /**
  3641. * Gets or sets whether the cell lets text wrap.
  3642. * @param {boolean} [value] Set to <c>true</c> to let text wrap within the cell.
  3643. * @returns {boolean|GC.Spread.Sheets.CellRange} If no value is set, returns whether the cell lets text wrap; otherwise, returns the cell.
  3644. * @example
  3645. * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).wordWrap(true);
  3646. */
  3647. wordWrap(value?: boolean): any;
  3648. }
  3649. export class ColorScheme{
  3650. /**
  3651. * Creates a ColorScheme instance.
  3652. * @constructor
  3653. * @class
  3654. * @classdesc Represents the theme color.
  3655. * @param {string} name The owner that contains the named variable.
  3656. * @param {string} background1 The theme color for background1.
  3657. * @param {string} background2 The theme color for background2.
  3658. * @param {string} text1 The theme color for text1.
  3659. * @param {string} text2 The theme color for text2.
  3660. * @param {string} accent1 The theme color for accent1.
  3661. * @param {string} accent2 The theme color for accent2.
  3662. * @param {string} accent3 The theme color for accent3.
  3663. * @param {string} accent4 The theme color for accent4.
  3664. * @param {string} accent5 The theme color for accent5.
  3665. * @param {string} accent6 The theme color for accent6.
  3666. * @param {string} link The color of the link.
  3667. * @param {string} followedLink The color of the followedLink.
  3668. * @example
  3669. * //This example creates colors for the theme.
  3670. * var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
  3671. * ntheme.colors().accent1("lightgreen");
  3672. * activeSheet.currentTheme(ntheme);
  3673. * activeSheet.getCell(0, 0).backColor("accent 1");
  3674. * activeSheet.getCell(1, 0).backColor("accent 1 30");
  3675. */
  3676. constructor(name: string, background1: string, background2: string, text1: string, text2: string, accent1: string, accent2: string, accent3: string, accent4: string, accent5: string, accent6: string, link: string, followedLink: string);
  3677. /**
  3678. * Gets or sets the accent1 theme color of the color scheme.
  3679. * @param {string} value The accent1 theme color string.
  3680. * @returns {string|GC.Spread.Sheets.ColorScheme} If no value is set, returns the accent1 theme color; otherwise, returns the color scheme.
  3681. * @example
  3682. * //This example sets the accent1 color.
  3683. * var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
  3684. * ntheme.colors().accent1("lightgreen");
  3685. * activeSheet.currentTheme(ntheme);
  3686. * activeSheet.getCell(0, 0).backColor("accent 1");
  3687. * activeSheet.getCell(1, 0).backColor("accent 1 30");
  3688. */
  3689. accent1(value?: string): any;
  3690. /**
  3691. * Gets or sets the accent2 theme color of the color scheme.
  3692. * @param {string} value The accent2 theme color string.
  3693. * @returns {string|GC.Spread.Sheets.ColorScheme} If no value is set, returns the accent2 theme color; otherwise, returns the color scheme.
  3694. * @example
  3695. * //This example sets the accent2 color.
  3696. * var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
  3697. * ntheme.colors().accent1("lightgreen");
  3698. * ntheme.colors().accent2("red");
  3699. * activeSheet.currentTheme(ntheme);
  3700. * activeSheet.getCell(0, 0).backColor("accent 1");
  3701. * activeSheet.getCell(1, 0).backColor("accent 2");
  3702. */
  3703. accent2(value?: string): any;
  3704. /**
  3705. * Gets or sets the accent3 theme color of the color scheme.
  3706. * @param {string} value The accent3 theme color string.
  3707. * @returns {string|GC.Spread.Sheets.ColorScheme} If no value is set, returns the accent3 theme color; otherwise, returns the color scheme.
  3708. * @example
  3709. * //This example sets the accent3 color.
  3710. * var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
  3711. * ntheme.colors().accent1("lightgreen");
  3712. * ntheme.colors().accent3("yellow");
  3713. * activeSheet.currentTheme(ntheme);
  3714. * activeSheet.getCell(0, 0).backColor("accent 1");
  3715. * activeSheet.getCell(1, 0).backColor("accent 3");
  3716. */
  3717. accent3(value?: string): any;
  3718. /**
  3719. * Gets or sets the accent4 theme color of the color scheme.
  3720. * @param {string} value The accent4 theme color string.
  3721. * @returns {string|GC.Spread.Sheets.ColorScheme} If no value is set, returns the accent4 theme color; otherwise, returns the color scheme.
  3722. * @example
  3723. * //This example sets the accent4 color.
  3724. * var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
  3725. * ntheme.colors().accent1("lightgreen");
  3726. * ntheme.colors().accent4("blue");
  3727. * activeSheet.currentTheme(ntheme);
  3728. * activeSheet.getCell(0, 0).backColor("accent 1");
  3729. * activeSheet.getCell(1, 0).backColor("accent 4");
  3730. */
  3731. accent4(value?: string): any;
  3732. /**
  3733. * Gets or sets the accent5 theme color of the color scheme.
  3734. * @param {string} value The accent5 theme color string.
  3735. * @returns {string|GC.Spread.Sheets.ColorScheme} If no value is set, returns the accent5 theme color; otherwise, returns the color scheme.
  3736. * @example
  3737. * //This example sets the accent5 color.
  3738. * var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
  3739. * ntheme.colors().accent1("lightgreen");
  3740. * ntheme.colors().accent5("blue");
  3741. * activeSheet.currentTheme(ntheme);
  3742. * activeSheet.getCell(0, 0).backColor("accent 1");
  3743. * activeSheet.getCell(1, 0).backColor("accent 5");
  3744. */
  3745. accent5(value?: string): any;
  3746. /**
  3747. * Gets or sets the accent6 theme color of the color scheme.
  3748. * @param {string} value The accent6 theme color string.
  3749. * @returns {string|GC.Spread.Sheets.ColorScheme} If no value is set, returns the accent6 theme color; otherwise, returns the color scheme.
  3750. * @example
  3751. * //This example sets the accent6 color.
  3752. * var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
  3753. * ntheme.colors().accent1("lightgreen");
  3754. * ntheme.colors().accent6("blue");
  3755. * activeSheet.currentTheme(ntheme);
  3756. * activeSheet.getCell(0, 0).backColor("accent 1");
  3757. * activeSheet.getCell(1, 0).backColor("accent 6");
  3758. */
  3759. accent6(value?: string): any;
  3760. /**
  3761. * Gets or sets the background1 theme color of the color scheme.
  3762. * @param {string} value The background1 theme color string.
  3763. * @returns {string|GC.Spread.Sheets.ColorScheme} If no value is set, returns the background1 theme color; otherwise, returns the color scheme.
  3764. * @example
  3765. * //This example sets the background1 color.
  3766. * var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
  3767. * ntheme.colors().accent1("lightgreen");
  3768. * ntheme.colors().background1("orange");
  3769. * activeSheet.currentTheme(ntheme);
  3770. * activeSheet.getCell(0, 0).backColor("accent 1");
  3771. * activeSheet.getCell(1, 0).backColor("background 1");
  3772. */
  3773. background1(value?: string): any;
  3774. /**
  3775. * Gets or sets the background2 theme color of the color scheme.
  3776. * @param {string} value The background2 theme color string.
  3777. * @returns {string|GC.Spread.Sheets.ColorScheme} If no value is set, returns the background2 theme color; otherwise, returns the color scheme.
  3778. * @example
  3779. * //This example sets the background2 color.
  3780. * var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
  3781. * ntheme.colors().accent1("lightgreen");
  3782. * ntheme.colors().background2("orange");
  3783. * activeSheet.currentTheme(ntheme);
  3784. * activeSheet.getCell(0, 0).backColor("accent 1");
  3785. * activeSheet.getCell(1, 0).backColor("background 2");
  3786. */
  3787. background2(value?: string): any;
  3788. /**
  3789. * Gets or sets the followed hyperlink theme color of the color scheme.
  3790. * @param {string} value The followed hyperlink theme color string.
  3791. * @returns {string|GC.Spread.Sheets.ColorScheme} If no value is set, returns the followed hyperlink theme color; otherwise, returns the color scheme.
  3792. * @example
  3793. * //This example sets the followedHyperline color.
  3794. * var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
  3795. * ntheme.colors().accent1("lightgreen");
  3796. * ntheme.colors().followedHyperlink("orange");
  3797. * ntheme.colors().hyperlink("red");
  3798. * activeSheet.currentTheme(ntheme);
  3799. * activeSheet.getCell(0, 0).backColor("accent 1");
  3800. * activeSheet.getCell(1, 0).backColor("followedHyperlink");
  3801. * activeSheet.getCell(2, 0).backColor("hyperlink");
  3802. */
  3803. followedHyperlink(value?: string): any;
  3804. /**
  3805. * Gets the color based on the theme color.
  3806. * @param {string} name The theme color name.
  3807. * @returns {string} The theme color.
  3808. * @example
  3809. * //This example gets the theme color.
  3810. * var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
  3811. * ntheme.colors().accent1("lightgreen");
  3812. * ntheme.colors().followedHyperlink("orange");
  3813. * ntheme.colors().hyperlink("red");
  3814. * ntheme.colors().name("test");
  3815. * activeSheet.currentTheme(ntheme);
  3816. * activeSheet.getCell(0, 0).backColor("accent 1");
  3817. * activeSheet.getCell(1, 0).backColor("followedHyperlink");
  3818. * activeSheet.getCell(2, 0).backColor("hyperlink");
  3819. * var cname = ntheme.getColor("accent 1");
  3820. * alert(cname);
  3821. */
  3822. getColor(name: string): string;
  3823. /**
  3824. * Gets or sets the hyperlink theme color of the color scheme.
  3825. * @param {string} value The hyperlink theme color string.
  3826. * @returns {string|GC.Spread.Sheets.ColorScheme} If no value is set, returns the hyperlink theme color; otherwise, returns the color scheme.
  3827. * @example
  3828. * //This example sets the hyperline color.
  3829. * var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
  3830. * ntheme.colors().accent1("lightgreen");
  3831. * ntheme.colors().followedHyperlink("orange");
  3832. * ntheme.colors().hyperlink("red");
  3833. * activeSheet.currentTheme(ntheme);
  3834. * activeSheet.getCell(0, 0).backColor("accent 1");
  3835. * activeSheet.getCell(1, 0).backColor("followedHyperlink");
  3836. * activeSheet.getCell(2, 0).backColor("hyperlink");
  3837. */
  3838. hyperlink(value?: string): any;
  3839. /**
  3840. * Gets or sets the name of the color scheme.
  3841. * @param {string} value The name.
  3842. * @returns {string|GC.Spread.Sheets.ColorScheme} If no value is set, returns the name; otherwise, returns the color scheme.
  3843. * @example
  3844. * //This example sets the theme name.
  3845. * var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
  3846. * ntheme.colors().accent1("lightgreen");
  3847. * ntheme.colors().name("green theme");
  3848. * activeSheet.currentTheme(ntheme);
  3849. * activeSheet.getCell(0, 0).backColor("accent 1");
  3850. */
  3851. name(value?: string): any;
  3852. /**
  3853. * Gets or sets the textcolor1 theme color of the color scheme.
  3854. * @param {string} value The textcolor1 theme color string.
  3855. * @returns {string|GC.Spread.Sheets.ColorScheme} If no value is set, returns the textcolor1 theme color; otherwise, returns the color scheme.
  3856. * @example
  3857. * //This example sets the textColor1 color.
  3858. * var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
  3859. * ntheme.colors().accent1("lightgreen");
  3860. * ntheme.colors().textColor1("orange");
  3861. * activeSheet.currentTheme(ntheme);
  3862. * activeSheet.getCell(0, 0).backColor("accent 1");
  3863. * activeSheet.getCell(1, 0).backColor("Text 1");
  3864. */
  3865. textColor1(value?: string): any;
  3866. /**
  3867. * Gets or sets the textcolor2 theme color of the color scheme.
  3868. * @param {string} value The textcolor2 theme color string.
  3869. * @returns {string|GC.Spread.Sheets.ColorScheme} If no value is set, returns the textcolor2 theme color; otherwise, returns the color scheme.
  3870. * @example
  3871. * //This example sets the textColor2 color.
  3872. * var ntheme = new GC.Spread.Sheets.Theme("customThemeColor");
  3873. * ntheme.colors().accent1("lightgreen");
  3874. * ntheme.colors().textColor2("orange");
  3875. * activeSheet.currentTheme(ntheme);
  3876. * activeSheet.getCell(0, 0).backColor("accent 1");
  3877. * activeSheet.getCell(1, 0).backColor("Text 2");
  3878. */
  3879. textColor2(value?: string): any;
  3880. }
  3881. export class Events{
  3882. /**
  3883. * Defines the events supported in SpreadJS.
  3884. * @class
  3885. */
  3886. constructor();
  3887. /**
  3888. * Occurs when the user has changed the active sheet.
  3889. * @name GC.Spread.Sheets.Workbook#ActiveSheetChanged
  3890. * @event
  3891. * @param {GC.Spread.Sheets.Worksheet} oldSheet The old sheet.
  3892. * @param {GC.Spread.Sheets.Worksheet} newSheet The new sheet.
  3893. * @example
  3894. * //This example creates log text for the ActiveSheetChanged event.
  3895. * // Use IE to see the console log text
  3896. * spread.bind(GC.Spread.Sheets.Events.ActiveSheetChanged, function (sender, args) {
  3897. * console.log("Active sheet has been switched.");
  3898. * });
  3899. */
  3900. static ActiveSheetChanged: string;
  3901. /**
  3902. * Occurs when the user is changing the active sheet.
  3903. * @name GC.Spread.Sheets.Workbook#ActiveSheetChanging
  3904. * @event
  3905. * @param {GC.Spread.Sheets.Worksheet} oldSheet The old sheet.
  3906. * @param {GC.Spread.Sheets.Worksheet} newSheet The new sheet.
  3907. * @param {boolean} cancel A value that indicates whether the operation should be canceled.
  3908. * @example
  3909. * //This example stops the active sheet from changing.
  3910. * spread.bind(GC.Spread.Sheets.Events.ActiveSheetChanging, function (sender, args) {
  3911. * //Cancel sheet switching.
  3912. * args.cancel = true;
  3913. * });
  3914. */
  3915. static ActiveSheetChanging: string;
  3916. /**
  3917. * Occurs before the print
  3918. * @name GC.Spread.Sheets.WorkBook.BeforePrint
  3919. * @event
  3920. * @param {Object} iframe The print Dom
  3921. * @param {booble} cancel Whether cancel print
  3922. * @example
  3923. * //This example uses the BeforePrint.
  3924. * window.onload = function(){
  3925. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3});
  3926. * spread.bind(GC.Spread.Sheets.Events.BeforePrint, function (e, data) {
  3927. * alert(data.iframe + '\n' + 'cancel: ' + data.cancel);
  3928. * });
  3929. * }
  3930. */
  3931. static BeforePrint: string;
  3932. /**
  3933. * Occurs when the user clicks a button, check box, or hyperlink in a cell.
  3934. * @name GC.Spread.Sheets.Workbook#ButtonClicked
  3935. * @event
  3936. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  3937. * @param {string} sheetName The sheet's name.
  3938. * @param {number} row The row index of the cell.
  3939. * @param {number} col The column index of the cell.
  3940. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheet area that contains the cell.
  3941. * @example
  3942. * //This example creates a button cell.
  3943. * var cellType = new GC.Spread.Sheets.CellTypes.Button();
  3944. * cellType.buttonBackColor("#FFFF00");
  3945. * cellType.text("this is a button");
  3946. * activeSheet.setCellType(1,1,cellType);
  3947. * //bind
  3948. * spread.bind(GC.Spread.Sheets.Events.ButtonClicked, function (e, args) {
  3949. * var sheet = args.sheet, row = args.row, col = args.col;
  3950. * var cellType = activeSheet.getCellType(row, col);
  3951. * if (cellType instanceof GC.Spread.Sheets.CellTypes.Button) {
  3952. * alert("Button Clicked");
  3953. * }
  3954. * });
  3955. */
  3956. static ButtonClicked: string;
  3957. /**
  3958. * Occurs when a change is made to a cell in this sheet that may require the cell to be repainted.
  3959. * @name GC.Spread.Sheets.Worksheet#CellChanged
  3960. * @event
  3961. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  3962. * @param {string} sheetName The sheet's name.
  3963. * @param {number} row The row index of the cell.
  3964. * @param {number} col The column index of the cell.
  3965. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheetArea of the cell.
  3966. * @param {string} propertyName The name of the cell's property that has changed.
  3967. * @param {boolean} isUndo Whether this event is from a undo operation.
  3968. * @example
  3969. * //This example uses the CellChanged event.
  3970. * activeSheet.bind(GC.Spread.Sheets.Events.CellChanged, function (e, info) {
  3971. * if(info.sheetArea === GC.Spread.Sheets.SheetArea.viewport){
  3972. * alert("Cell index (" + info.row + "," + info.col + ")");
  3973. * }
  3974. * });
  3975. */
  3976. static CellChanged: string;
  3977. /**
  3978. * Occurs when the user presses down the left mouse button in a cell.
  3979. * @name GC.Spread.Sheets.Worksheet#CellClick
  3980. * @event
  3981. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  3982. * @param {string} sheetName The sheet's name.
  3983. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheet area the clicked cell is in.
  3984. * @param {number} row The row index of the clicked cell.
  3985. * @param {number} col The column index of the clicked cell.
  3986. * @example
  3987. * //This example uses the CellClick event.
  3988. * // Use IE to see the console log text
  3989. * activeSheet.bind(GC.Spread.Sheets.Events.CellClick, function (sender, args) {
  3990. * if(args.sheetArea === GC.Spread.Sheets.SheetArea.colHeader){
  3991. * console.log("The column header was clicked.");
  3992. * }
  3993. * if(args.sheetArea === GC.Spread.Sheets.SheetArea.rowHeader){
  3994. * console.log("The row header was clicked.");
  3995. * }
  3996. * if(args.sheetArea === GC.Spread.Sheets.SheetArea.corner){
  3997. * console.log("The corner header was clicked.");
  3998. * }
  3999. * console.log("Clicked column index: " + args.col);
  4000. * console.log("Clicked row index: " + args.row);
  4001. * });
  4002. * //bind
  4003. * activeSheet.bind(GC.Spread.Sheets.Events.CellDoubleClick, function (sender, args) {
  4004. * if(args.sheetArea === GC.Spread.Sheets.SheetArea.colHeader){
  4005. * console.log("The column header was double clicked.");
  4006. * }
  4007. * if(args.sheetArea === GC.Spread.Sheets.SheetArea.rowHeader){
  4008. * console.log("The row header was double clicked.");
  4009. * }
  4010. * if(args.sheetArea === GC.Spread.Sheets.SheetArea.corner){
  4011. * console.log("The corner header was double clicked.");
  4012. * }
  4013. * console.log("Double clicked column index: " + args.col);
  4014. * console.log("Double clicked row index: " + args.row);
  4015. * })
  4016. */
  4017. static CellClick: string;
  4018. /**
  4019. * Occurs when the user presses down the left mouse button twice (double-clicks) in a cell.
  4020. * @name GC.Spread.Sheets.Worksheet#CellDoubleClick
  4021. * @event
  4022. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4023. * @param {string} sheetName The sheet's name.
  4024. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheet area the clicked cell is in.
  4025. * @param {number} row The row index of the clicked cell.
  4026. * @param {number} col The column index of the clicked cell.
  4027. * @example
  4028. * //This example uses the CellDoubleClick event.
  4029. * // Use IE to see the console log text
  4030. * activeSheet.bind(GC.Spread.Sheets.Events.CellClick, function (sender, args) {
  4031. * if(args.sheetArea === GC.Spread.Sheets.SheetArea.colHeader){
  4032. * console.log("The column header was clicked.");
  4033. * }
  4034. * if(args.sheetArea === GC.Spread.Sheets.SheetArea.rowHeader){
  4035. * console.log("The row header was clicked.");
  4036. * }
  4037. * if(args.sheetArea === GC.Spread.Sheets.SheetArea.corner){
  4038. * console.log("The corner header was clicked.");
  4039. * }
  4040. * console.log("Clicked column index: " + args.col);
  4041. * console.log("Clicked row index: " + args.row);
  4042. * });
  4043. * //bind
  4044. * activeSheet.bind(GC.Spread.Sheets.Events.CellDoubleClick, function (sender, args) {
  4045. * if(args.sheetArea === GC.Spread.Sheets.SheetArea.colHeader){
  4046. * console.log("The column header was double clicked.");
  4047. * }
  4048. * if(args.sheetArea === GC.Spread.Sheets.SheetArea.rowHeader){
  4049. * console.log("The row header was double clicked.");
  4050. * }
  4051. * if(args.sheetArea === GC.Spread.Sheets.SheetArea.corner){
  4052. * console.log("The corner header was double clicked.");
  4053. * }
  4054. * console.log("Double clicked column index: " + args.col);
  4055. * console.log("Double clicked row index: " + args.row);
  4056. * });
  4057. */
  4058. static CellDoubleClick: string;
  4059. /**
  4060. * Occurs when a Clipboard change occurs that affects Spread.Sheets.
  4061. * @name GC.Spread.Sheets.Worksheet#ClipboardChanged
  4062. * @event
  4063. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4064. * @param {string} sheetName The sheet's name.
  4065. * @param {Object} copyData The data from Spread.Sheets that has been set into the clipboard.
  4066. * @param {string} copyData.text The text string of the clipboard.
  4067. * @param {string} copyData.html The html string of the clipboard.
  4068. * @example
  4069. * //This example uses the ClipboardChanged event.
  4070. * // Use IE to see the console log text
  4071. * var activeSheet = spread.getActiveSheet();
  4072. * activeSheet.bind(GC.Spread.Sheets.Events.ClipboardChanged, function (sender, args) {
  4073. * console.log("ClipboardChanged.");
  4074. * });
  4075. * activeSheet.bind(GC.Spread.Sheets.Events.ClipboardChanging, function (sender, args) {
  4076. * console.log("ClipboardChanging");
  4077. * });
  4078. * activeSheet.bind(GC.Spread.Sheets.Events.ClipboardPasted, function (sender, args) {
  4079. * console.log("ClipboardPasted");
  4080. * });
  4081. * activeSheet.bind(GC.Spread.Sheets.Events.ClipboardPasting, function (sender, args) {
  4082. * console.log("ClipboardPasting");
  4083. * });
  4084. */
  4085. static ClipboardChanged: string;
  4086. /**
  4087. * Occurs when the Clipboard is changing due to a Spread.Sheets action.
  4088. * @name GC.Spread.Sheets.Worksheet#ClipboardChanging
  4089. * @event
  4090. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4091. * @param {string} sheetName The sheet's name.
  4092. * @param {Object} copyData The data from Spread.Sheets that is set into the clipboard.
  4093. * @param {string} copyData.text The text string of the clipboard.
  4094. * @param {string} copyData.html The html string of the clipboard.
  4095. * @param {boolean} cancel A value that indicates whether the operation should be canceled.
  4096. * @example
  4097. * //This example uses the ClipboardChanging event.
  4098. * // Use IE to see the console log text
  4099. * var activeSheet = spread.getActiveSheet();
  4100. * activeSheet.bind(GC.Spread.Sheets.Events.ClipboardChanged, function (sender, args) {
  4101. * console.log("ClipboardChanged.");
  4102. * });
  4103. * activeSheet.bind(GC.Spread.Sheets.Events.ClipboardChanging, function (sender, args) {
  4104. * console.log("ClipboardChanging");
  4105. * });
  4106. * activeSheet.bind(GC.Spread.Sheets.Events.ClipboardPasted, function (sender, args) {
  4107. * console.log("ClipboardPasted");
  4108. * });
  4109. * activeSheet.bind(GC.Spread.Sheets.Events.ClipboardPasting, function (sender, args) {
  4110. * console.log("ClipboardPasting");
  4111. * });
  4112. */
  4113. static ClipboardChanging: string;
  4114. /**
  4115. * Occurs when the user pastes from the Clipboard.
  4116. * @name GC.Spread.Sheets.Worksheet#ClipboardPasted
  4117. * @event
  4118. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4119. * @param {string} sheetName The sheet's name.
  4120. * @param {GC.Spread.Sheets.Range} cellRange The range that was pasted.
  4121. * @param {GC.Spread.Sheets.ClipboardPasteOptions} pasteOption The paste option that indicates what data is pasted from the clipboard: values, formatting, or formulas.
  4122. * @param {Object} pasteData The data from the clipboard that will be pasted into Spread.Sheets.
  4123. * @param {string} pasteData.text The text string of the clipboard.
  4124. * @param {string} pasteData.html The html string of the clipboard.
  4125. * @example
  4126. * //This example uses the ClipboardPasted event.
  4127. * // Use IE to see the console log text
  4128. * var activeSheet = spread.getActiveSheet();
  4129. * activeSheet.bind(GC.Spread.Sheets.Events.ClipboardChanged, function (sender, args) {
  4130. * console.log("ClipboardChanged.");
  4131. * });
  4132. * activeSheet.bind(GC.Spread.Sheets.Events.ClipboardChanging, function (sender, args) {
  4133. * console.log("ClipboardChanging");
  4134. * });
  4135. * activeSheet.bind(GC.Spread.Sheets.Events.ClipboardPasted, function (sender, args) {
  4136. * console.log("ClipboardPasted");
  4137. * });
  4138. * activeSheet.bind(GC.Spread.Sheets.Events.ClipboardPasting, function (sender, args) {
  4139. * console.log("ClipboardPasting");
  4140. * });
  4141. */
  4142. static ClipboardPasted: string;
  4143. /**
  4144. * Occurs when the user is pasting from the Clipboard.
  4145. * @name GC.Spread.Sheets.Worksheet#ClipboardPasting
  4146. * @event
  4147. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4148. * @param {string} sheetName The sheet's name.
  4149. * @param {GC.Spread.Sheets.Range} cellRange The range to paste.
  4150. * @param {GC.Spread.Sheets.ClipboardPasteOptions} pasteOption The paste option that indicates what data is pasted from the clipboard: values, formatting, or formulas.
  4151. * @param {Object} pasteData The data from the clipboard that will be pasted into Spread.Sheets.
  4152. * @param {string} pasteData.text The text string of the clipboard.
  4153. * @param {string} pasteData.html The html string of the clipboard.
  4154. * @param {boolean} cancel A value that indicates whether the operation should be canceled.
  4155. * @example
  4156. * //This example uses the ClipboardPasting event.
  4157. * // Use IE to see the console log text
  4158. * var activeSheet = spread.getActiveSheet();
  4159. * activeSheet.bind(GC.Spread.Sheets.Events.ClipboardChanged, function (sender, args) {
  4160. * console.log("ClipboardChanged.");
  4161. * });
  4162. * activeSheet.bind(GC.Spread.Sheets.Events.ClipboardChanging, function (sender, args) {
  4163. * console.log("ClipboardChanging");
  4164. * });
  4165. * activeSheet.bind(GC.Spread.Sheets.Events.ClipboardPasted, function (sender, args) {
  4166. * console.log("ClipboardPasted");
  4167. * });
  4168. * activeSheet.bind(GC.Spread.Sheets.Events.ClipboardPasting, function (sender, args) {
  4169. * console.log("ClipboardPasting");
  4170. * });
  4171. */
  4172. static ClipboardPasting: string;
  4173. /**
  4174. * Occurs when a change is made to a column or range of columns in this sheet that may require the column or range of columns to be repainted.
  4175. * @name GC.Spread.Sheets.Worksheet#ColumnChanged
  4176. * @event
  4177. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4178. * @param {string} sheetName The sheet's name.
  4179. * @param {number} col The column index.
  4180. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheetArea of the column.
  4181. * @param {string} propertyName The name of the column's property that has changed.
  4182. * @param {boolean} isUndo Whether this event is from a undo operation.
  4183. * @example
  4184. * //This example uses the ColumnChanged event.
  4185. * activeSheet.bind(GC.Spread.Sheets.Events.ColumnChanged, function (e, info) {
  4186. * if(info.sheetArea === GC.Spread.Sheets.SheetArea.viewport){
  4187. * alert("Index (" + info.col + ")");
  4188. * }
  4189. * });
  4190. */
  4191. static ColumnChanged: string;
  4192. /**
  4193. * Occurs when before a change is made to a column or range of columns in this sheet that may require the column or range of columns to be repainted.
  4194. * @name GC.Spread.Sheets.Worksheet#ColumnChanging
  4195. * @event
  4196. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4197. * @param {string} sheetName The sheet's name.
  4198. * @param {number} col The column index.
  4199. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheetArea of the column.
  4200. * @param {string} propertyName The name of the column's property that has changed.
  4201. * @example
  4202. * //This example uses the ColumnChanging event.
  4203. * activeSheet.bind(GC.Spread.Sheets.Events.ColumnChanging, function (e, info) {
  4204. * if(info.sheetArea === GC.Spread.Sheets.SheetArea.viewport){
  4205. * alert("Index (" + info.col + ")");
  4206. * }
  4207. * });
  4208. */
  4209. static ColumnChanging: string;
  4210. /**
  4211. * Occurs when the column width has changed.
  4212. * @name GC.Spread.Sheets.Worksheet#ColumnWidthChanged
  4213. * @event
  4214. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4215. * @param {string} sheetName The sheet's name.
  4216. * @param {Array} colList The list of columns whose widths have changed.
  4217. * @param {boolean} header Whether the columns are row header columns.
  4218. * @example
  4219. * //This example uses the ColumnWidthChanged event.
  4220. * activeSheet.bind(GC.Spread.Sheets.Events.ColumnWidthChanged, function (e, info) {
  4221. * alert("Column (" + info.colList + ")");
  4222. * });
  4223. */
  4224. static ColumnWidthChanged: string;
  4225. /**
  4226. * Occurs when the column width is changing.
  4227. * @name GC.Spread.Sheets.Worksheet#ColumnWidthChanging
  4228. * @event
  4229. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4230. * @param {string} sheetName The sheet's name.
  4231. * @param {Array} colList The list of columns whose widths are changing.
  4232. * @param {boolean} header Whether the columns are row header columns.
  4233. * @param {boolean} cancel A value that indicates whether the operation should be canceled.
  4234. * @example
  4235. * //This example uses the ColumnWidthChanging event.
  4236. * activeSheet.bind(GC.Spread.Sheets.Events.ColumnWidthChanging, function (e, info) {
  4237. * alert("Column (" + info.colList + ")");
  4238. * });
  4239. */
  4240. static ColumnWidthChanging: string;
  4241. /**
  4242. * Occurs when any comment has changed.
  4243. * @name GC.Spread.Sheets.Worksheet#CommentChanged
  4244. * @event
  4245. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4246. * @param {string} sheetName The sheet's name.
  4247. * @param {GC.Spread.Sheets.Comments.Comment} comment The comment that triggered the event.
  4248. * @param {string} propertyName The name of the comment's property that has changed.
  4249. * @example
  4250. * //This example uses the CommentChanged event.
  4251. * activeSheet.bind(GC.Spread.Sheets.Events.CommentChanged, function (e, info) {
  4252. * alert("changed");
  4253. * });
  4254. */
  4255. static CommentChanged: string;
  4256. /**
  4257. * Occurs when the user has removed the comment.
  4258. * @name GC.Spread.Sheets.Worksheet#CommentRemoved
  4259. * @event
  4260. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4261. * @param {string} sheetName The sheet's name.
  4262. * @param {GC.Spread.Sheets.Comments.Comment} comment The comment has been removed.
  4263. * @example
  4264. * //This example uses the CommentRemoved event.
  4265. * var comment = new GC.Spread.Sheets.Comments.Comment();
  4266. * comment.text("new comment!");
  4267. * comment.backColor("orange");
  4268. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  4269. * activeSheet.getCell(5,5).comment(comment);
  4270. * activeSheet.bind(GC.Spread.Sheets.Events.CommentRemoved, function (e, info) {
  4271. * console.log("sheet name: " + info.sheetName);
  4272. * });
  4273. */
  4274. static CommentRemoved: string;
  4275. /**
  4276. * Occurs when the user is removing any comment.
  4277. * @name GC.Spread.Sheets.Worksheet#CommentRemoving
  4278. * @event
  4279. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4280. * @param {string} sheetName The sheet's name.
  4281. * @param {GC.Spread.Sheets.Comments.Comment} comment The comment is being removed.
  4282. * @param {boolean} cancel A value that indicates whether the operation should be canceled.
  4283. * @example
  4284. * //This example prevents the comment from being removed.
  4285. * var comment = new GC.Spread.Sheets.Comments.Comment();
  4286. * comment.text("new comment!");
  4287. * comment.backColor("orange");
  4288. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  4289. * activeSheet.getCell(5,5).comment(comment);
  4290. * activeSheet.bind(GC.Spread.Sheets.Events.CommentRemoving, function (e, info) {
  4291. * info.cancel = true;
  4292. * });
  4293. */
  4294. static CommentRemoving: string;
  4295. /**
  4296. * Occurs when the user is dragging and dropping a range of cells.
  4297. * @name GC.Spread.Sheets.Worksheet#DragDropBlock
  4298. * @event
  4299. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4300. * @param {string} sheetName The sheet's name.
  4301. * @param {number} fromRow The row index of the top left cell of the source range (range being dragged).
  4302. * @param {number} fromCol The column index of the top left cell of the source range (range being dragged).
  4303. * @param {number} toRow The row index of the top left cell of the destination range (where selection is dropped).
  4304. * @param {number} toCol The column index of the bottom right cell of the destination range (where selection is dropped).
  4305. * @param {number} rowCount The row count of the cell range being dragged.
  4306. * @param {number} colCount The column count of the cell range being dragged.
  4307. * @param {boolean} copy Whether the source range is copied.
  4308. * @param {boolean} insert Whether the source range is inserted.
  4309. * @param {GC.Spread.Sheets.CopyToOptions} copyOption The CopyOption value for the drag and drop operation.
  4310. * @param {boolean} cancel A value that indicates whether the operation should be canceled.
  4311. * @example
  4312. * //This example creates log text for the DragDropBlock event.
  4313. * // Use IE to see the console log text
  4314. * var activeSheet = spread.getActiveSheet();
  4315. * activeSheet.bind(GC.Spread.Sheets.Events.DragDropBlock, function (e, args) {
  4316. * console.log("From Column:" + args.fromCol);
  4317. * console.log("From Row:" + args.fromRow);
  4318. * console.log("To Column:" + args.toCol);
  4319. * console.log("To Row:" + args.toRow);
  4320. * });
  4321. */
  4322. static DragDropBlock: string;
  4323. /**
  4324. * Occurs when the user completes dragging and dropping a range of cells.
  4325. * @name GC.Spread.Sheets.Worksheet#DragDropBlockCompleted
  4326. * @event
  4327. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4328. * @param {string} sheetName The sheet's name.
  4329. * @param {number} fromRow The row index of the top left cell of the source range (range being dragged).
  4330. * @param {number} fromCol The column index of the top left cell of the source range (range being dragged).
  4331. * @param {number} toRow The row index of the top left cell of the destination range (where selection is dropped).
  4332. * @param {number} toCol The column index of the bottom right cell of the destination range (where selection is dropped).
  4333. * @param {number} rowCount The row count of the cell range being dragged.
  4334. * @param {number} colCount The column count of the cell range being dragged.
  4335. * @param {boolean} copy Whether the source range is copied.
  4336. * @param {boolean} insert Whether the source range is inserted.
  4337. * @param {GC.Spread.Sheets.CopyToOptions} copyOption The CopyOption value for the drag and drop operation.
  4338. * @example
  4339. * //This example uses the DragDropBlockCompleted event.
  4340. * activeSheet.bind(GC.Spread.Sheets.Events.DragDropBlockCompleted, function (e, args) {
  4341. * alert("From Column (" + args.fromCol + ")");
  4342. * });
  4343. */
  4344. static DragDropBlockCompleted: string;
  4345. /**
  4346. * Occurs when the user is dragging to fill a range of cells.
  4347. * @name GC.Spread.Sheets.Worksheet#DragFillBlock
  4348. * @event
  4349. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4350. * @param {string} sheetName The sheet's name.
  4351. * @param {GC.Spread.Sheets.Range} fillRange The range used for the fill operation.
  4352. * @param {GC.Spread.Sheets.Fill.AutoFillType} autoFillType AutoFillType value used for the fill operation.
  4353. * @param {GC.Spread.Sheets.Fill.FillDirection} fillDirection The direction of the fill.
  4354. * @param {boolean} cancel A value that indicates whether the operation should be canceled.
  4355. * @example
  4356. * //This example uses the DragFillBlock event.
  4357. * activeSheet.bind(GC.Spread.Sheets.Events.DragFillBlock, function (e, info) {
  4358. * alert("Direction (" + info.fillDirection + ")");
  4359. * });
  4360. */
  4361. static DragFillBlock: string;
  4362. /**
  4363. * Occurs when the user completes dragging to fill a range of cells.
  4364. * @name GC.Spread.Sheets.Worksheet#DragFillBlockCompleted
  4365. * @event
  4366. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4367. * @param {string} sheetName The sheet's name.
  4368. * @param {GC.Spread.Sheets.Range} fillRange The range used for the fill operation.
  4369. * @param {GC.Spread.Sheets.Fill.AutoFillType} autoFillType AutoFillType value used for the fill operation.
  4370. * @param {GC.Spread.Sheets.Fill.FillDirection} fillDirection The direction of the fill.
  4371. * @example
  4372. * //This example uses the DragFillBlockCompleted event.
  4373. * activeSheet.bind(GC.Spread.Sheets.Events.DragFillBlockCompleted, function (e, info) {
  4374. * alert("Type (" + info.autoFillType + ")");
  4375. * });
  4376. */
  4377. static DragFillBlockCompleted: string;
  4378. /**
  4379. * Occurs after user drag merge cells.
  4380. * @name GC.Spread.Sheets.Worksheet#DragMerged
  4381. * @event
  4382. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4383. * @param {string} sheetName The sheet's name.
  4384. * @param {GC.Spread.Sheets.Range} mergeRange The range that will be merged.
  4385. * @example
  4386. * //This example returns the row index.
  4387. * // Press Ctrl key to merge
  4388. * $(document).keydown(function (e) {
  4389. * if (e.keyCode === 17) {
  4390. * spread.options.allowUserDragMerge = true;
  4391. * }
  4392. * });
  4393. * $(document).keyup(function (e) {
  4394. * if (e.keyCode === 17) {
  4395. * spread.options.allowUserDragMerge = false;
  4396. * }
  4397. * });
  4398. * activeSheet.bind(GC.Spread.Sheets.Events.DragMerging, function (e, data) {
  4399. * var mergeRange = data.mergeRange;
  4400. * alert(mergeRange.row);
  4401. * });
  4402. * activeSheet.bind(GC.Spread.Sheets.Events.DragMerged, function (e, data) {
  4403. * var mergeRange = data.mergeRange;
  4404. * alert(mergeRange.row);
  4405. * });
  4406. */
  4407. static DragMerged: string;
  4408. /**
  4409. * Occurs before user drag merge cells.
  4410. * @name GC.Spread.Sheets.Worksheet#DragMerging
  4411. * @event
  4412. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4413. * @param {string} sheetName The sheet's name.
  4414. * @param {GC.Spread.Sheets.Range} mergeRange The range that will be merged.
  4415. * @param {bool} cancel A value that indicates whether the operation should be canceled.
  4416. * @example
  4417. * //This example returns the row index.
  4418. * // Press Ctrl key to merge
  4419. * $(document).keydown(function (e) {
  4420. * if (e.keyCode === 17) {
  4421. * spread.options.allowUserDragMerge = true;
  4422. * }
  4423. * });
  4424. * $(document).keyup(function (e) {
  4425. * if (e.keyCode === 17) {
  4426. * spread.options.allowUserDragMerge = false;
  4427. * }
  4428. * });
  4429. * activeSheet.bind(GC.Spread.Sheets.Events.DragMerging, function (e, data) {
  4430. * var mergeRange = data.mergeRange;
  4431. * alert(mergeRange.row);
  4432. * });
  4433. * activeSheet.bind(GC.Spread.Sheets.Events.DragMerged, function (e, data) {
  4434. * var mergeRange = data.mergeRange;
  4435. * alert(mergeRange.row);
  4436. * });
  4437. */
  4438. static DragMerging: string;
  4439. /**
  4440. * Occurs when a cell is in edit mode and the text is changed.
  4441. * @name GC.Spread.Sheets.Worksheet#EditChange
  4442. * @event
  4443. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4444. * @param {string} sheetName The sheet's name.
  4445. * @param {number} row The row index of cell.
  4446. * @param {number} col The column index of cell.
  4447. * @param {Object} editingText The value from the current editor.
  4448. * @example
  4449. * //This example creates log text for the EditChange event.
  4450. * // Use IE to see the console log text
  4451. * activeSheet.bind(GC.Spread.Sheets.Events.EditChange, function (sender, args) {
  4452. * console.log("Cell (" + args.row + ", " + args.col + ") data has been changed.")
  4453. * });
  4454. */
  4455. static EditChange: string;
  4456. /**
  4457. * Occurs when a cell leaves edit mode.
  4458. * @name GC.Spread.Sheets.Worksheet#EditEnded
  4459. * @event
  4460. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4461. * @param {string} sheetName The sheet's name.
  4462. * @param {number} row The row index of cell.
  4463. * @param {number} col The column index of cell.
  4464. * @param {Object} editingText The value from the current editor.
  4465. * @example
  4466. * //This example creates log text for the EditStarting and EditEnded events.
  4467. * // Use IE to see the console log text
  4468. * var activeSheet = spread.getActiveSheet();
  4469. * activeSheet.bind(GC.Spread.Sheets.Events.EditStarting, function (sender, args) {
  4470. * console.log("Start cell editing.");
  4471. * });
  4472. * activeSheet.bind(GC.Spread.Sheets.Events.EditEnded, function (sender, args) {
  4473. * console.log("Finish cell editing.");
  4474. * });
  4475. */
  4476. static EditEnded: string;
  4477. /**
  4478. * Occurs when a cell is leaving edit mode.
  4479. * @name GC.Spread.Sheets.Worksheet#EditEnding
  4480. * @event
  4481. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4482. * @param {string} sheetName The sheet's name.
  4483. * @param {number} row The row index of cell.
  4484. * @param {number} col The column index of cell.
  4485. * @param {Object} editor The current editor.
  4486. * @param {Object} editingText The value from the current editor.
  4487. * @param {boolean} cancel A value that indicates whether the operation should be canceled.
  4488. * @example
  4489. * //This example uses the EditEnding event.
  4490. * activeSheet.bind(GC.Spread.Sheets.Events.EditStarting, function (sender, args) {
  4491. * console.log("Start cell editing.");
  4492. * });
  4493. * activeSheet.bind(GC.Spread.Sheets.Events.EditEnding, function (sender, args) {
  4494. * console.log("EditEnding event.");
  4495. * });
  4496. * activeSheet.bind(GC.Spread.Sheets.Events.EditEnded, function (sender, args) {
  4497. * console.log("EditEnded event.");
  4498. * });
  4499. */
  4500. static EditEnding: string;
  4501. /**
  4502. * Occurs when the editor's status has changed.
  4503. * @name GC.Spread.Sheets.Worksheet#EditorStatusChanged
  4504. * @event
  4505. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4506. * @param {string} sheetName The sheet's name.
  4507. * @param {GC.Spread.Sheets.EditorStatus} oldStatus The old status of the editor.
  4508. * @param {GC.Spread.Sheets.EditorStatus} newStatus The new status of the editor.
  4509. * @example
  4510. * //This example uses the EditorStatusChanged event.
  4511. * activeSheet.bind(GC.Spread.Sheets.Events.EditorStatusChanged, function (e, info) {
  4512. * alert("Column (" + info.newStatus + ")");
  4513. * });
  4514. */
  4515. static EditorStatusChanged: string;
  4516. /**
  4517. * Occurs when a cell is entering edit mode.
  4518. * @name GC.Spread.Sheets.Worksheet#EditStarting
  4519. * @event
  4520. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4521. * @param {string} sheetName The sheet's name.
  4522. * @param {number} row The row index of cell.
  4523. * @param {number} col The column index of cell.
  4524. * @param {boolean} cancel A value that indicates whether the operation should be canceled.
  4525. * @example
  4526. * //This example creates log text for the EditStarting and EditEnded events.
  4527. * // Use IE to see the console log text
  4528. * var activeSheet = spread.getActiveSheet();
  4529. * activeSheet.bind(GC.Spread.Sheets.Events.EditStarting, function (sender, args) {
  4530. * console.log("Start cell editing.");
  4531. * });
  4532. * activeSheet.bind(GC.Spread.Sheets.Events.EditEnded, function (sender, args) {
  4533. * console.log("Finish cell editing.");
  4534. * });
  4535. */
  4536. static EditStarting: string;
  4537. /**
  4538. * Occurs when the focus enters a cell.
  4539. * @name GC.Spread.Sheets.Worksheet#EnterCell
  4540. * @event
  4541. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4542. * @param {string} sheetName The sheet's name.
  4543. * @param {number} row The row index of the cell being entered.
  4544. * @param {number} col The column index of the cell being entered.
  4545. * @example
  4546. * //This example uses the EnterCell event.
  4547. * activeSheet.bind(GC.Spread.Sheets.Events.EnterCell, function (e, info) {
  4548. * alert("Cell (" + info.row + ", " + info.col +")");
  4549. * });
  4550. */
  4551. static EnterCell: string;
  4552. /**
  4553. * Occurs when any floating object has changed.
  4554. * @name GC.Spread.Sheets.Worksheet#FloatingObjectsChanged
  4555. * @event
  4556. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4557. * @param {string} sheetName The sheet's name.
  4558. * @param {GC.Spread.Sheets.FloatingObjects.FloatingObject} floatingObject The floating object that triggered the event.
  4559. * @param {string} propertyName The name of the floating object's property that has changed.
  4560. * @example
  4561. * //This example uses the FloatingObjectChanged event.
  4562. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  4563. * var btn = document.createElement('button');
  4564. * btn.style.width = "60px";
  4565. * btn.style.height = "30px";
  4566. * btn.innerText = "button";
  4567. * customFloatingObject.content(btn);
  4568. * activeSheet.floatingObjects.add(customFloatingObject);
  4569. * activeSheet.bind(GC.Spread.Sheets.Events.FloatingObjectChanged, function (e, info) {
  4570. * alert("changed");
  4571. * });
  4572. */
  4573. static FloatingObjectChanged: string;
  4574. /**
  4575. * Occurs when the custom floating object content is loaded.
  4576. * @name GC.Spread.Sheets.Worksheet#FloatingObjectLoaded
  4577. * @event
  4578. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4579. * @param {string} sheetName The sheet's name.
  4580. * @param {GC.Spread.Sheets.FloatingObjects.FloatingObject} floatingObject The custom floating object that triggered the event.
  4581. * @param {HTMLElement} element The HTMLElement of the custom floating object.
  4582. */
  4583. static FloatingObjectLoaded: string;
  4584. /**
  4585. * Occurs when the user has removed the floating object.
  4586. * @name GC.Spread.Sheets.Worksheet#FloatingObjectRemoved
  4587. * @event
  4588. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4589. * @param {string} sheetName The sheet's name.
  4590. * @param {GC.Spread.Sheets.FloatingObjects.FloatingObject} floatingObject The floating object has been removed.
  4591. * @example
  4592. * //This example uses the FloatingObjectRemoved event.
  4593. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  4594. * var btn = document.createElement('button');
  4595. * btn.style.width = "60px";
  4596. * btn.style.height = "30px";
  4597. * btn.innerText = "button";
  4598. * customFloatingObject.content(btn);
  4599. * activeSheet.floatingObjects.add(customFloatingObject);
  4600. * activeSheet.bind(GC.Spread.Sheets.Events.FloatingObjectRemoved, function (e, info) {
  4601. * alert(info.sheetName);
  4602. * });
  4603. */
  4604. static FloatingObjectRemoved: string;
  4605. /**
  4606. * Occurs when the user is removing any floating object.
  4607. * @name GC.Spread.Sheets.Worksheet#FloatingObjectRemoving
  4608. * @event
  4609. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4610. * @param {string} sheetName The sheet's name.
  4611. * @param {GC.Spread.Sheets.FloatingObjects.FloatingObject} floatingObject The floating object is being removed.
  4612. * @param {boolean} cancel A value that indicates whether the operation should be canceled.
  4613. * @example
  4614. * //This example uses the FloatingObjectRemoving event.
  4615. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  4616. * var btn = document.createElement('button');
  4617. * btn.style.width = "60px";
  4618. * btn.style.height = "30px";
  4619. * btn.innerText = "button";
  4620. * customFloatingObject.content(btn);
  4621. * activeSheet.floatingObjects.add(customFloatingObject);
  4622. * activeSheet.bind(GC.Spread.Sheets.Events.FloatingObjectRemoving, function (e, info) {
  4623. * info.cancel = true;
  4624. * });
  4625. */
  4626. static FloatingObjectRemoving: string;
  4627. /**
  4628. * Occurs when the selections of the floating object have changed.
  4629. * @name GC.Spread.Sheets.Worksheet#FloatingObjectsSelectionChanged
  4630. * @event
  4631. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4632. * @param {string} sheetName The sheet's name.
  4633. * @param {GC.Spread.Sheets.FloatingObjects.FloatingObject} floatingObject The floating object that triggered the event.
  4634. * @example
  4635. * //This example uses the FloatingObjectSelectionChanged event.
  4636. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  4637. * var btn = document.createElement('button');
  4638. * btn.style.width = "60px";
  4639. * btn.style.height = "30px";
  4640. * btn.innerText = "button";
  4641. * customFloatingObject.content(btn);
  4642. * activeSheet.floatingObjects.add(customFloatingObject);
  4643. * // Use IE to see the console log text
  4644. * activeSheet.bind(GC.Spread.Sheets.Events.FloatingObjectSelectionChanged, function (e, info) {
  4645. * console.log("sheet name: " + info.sheetName);
  4646. * });
  4647. */
  4648. static FloatingObjectSelectionChanged: string;
  4649. /**
  4650. * Occurs when an invalid operation is performed.
  4651. * @name GC.Spread.Sheets.Worksheet#InvalidOperation
  4652. * @event
  4653. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4654. * @param {string} sheetName The sheet's name.
  4655. * @param {GC.Spread.Sheets.InvalidOperationType} invalidType Indicates which operation was invalid.
  4656. * @param {string} message The description of the invalid operation.
  4657. * @example
  4658. * //This example uses the InvalidOperation event.
  4659. * activeSheet.bind(GC.Spread.Sheets.Events.InvalidOperation, function (e, info) {
  4660. * alert("Message (" + info.message + ")");
  4661. * });
  4662. */
  4663. static InvalidOperation: string;
  4664. /**
  4665. * Occurs when the focus leaves a cell.
  4666. * @name GC.Spread.Sheets.Worksheet#LeaveCell
  4667. * @event
  4668. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4669. * @param {string} sheetName The sheet's name.
  4670. * @param {number} row The row index of the cell being left.
  4671. * @param {number} col The column index of the cell being left.
  4672. * @param {boolean} cancel Whether the operation should be canceled.
  4673. * @example
  4674. * //This example creates log text for the LeaveCell event.
  4675. * // Use IE to see the console log text
  4676. * activeSheet.bind(GC.Spread.Sheets.Events.LeaveCell, function (sender, args) {
  4677. * console.log("The column index before moving: " + args.col);
  4678. * console.log("The row index before moving: " + args.row);
  4679. * });
  4680. */
  4681. static LeaveCell: string;
  4682. /**
  4683. * Occurs when the left column changes.
  4684. * @name GC.Spread.Sheets.Worksheet#LeftColumnChanged
  4685. * @event
  4686. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4687. * @param {string} sheetName The sheet's name.
  4688. * @param {number} oldLeftCol The old left column index.
  4689. * @param {number} newLeftCol The new left column index.
  4690. * @example
  4691. * //This example synchronizes vertical and horizontal scrolling for sheet 1 and sheet 2.
  4692. * var sheet1 = spread.getSheet(0),
  4693. * sheet2 = spread.getSheet(1);
  4694. * sheet1.bind(GC.Spread.Sheets.Events.TopRowChanged, function (sender, args) {
  4695. * //Set the displayed top row of sheet1 to sheet2 (vertical scroll synchronization).
  4696. * sheet2.showRow(args.newTopRow, GC.Spread.Sheets.VerticalPosition.top);
  4697. * });
  4698. * sheet1.bind(GC.Spread.Sheets.Events.LeftColumnChanged, function (sender, args) {
  4699. * //Set the displayed left column of sheet1 to sheet2 (Horizontal scroll synchronization).
  4700. * sheet2.showColumn(args.newLeftCol, GC.Spread.Sheets.HorizontalPosition.left);
  4701. * });
  4702. */
  4703. static LeftColumnChanged: string;
  4704. /**
  4705. * Occurs when the outline column check status has changed.
  4706. * @name GC.Spread.Sheets.Worksheet#OutlineColumnCheckStatusChanged
  4707. * @event
  4708. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4709. * @param {string} sheetName The sheet's name.
  4710. * @param {number} row The outline column's change row index.
  4711. * @param {number} col The outline column's change col index.
  4712. * @param {boolean} status The outline column's change status
  4713. * @example
  4714. * //Removing the sparkline causes a change.
  4715. * activeSheet.bind(GC.Spread.Sheets.Events.OutlineColumnCheckStatusChanged, function (e, info) {
  4716. * console.log("status: " + info.status);
  4717. * });
  4718. */
  4719. static OutlineColumnCheckStatusChanged: string;
  4720. /**
  4721. * Occurs when any picture has changed.
  4722. * @name GC.Spread.Sheets.Worksheet#PictureChanged
  4723. * @event
  4724. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4725. * @param {string} sheetName The sheet's name.
  4726. * @param {GC.Spread.Sheets.FloatingObjects.Picture} picture The picture that triggered the event.
  4727. * @param {string} propertyName The name of the picture's property that has changed.
  4728. * @example
  4729. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3});
  4730. * var activeSheet = spread.getActiveSheet();
  4731. * activeSheet.pictures.add("f2","Event.png",2,2,6,6);
  4732. * activeSheet.pictures.add("f1","tsoutline.png",3,0,6,6);
  4733. * // Use IE to see the console log text
  4734. * activeSheet.bind(GC.Spread.Sheets.Events.PictureChanged, function (e, info) {
  4735. * console.log("Sheet: " + info.sheetName);
  4736. * });
  4737. * @example
  4738. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3});
  4739. * var activeSheet = spread.getActiveSheet();
  4740. * activeSheet.pictures.add("f2","Event.png",2,2,6,6);
  4741. * activeSheet.pictures.add("f1","tsoutline.png",3,0,6,6);
  4742. * // Use IE to see the console log text
  4743. * activeSheet.bind(GC.Spread.Sheets.Events.PictureChanged, function (e, info) {
  4744. * console.log("Property: " + info.propertyName);
  4745. * });
  4746. */
  4747. static PictureChanged: string;
  4748. /**
  4749. * Occurs when the selections of the picture have changed.
  4750. * @name GC.Spread.Sheets.Worksheet#PictureSelectionChanged
  4751. * @event
  4752. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4753. * @param {string} sheetName The sheet's name.
  4754. * @param {GC.Spread.Sheets.FloatingObjects.Picture} picture The picture that triggered the event.
  4755. * @example
  4756. * //This example uses the PictureSelectionChanged event.
  4757. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3});
  4758. * var activeSheet = spread.getActiveSheet();
  4759. * activeSheet.pictures.add("f2","Event.png",2,2,6,6);
  4760. * activeSheet.pictures.add("f1","tsoutline.png",3,0,6,6);
  4761. * // Use IE to see the console log text
  4762. * activeSheet.bind(GC.Spread.Sheets.Events.PictureSelectionChanged, function (e, info) {
  4763. * console.log("Sheet: " + info.sheetName);
  4764. * });
  4765. */
  4766. static PictureSelectionChanged: string;
  4767. /**
  4768. * Occurs when the cell range has changed.
  4769. * @name GC.Spread.Sheets.Worksheet#RangeChanged
  4770. * @event
  4771. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4772. * @param {string} sheetName The sheet's name.
  4773. * @param {number} row The range's row index.
  4774. * @param {number} col The range's column index.
  4775. * @param {number} rowCount The range's row count.
  4776. * @param {number} colCount The range's column count.
  4777. * @param {Array.<string>} tableNames A collection of table names.
  4778. * @param {Array.<Object>} changedCells The positions of the cells whose data has changed, each position has row and col.
  4779. * @param {GC.Spread.Sheets.RangeChangedAction} action The type of action that raises the RangeChanged event.
  4780. * @example
  4781. * //This example returns the sheet name and action when changing the cell range in Microsoft Internet Explorer.
  4782. * activeSheet.bind(GC.Spread.Sheets.Events.RangeChanged, function (sender, args) {
  4783. * console.log(args.sheetName, args.action);
  4784. * });
  4785. */
  4786. static RangeChanged: string;
  4787. /**
  4788. * Occurs when a range column has just been clear filtered.
  4789. * @name GC.Spread.Sheets.Worksheet#RangeFilterCleared
  4790. * @event
  4791. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4792. * @param {string} sheetName The sheet's name.
  4793. * @param {number} col The index of the sheet column has just been clear filtered.
  4794. * @example
  4795. * //This example uses the RangeFilterCleared event.
  4796. * activeSheet.getCell(0,0).text("Name");
  4797. * activeSheet.getCell(0,1).text("Value");
  4798. * activeSheet.getCell(0,2).text("T/F");
  4799. * activeSheet.getCell(1,0).text("AW");
  4800. * activeSheet.getCell(1,1).text("5");
  4801. * activeSheet.getCell(1,2).text("T");
  4802. * var cellRange =new GC.Spread.Sheets.Range(0, 0, 5, 1);
  4803. * var hideRowFilter =new GC.Spread.Sheets.Filter.HideRowFilter(cellRange);
  4804. * activeSheet.rowFilter(hideRowFilter);
  4805. * activeSheet.bind(GC.Spread.Sheets.Events.RangeFilterCleared, function (e, info) {
  4806. * alert("Col (" + info.col + ")");
  4807. * });
  4808. */
  4809. static RangeFilterCleared: string;
  4810. /**
  4811. * Occurs when a range column is about to be automatically clear filter.
  4812. * @name GC.Spread.Sheets.Worksheet#RangeFilterClearing
  4813. * @event
  4814. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4815. * @param {string} sheetName The sheet's name.
  4816. * @param {number} col The index of the sheet column to be automatically clear filter.
  4817. * @example
  4818. * //This example uses the RangeFilterClearing event.
  4819. * activeSheet.getCell(0,0).text("Name");
  4820. * activeSheet.getCell(0,1).text("Value");
  4821. * activeSheet.getCell(0,2).text("T/F");
  4822. * activeSheet.getCell(1,0).text("AW");
  4823. * activeSheet.getCell(1,1).text("5");
  4824. * activeSheet.getCell(1,2).text("T");
  4825. * var cellRange =new GC.Spread.Sheets.Range(0, 0, 5, 1);
  4826. * var hideRowFilter =new GC.Spread.Sheets.Filter.HideRowFilter(cellRange);
  4827. * activeSheet.rowFilter(hideRowFilter);
  4828. * activeSheet.bind(GC.Spread.Sheets.Events.RangeFilterClearing, function (e, info) {
  4829. * alert("Col (" + info.col + ")");
  4830. * });
  4831. */
  4832. static RangeFilterClearing: string;
  4833. /**
  4834. * Occurs when a column has just been automatically filtered.
  4835. * @name GC.Spread.Sheets.Worksheet#RangeFiltered
  4836. * @event
  4837. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4838. * @param {string} sheetName The sheet's name.
  4839. * @param {number} col The index of the column that was automatically filtered.
  4840. * @param {Array} filterValues The values by which the column was filtered.
  4841. * @param {Array} conditionInfo The condition rule info that which the column was filtered.
  4842. * @example
  4843. * //This example uses the RangeFiltered event.
  4844. * var cellrange =new GC.Spread.Sheets.Range(0, 2, 5, 1);
  4845. * var hideRowFilter =new GC.Spread.Sheets.Filter.HideRowFilter(cellrange);
  4846. * activeSheet.rowFilter(hideRowFilter);
  4847. * activeSheet.bind(GC.Spread.Sheets.Events.RangeFiltered, function (e, info) {
  4848. * alert("Col (" + info.col + ")");
  4849. * });
  4850. */
  4851. static RangeFiltered: string;
  4852. /**
  4853. * Occurs when a column is about to be automatically filtered.
  4854. * @name GC.Spread.Sheets.Worksheet#RangeFiltering
  4855. * @event
  4856. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4857. * @param {string} sheetName The sheet's name.
  4858. * @param {number} col The index of the column to be automatically filtered.
  4859. * @param {Array} filterValues The values by which to filter the column.
  4860. * @param {Object} conditionInfo The condition rule info by which to filter the column.
  4861. * @example
  4862. * //This example uses the RangeFiltering event.
  4863. * var cellrange =new GC.Spread.Sheets.Range(0, 2, 5, 1);
  4864. * var hideRowFilter =new GC.Spread.Sheets.Filter.HideRowFilter(cellrange);
  4865. * activeSheet.rowFilter(hideRowFilter);
  4866. * activeSheet.bind(GC.Spread.Sheets.Events.RangeFiltering, function (e, info) {
  4867. * alert("Col (" + info.col + ")");
  4868. * });
  4869. */
  4870. static RangeFiltering: string;
  4871. /**
  4872. * Occurs when the user has changed the outline state (range group) for rows or columns.
  4873. * @name GC.Spread.Sheets.Worksheet#RangeGroupStateChanged
  4874. * @event
  4875. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4876. * @param {string} sheetName The sheet's name.
  4877. * @param {boolean} isRowGroup Whether the outline (range group) is a group of rows.
  4878. * @param {number} index The index of the RangeGroupInfo object whose state has changed.
  4879. * @param {number} level The level of the RangeGroupInfo object whose state has changed.
  4880. * @example
  4881. * //This example uses the RangeGroupStateChanged event.
  4882. * activeSheet.suspendPaint();
  4883. * activeSheet.setRowCount(34);
  4884. * activeSheet.setValue(0,0,"Western");
  4885. * activeSheet.setValue(0,1,"Western");
  4886. * activeSheet.setValue(0,2,"Western");
  4887. * activeSheet.setValue(1,0,"A");
  4888. * activeSheet.setValue(1,1,"B");
  4889. * activeSheet.setValue(1,2,"C");
  4890. * activeSheet.setValue(2,0,"A");
  4891. * activeSheet.setValue(2,1,"B");
  4892. * activeSheet.setValue(2,2,"C");
  4893. * activeSheet.rowOutlines.group(0,2);
  4894. * activeSheet.columnOutlines.group(0,1);
  4895. * activeSheet.resumePaint();
  4896. * activeSheet.bind(GC.Spread.Sheets.Events.RangeGroupStateChanged, function (e, info) {
  4897. * alert("Level (" + info.level + ")");
  4898. * });
  4899. */
  4900. static RangeGroupStateChanged: string;
  4901. /**
  4902. * Occurs before the user changes the outline state (range group) for rows or columns.
  4903. * @name GC.Spread.Sheets.Worksheet#RangeGroupStateChanging
  4904. * @event
  4905. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4906. * @param {string} sheetName The sheet's name.
  4907. * @param {boolean} isRowGroup Whether the outline (range group) is a group of rows.
  4908. * @param {number} index The index of the RangeGroupInfo object whose state is changing.
  4909. * @param {number} level The level of the RangeGroupInfo object whose state is changing.
  4910. * @param {boolean} cancel A value that indicates whether the operation should be canceled.
  4911. * @example
  4912. * //This example uses the RangeGroupStateChanging event.
  4913. * activeSheet.suspendPaint();
  4914. * activeSheet.setRowCount(34);
  4915. * activeSheet.setValue(0,0,"Western");
  4916. * activeSheet.setValue(0,1,"Western");
  4917. * activeSheet.setValue(0,2,"Western");
  4918. * activeSheet.setValue(1,0,"A");
  4919. * activeSheet.setValue(1,1,"B");
  4920. * activeSheet.setValue(1,2,"C");
  4921. * activeSheet.setValue(2,0,"A");
  4922. * activeSheet.setValue(2,1,"B");
  4923. * activeSheet.setValue(2,2,"C");
  4924. * activeSheet.rowOutlines.group(0,2);
  4925. * activeSheet.columnOutlines.group(0,1);
  4926. * activeSheet.resumePaint();
  4927. * activeSheet.bind(GC.Spread.Sheets.Events.RangeGroupStateChanging, function (e, info) {
  4928. * alert("Level (" + info.level + ")");
  4929. * });
  4930. */
  4931. static RangeGroupStateChanging: string;
  4932. /**
  4933. * Occurs when a column has just been automatically sorted.
  4934. * @name GC.Spread.Sheets.Worksheet#RangeSorted
  4935. * @event
  4936. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4937. * @param {string} sheetName The sheet's name.
  4938. * @param {number} col The index of the column that was automatically sorted.
  4939. * @param {boolean} ascending Whether the automatic sort is ascending.
  4940. * @example
  4941. * //This example uses the RangeSorted event.
  4942. * activeSheet.setValue(0, 0, 10);
  4943. * activeSheet.setValue(1, 0, 100);
  4944. * activeSheet.setValue(2, 0, 50);
  4945. * activeSheet.setValue(3, 0, 40);
  4946. * activeSheet.setValue(4, 0, 80);
  4947. * activeSheet.setValue(5, 0, 1);
  4948. * activeSheet.setValue(6, 0, 65);
  4949. * activeSheet.setValue(7, 0, 20);
  4950. * activeSheet.setValue(8, 0, 30);
  4951. * activeSheet.setValue(9, 0, 35);
  4952. * var cellrange =new GC.Spread.Sheets.Range(0, 0, 5, 1);
  4953. * var hideRowFilter =new GC.Spread.Sheets.Filter.HideRowFilter(cellrange);
  4954. * activeSheet.rowFilter(hideRowFilter);
  4955. * activeSheet.bind(GC.Spread.Sheets.Events.RangeSorted, function (e, info) {
  4956. * alert("Col (" + info.col + ", " + info.ascending +")");
  4957. * });
  4958. */
  4959. static RangeSorted: string;
  4960. /**
  4961. * Occurs when a column is about to be automatically sorted.
  4962. * @name GC.Spread.Sheets.Worksheet#RangeSorting
  4963. * @event
  4964. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4965. * @param {string} sheetName The sheet's name.
  4966. * @param {number} col The index of the column to be automatically sorted.
  4967. * @param {boolean} ascending Whether the automatic sort is ascending.
  4968. * @param {boolean} cancel Whether the operation should be canceled.
  4969. * @param {GC.Spread.Sheets.Range} range The range of automatic sort.
  4970. * @param {Function} compareFunction The customize function to use when sorting, used when value sort. function (value1, value2) {return 0;}<br />
  4971. *
  4972. * @example
  4973. * //This example uses the RangeSorting event.
  4974. * activeSheet.setValue(0, 0, 10);
  4975. * activeSheet.setValue(1, 0, 100);
  4976. * activeSheet.setValue(2, 0, 50);
  4977. * activeSheet.setValue(3, 0, 40);
  4978. * activeSheet.setValue(4, 0, 80);
  4979. * activeSheet.setValue(5, 0, 1);
  4980. * activeSheet.setValue(6, 0, 65);
  4981. * activeSheet.setValue(7, 0, 20);
  4982. * activeSheet.setValue(8, 0, 30);
  4983. * activeSheet.setValue(9, 0, 35);
  4984. * var cellrange =new GC.Spread.Sheets.Range(0, 0, 10, 1);
  4985. * var hideRowFilter =new GC.Spread.Sheets.Filter.HideRowFilter(cellrange);
  4986. * activeSheet.rowFilter(hideRowFilter);
  4987. * activeSheet.bind(GC.Spread.Sheets.Events.RangeSorting, function (e, info) {
  4988. * alert("Col (" + info.col + ", " + info.ascending +")");
  4989. * info.compareFunction = (obj1, obj2)=>{return obj1.toString().localeCompare(obj2.toString())};
  4990. * });
  4991. */
  4992. static RangeSorting: string;
  4993. /**
  4994. * Occurs when a change is made to a row or range of rows in this sheet that may require the row or range of rows to be repainted.
  4995. * @name GC.Spread.Sheets.Worksheet#RowChanged
  4996. * @event
  4997. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  4998. * @param {string} sheetName The sheet's name.
  4999. * @param {number} row The row index.
  5000. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheetArea of the row.
  5001. * @param {string} propertyName The name of the row's property that has changed.
  5002. * @param {boolean} isUndo Whether this event is from a undo operation.
  5003. * @example
  5004. * //This example uses the RowChanged event.
  5005. * activeSheet.bind(GC.Spread.Sheets.Events.RowChanged, function (e, info) {
  5006. * alert("Row (" + info.row + ")");
  5007. * });
  5008. */
  5009. static RowChanged: string;
  5010. /**
  5011. * Occurs when before a change is made to a row or range of rows in this sheet that may require the row or range of rows to be repainted.
  5012. * @name GC.Spread.Sheets.Worksheet#RowChanging
  5013. * @event
  5014. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5015. * @param {string} sheetName The sheet's name.
  5016. * @param {number} row The row index.
  5017. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheetArea of the row.
  5018. * @param {string} propertyName The name of the row's property that has changed.
  5019. * @example
  5020. * //This example uses the RowChanging event.
  5021. * activeSheet.bind(GC.Spread.Sheets.Events.RowChanging, function (e, info) {
  5022. * alert("Row (" + info.row + ")");
  5023. * });
  5024. */
  5025. static RowChanging: string;
  5026. /**
  5027. * Occurs when the row height has changed.
  5028. * @name GC.Spread.Sheets.Worksheet#RowHeightChanged
  5029. * @event
  5030. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5031. * @param {string} sheetName The sheet's name.
  5032. * @param {Array} rowList The list of rows whose heights have changed.
  5033. * @param {boolean} header Whether the columns are column header columns.
  5034. * @example
  5035. * //This example uses the RowHeightChanged event.
  5036. * activeSheet.bind(GC.Spread.Sheets.Events.RowHeightChanged, function (e, info) {
  5037. * alert("Row List (" + info.rowList + ")");
  5038. * });
  5039. */
  5040. static RowHeightChanged: string;
  5041. /**
  5042. * Occurs when the row height is changing.
  5043. * @name GC.Spread.Sheets.Worksheet#RowHeightChanging
  5044. * @event
  5045. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5046. * @param {string} sheetName The sheet's name.
  5047. * @param {Array} rowList The list of rows whose heights are changing.
  5048. * @param {boolean} header Whether the columns are column header columns.
  5049. * @param {boolean} cancel A value that indicates whether the operation should be canceled.
  5050. * @example
  5051. * //This example uses the RowHeightChanging event.
  5052. * activeSheet.bind(GC.Spread.Sheets.Events.RowHeightChanging, function (e, info) {
  5053. * alert("Row List (" + info.rowList + ")");
  5054. * });
  5055. */
  5056. static RowHeightChanging: string;
  5057. /**
  5058. * Occurs when the selection of cells on the sheet has changed.
  5059. * @name GC.Spread.Sheets.Worksheet#SelectionChanged
  5060. * @event
  5061. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5062. * @param {string} sheetName The sheet's name.
  5063. * @param {Array.<GC.Spread.Sheets.Range>} oldSelections The old selection ranges.
  5064. * @param {Array.<GC.Spread.Sheets.Range>} newSelections The new selection ranges.
  5065. * @example
  5066. * //This example uses the SelectionChanged event.
  5067. * activeSheet.bind(GC.Spread.Sheets.Events.SelectionChanged, function (e, info) {
  5068. * alert("Name (" + info.sheetName + ")");
  5069. * });
  5070. */
  5071. static SelectionChanged: string;
  5072. /**
  5073. * Occurs when the selection of cells on the sheet is changing.
  5074. * @name GC.Spread.Sheets.Worksheet#SelectionChanging
  5075. * @event
  5076. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5077. * @param {string} sheetName The sheet's name.
  5078. * @param {Array.<GC.Spread.Sheets.Range>} oldSelections The old selection ranges.
  5079. * @param {Array.<GC.Spread.Sheets.Range>} newSelections The new selection ranges.
  5080. * @example
  5081. * //This example uses the SelectionChanging event.
  5082. * activeSheet.bind(GC.Spread.Sheets.Events.SelectionChanging, function (e, info) {
  5083. * //Use IE to see console
  5084. * console.log("Name (" + info.sheetName + ")");
  5085. * });
  5086. */
  5087. static SelectionChanging: string;
  5088. /**
  5089. * Occurs when any shape has changed.
  5090. * @name GC.Spread.Sheets.Worksheet#ShapeChanged
  5091. * @event
  5092. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5093. * @param {string} sheetName The sheet's name.
  5094. * @param {GC.Spread.Sheets.Shapes.Shape} shape The shape that triggered the event.
  5095. * @param {string} propertyName The name of the shape's property that has changed.
  5096. * @example
  5097. * //This example uses the ShapeChanged event.
  5098. * var shape1 = activeSheet.shapes.add("shape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 20, 20, 200, 200);
  5099. * activeSheet.bind(GC.Spread.Sheets.Events.ShapeChanged, function (e, info) {
  5100. * alert("changed");
  5101. * });
  5102. */
  5103. static ShapeChanged: string;
  5104. /**
  5105. * Occurs when the user has removed the shape.
  5106. * @name GC.Spread.Sheets.Worksheet#ShapeRemoved
  5107. * @event
  5108. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5109. * @param {string} sheetName The sheet's name.
  5110. * @param {GC.Spread.Sheets.Shapes.Shape} shape The shape has been removed.
  5111. * @example
  5112. * //This example uses the ShapeRemoved event.
  5113. * var shape = activeSheet.shapes.add("myShape", GC.Spread.Sheets.Shapes.AutoShapeType.diamond, 0, 90, 200, 200);
  5114. * activeSheet.bind(GC.Spread.Sheets.Events.ShapeRemoved, function (e, info) {
  5115. * alert(info.shape.name());
  5116. * });
  5117. */
  5118. static ShapeRemoved: string;
  5119. /**
  5120. * Occurs when the user is removing any shape.
  5121. * @name GC.Spread.Sheets.Worksheet#ShapeRemoving
  5122. * @event
  5123. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5124. * @param {string} sheetName The sheet's name.
  5125. * @param {GC.Spread.Sheets.Shapes.Shape} shape The shape is being removed.
  5126. * @param {boolean} cancel A value that indicates whether the operation should be canceled.
  5127. * @example
  5128. * //This example uses the ShapeRemoving event.
  5129. * var shape = sheet.shapes.add("myShape", GC.Spread.Sheets.Shapes.AutoShapeType.diamond, 0, 90, 200, 200);
  5130. * activeSheet.bind(GC.Spread.Sheets.Events.ShapeRemoving, function (e, info) {
  5131. * info.cancel = true;// the shape will not remove
  5132. * });
  5133. */
  5134. static ShapeRemoving: string;
  5135. /**
  5136. * Occurs when the selections of the shape have changed.
  5137. * @name GC.Spread.Sheets.Worksheet#ShapeSelectionChanged
  5138. * @event
  5139. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5140. * @param {string} sheetName The sheet's name.
  5141. * @param {GC.Spread.Sheets.Shapes.Shape} shape The shape that triggered the event.
  5142. * @example
  5143. * //This example uses the ShapeSelectionChanged event.
  5144. * var shape = sheet.shapes.add("myShape", GC.Spread.Sheets.Shapes.AutoShapeType.diamond, 0, 90, 200, 200);
  5145. * activeSheet.bind(GC.Spread.Sheets.Events.ShapeSelectionChanged, function (e, info) {
  5146. * console.log("event info: " + info);
  5147. * });
  5148. */
  5149. static ShapeSelectionChanged: string;
  5150. /**
  5151. * After sheet changed.
  5152. * @name GC.Spread.Sheets.Worksheet#SheetChanged
  5153. * @event
  5154. * @param {string} sheetName The sheet's name.
  5155. * @param {string} propertyName The specific operation name.
  5156. * @param {number} sheetIndex Change the sheet position.
  5157. * @param {boolean} oldValue: Sheet changes the value of the previous attribute(isVisible, isSelected...).
  5158. * @param {boolean} newValue: Sheet changes the value of the attribute(isVisible, isSelected...).
  5159. * @example
  5160. * //This example.
  5161. * spread.bind(GC.Spread.Sheets.Events.SheetChanged, function (sender, args) {
  5162. * var sheet = args.sheet;
  5163. * });
  5164. */
  5165. static SheetChanged: string;
  5166. /**
  5167. * Before sheet changed.
  5168. * @name GC.Spread.Sheets.Worksheet#SheetChanging
  5169. * @event
  5170. * @param {string} sheetName The sheet's name.
  5171. * @param {string} propertyName The specific operation name .
  5172. * @param {number} sheetIndex Change the sheet position.
  5173. * @param {boolean} oldValue: Sheet changes the value of the previous attribute(isVisible, isSelected...).
  5174. * @param {boolean} newValue: Sheet changes the value of the attribute(isVisible, isSelected...).
  5175. * @param {boolean} cancel Cancel the current operation.
  5176. * @example
  5177. * //This example.
  5178. * spread.bind(GC.Spread.Sheets.Events.SheetChanging, function (sender, args) {
  5179. * var sheetIndex = args.sheetIndex;
  5180. * args.cancel = true;
  5181. * });
  5182. */
  5183. static SheetChanging: string;
  5184. /**
  5185. * Occurs after the user drags and moves the sheet.
  5186. * @name GC.Spread.Sheets.Worksheet#SheetMoved
  5187. * @event
  5188. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5189. * @param {string} sheetName The sheet's name.
  5190. * @param {number} oldIndex The previous sheet index.
  5191. * @param {number} newIndex The new sheet index.
  5192. * @example
  5193. * //This example uses the SheetMoved event.
  5194. * window.onload = function(){
  5195. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3});
  5196. * var activeSheet = spread.getActiveSheet();
  5197. * spread.bind(GC.Spread.Sheets.Events.SheetMoving, function (e, data) {
  5198. * alert(data.sheetName + '\n' + 'oldIndex: ' + data.oldIndex + '\n' + 'newIndex: ' + data.newIndex + '\n' + 'cancel: ' + data.cancel);
  5199. * });
  5200. * spread.bind(GC.Spread.Sheets.Events.SheetMoved, function (e, data) {
  5201. * alert(data.sheetName + '\n' + 'oldIndex: ' + data.oldIndex + '\n' + 'newIndex: ' + data.newIndex);
  5202. * });
  5203. * }
  5204. */
  5205. static SheetMoved: string;
  5206. /**
  5207. * Occurs before the user drags and moves the sheet.
  5208. * @name GC.Spread.Sheets.Worksheet#SheetMoving
  5209. * @event
  5210. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5211. * @param {string} sheetName The sheet's name.
  5212. * @param {number} oldIndex The old sheet index.
  5213. * @param {number} newIndex A value that indicates the index will be moved to.
  5214. * @param {boolean} cancel A value that indicates whether the operation should be canceled.
  5215. * @example
  5216. * //This example uses the SheetMoving event.
  5217. * window.onload = function(){
  5218. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3});
  5219. * var activeSheet = spread.getActiveSheet();
  5220. * spread.bind(GC.Spread.Sheets.Events.SheetMoving, function (e, data) {
  5221. * alert(data.sheetName + '\n' + 'oldIndex: ' + data.oldIndex + '\n' + 'newIndex: ' + data.newIndex + '\n' + 'cancel: ' + data.cancel);
  5222. * });
  5223. * spread.bind(GC.Spread.Sheets.Events.SheetMoved, function (e, data) {
  5224. * alert(data.sheetName + '\n' + 'oldIndex: ' + data.oldIndex + '\n' + 'newIndex: ' + data.newIndex);
  5225. * });
  5226. * }
  5227. */
  5228. static SheetMoving: string;
  5229. /**
  5230. * Occurs when the user has changed the sheet name.
  5231. * @name GC.Spread.Sheets.Worksheet#SheetNameChanged
  5232. * @event
  5233. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5234. * @param {string} oldValue The sheet's old name.
  5235. * @param {string} newValue The sheet's new name.
  5236. * @example
  5237. * //This example uses the SheetNameChanged event.
  5238. * // Use IE to see the console log text
  5239. * spread.bind(GC.Spread.Sheets.Events.SheetNameChanging, function (sender, args) {
  5240. * console.log(args.oldValue);
  5241. * });
  5242. * spread.bind(GC.Spread.Sheets.Events.SheetNameChanged, function (sender, args) {
  5243. * console.log(args.newValue);
  5244. * });
  5245. */
  5246. static SheetNameChanged: string;
  5247. /**
  5248. * Occurs when the user is changing the sheet name.
  5249. * @name GC.Spread.Sheets.Worksheet#SheetNameChanging
  5250. * @event
  5251. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5252. * @param {string} oldValue The sheet's old name.
  5253. * @param {string} newValue The sheet's new name.
  5254. * @param {boolean} cancel A value that indicates whether the operation should be canceled.
  5255. * @example
  5256. * //This example uses the SheetNameChanging event.
  5257. * // Use IE to see the console log text
  5258. * spread.bind(GC.Spread.Sheets.Events.SheetNameChanging, function (sender, args) {
  5259. * console.log(args.oldValue);
  5260. * });
  5261. * spread.bind(GC.Spread.Sheets.Events.SheetNameChanged, function (sender, args) {
  5262. * console.log(args.newValue);
  5263. * });
  5264. */
  5265. static SheetNameChanging: string;
  5266. /**
  5267. * Occurs when the user clicks the sheet tab.
  5268. * @name GC.Spread.Sheets.Worksheet#SheetTabClick
  5269. * @event
  5270. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5271. * @param {string} sheetName The sheet's name.
  5272. * @param {number} sheetTabIndex The index of the sheet tab that the user clicked.
  5273. * @example
  5274. * //This example uses the SheetTabClick event.
  5275. * spread.bind(GC.Spread.Sheets.Events.SheetTabClick, function (e, info) {
  5276. * alert("Index (" + info.sheetTabIndex + ")");
  5277. * });
  5278. */
  5279. static SheetTabClick: string;
  5280. /**
  5281. * Occurs when the user double-clicks the sheet tab.
  5282. * @name GC.Spread.Sheets.Worksheet#SheetTabDoubleClick
  5283. * @event
  5284. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5285. * @param {string} sheetName The sheet's name.
  5286. * @param {number} sheetTabIndex The index of the sheet tab that the user double-clicked.
  5287. * @example
  5288. * //This example uses the SheetTabDoubleClick event.
  5289. * spread.bind(GC.Spread.Sheets.Events.SheetTabDoubleClick, function (e, info) {
  5290. * alert("Index (" + info.sheetTabIndex + ")");
  5291. * });
  5292. */
  5293. static SheetTabDoubleClick: string;
  5294. /**
  5295. * Occurs when any slicer has changed.
  5296. * @name GC.Spread.Sheets.Worksheet#SlicerChanged
  5297. * @event
  5298. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5299. * @param {string} sheetName The sheet's name.
  5300. * @param {GC.Spread.Sheets.Slicers.Slicer} slicer The slicer that triggered the event.
  5301. * @param {string} propertyName The name of the slicer's property that has changed.
  5302. * @example
  5303. * //This example uses the SlicerChanged event.
  5304. * //create a table
  5305. * datas = [
  5306. * ["1", "NewYork", "1968/6/8", "80", "180"],
  5307. * ["4", "NewYork", "1972/7/3", "72", "168"],
  5308. * ["4", "NewYork", "1964/3/2", "71", "179"],
  5309. * ["5", "Washington", "1972/8/8","80", "171"],
  5310. * ["6", "Washington", "1986/2/2", "89", "161"],
  5311. * ["7", "Washington", "2012/2/15", "71", "240"]];
  5312. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  5313. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  5314. * table.setColumnName(0, dataColumns[0]);
  5315. * table.setColumnName(1, dataColumns[1]);
  5316. * table.setColumnName(2, dataColumns[2]);
  5317. * table.setColumnName(3, dataColumns[3]);
  5318. * table.setColumnName(4, dataColumns[4]);
  5319. * //add a slicer to the sheet and return the slicer instance.
  5320. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
  5321. * //change the slicer properties.
  5322. * slicer.width(200);
  5323. * slicer.height(200);
  5324. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  5325. * slicer.style(GC.Spread.Sheets.Slicers.SlicerStyles.dark4());
  5326. * // Use IE to see the console log text
  5327. * activeSheet.bind(GC.Spread.Sheets.Events.SlicerChanged, function (e, info) {
  5328. * console.log("name: " + info.propertyName);
  5329. * });
  5330. */
  5331. static SlicerChanged: string;
  5332. /**
  5333. * Occurs when the sparkline has changed.
  5334. * @name GC.Spread.Sheets.Worksheet#SparklineChanged
  5335. * @event
  5336. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5337. * @param {string} sheetName The sheet's name.
  5338. * @param {GC.Spread.Sheets.Sparklines.Sparkline} sparkline The sparkline whose property has changed.
  5339. * @example
  5340. * //Removing the sparkline causes a change.
  5341. * var data = new GC.Spread.Sheets.Range(1, 0, 8, 1);
  5342. * var setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
  5343. * setting.options.showMarkers = true;
  5344. * setting.options.lineWeight = 3;
  5345. * setting.options.displayXAxis = true;
  5346. * setting.options.showFirst = true;
  5347. * setting.options.showLast = true;
  5348. * setting.options.showLow = true;
  5349. * setting.options.showHigh = true;
  5350. * setting.options.showNegative = true;
  5351. * setting.options.seriesColor = "Text 2 1";
  5352. * setting.options.firstMarkerColor = "Text 2 3";
  5353. * setting.options.negativeColor = "Accent 2 1";
  5354. * setting.options.markersColor = "Accent 3 1";
  5355. * setting.options.lowMarkerColor = "Accent 4 1";
  5356. * setting.options.highMarkerColor = "Accent 6 1";
  5357. * setting.options.lastMarkerColor = "Accent 6 6";
  5358. * setting.options.axisColor = "Text 1 1";
  5359. * activeSheet.addSpan(13, 0, 4, 3, null);
  5360. * activeSheet.setSparkline(13, 0, data, GC.Spread.Sheets.Sparklines.DataOrientation.vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
  5361. * activeSheet.setValue(1, 0, 1);
  5362. * activeSheet.setValue(2, 0, -2);
  5363. * activeSheet.setValue(3, 0, -1);
  5364. * activeSheet.setValue(4, 0, 6);
  5365. * activeSheet.setValue(5, 0, 4);
  5366. * activeSheet.setValue(6, 0, -4);
  5367. * activeSheet.setValue(7, 0, 3);
  5368. * activeSheet.setValue(8, 0, 8);
  5369. * // Use IE to see the console log text
  5370. * activeSheet.bind(GC.Spread.Sheets.Events.SparklineChanged, function (e, info) {
  5371. * console.log("name: " + info.sheetName);
  5372. * });
  5373. * $("#button1").click(function () {
  5374. * activeSheet.removeSparkline(13, 0);
  5375. * });
  5376. */
  5377. static SparklineChanged: string;
  5378. /**
  5379. * Occurs when the user insert/delete columns in table.
  5380. * @name GC.Spread.Sheets.Worksheet#TableColumnsChanged
  5381. * @event
  5382. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5383. * @param {Table} table The table which is insert/delete rows.
  5384. * @param {string} propertyName The operation name which trigger event.
  5385. * @param {number} col The index of the starting column to insert/delete based on table index.
  5386. * @param {number} count The number of columns to insert/delete.
  5387. * @param {boolean} isAfter Whether insert columns before the specified column index or after. By default is false, insert before.
  5388. * @example
  5389. * //This example uses the TableColumnsChanged event.
  5390. * window.onload = function(){
  5391. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
  5392. * var activeSheet = spread.getActiveSheet();
  5393. * spread.bind(GC.Spread.Sheets.Events.TableColumnsChanged, function (e, data) {});
  5394. * }
  5395. */
  5396. static TableColumnsChanged: string;
  5397. /**
  5398. * Occurs when a table column has just been clear filter.
  5399. * @name GC.Spread.Sheets.Worksheet#TableFilterCleared
  5400. * @event
  5401. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5402. * @param {string} sheetName The sheet's name.
  5403. * @param {GC.Spread.Sheets.Tables.Table} table The table column to be automatically filtered.
  5404. * @param {number} tableCol The index of the table column has just been clear filter.
  5405. * @example
  5406. * //This example uses the TableFilterCleared event.
  5407. * activeSheet.tables.add("Table1", 0, 0, 3, 3, GC.Spread.Sheets.Tables.TableTheme.dark1);
  5408. * activeSheet.getCell(0,0).text("Name");
  5409. * activeSheet.getCell(0,1).text("Value");
  5410. * activeSheet.getCell(0,2).text("T/F");
  5411. * activeSheet.getCell(1,0).text("AW");
  5412. * activeSheet.getCell(1,1).text("5");
  5413. * activeSheet.getCell(1,2).text("T");
  5414. * activeSheet.bind(GC.Spread.Sheets.Events.TableFilterCleared, function (e, info) {
  5415. * alert("Sheet (" + info.sheetName + ")");
  5416. * });
  5417. */
  5418. static TableFilterCleared: string;
  5419. /**
  5420. * Occurs when a table column is about to be automatically clear filter.
  5421. * @name GC.Spread.Sheets.Worksheet#TableFilterCleared
  5422. * @event
  5423. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5424. * @param {string} sheetName The sheet's name.
  5425. * @param {GC.Spread.Sheets.Tables.Table} table The table column to be automatically filtered.
  5426. * @param {number} tableCol The index of the table column to be automatically clear filter.
  5427. * @example
  5428. * //This example uses the TableFilterClearing event.
  5429. * activeSheet.tables.add("Table1", 0, 0, 3, 3, GC.Spread.Sheets.Tables.TableTheme.dark1);
  5430. * activeSheet.getCell(0,0).text("Name");
  5431. * activeSheet.getCell(0,1).text("Value");
  5432. * activeSheet.getCell(0,2).text("T/F");
  5433. * activeSheet.getCell(1,0).text("AW");
  5434. * activeSheet.getCell(1,1).text("5");
  5435. * activeSheet.getCell(1,2).text("T");
  5436. * activeSheet.bind(GC.Spread.Sheets.Events.TableFilterClearing, function (e, info) {
  5437. * alert("Sheet (" + info.sheetName + ")");
  5438. * });
  5439. */
  5440. static TableFilterClearing: string;
  5441. /**
  5442. * Occurs when a table column has just been automatically filtered.
  5443. * @name GC.Spread.Sheets.Worksheet#TableFiltered
  5444. * @event
  5445. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5446. * @param {string} sheetName The sheet's name.
  5447. * @param {GC.Spread.Sheets.Tables.Table} table The table column to be automatically filtered.
  5448. * @param {number} col The index of the table column to be automatically filtered.
  5449. * @param {Array} filterValues The values by which to filter the column.
  5450. * @param {Object} conditionInfo The condition rule info by which to filter the column.
  5451. * @example
  5452. * //This example uses the TableFiltered event.
  5453. * activeSheet.tables.add("Table1", 0, 0, 3, 3, GC.Spread.Sheets.Tables.TableTheme.dark1);
  5454. * activeSheet.getCell(0,0).text("Name");
  5455. * activeSheet.getCell(0,1).text("Value");
  5456. * activeSheet.getCell(0,2).text("T/F");
  5457. * activeSheet.getCell(1,0).text("AW");
  5458. * activeSheet.getCell(1,1).text("5");
  5459. * activeSheet.getCell(1,2).text("T");
  5460. * activeSheet.bind(GC.Spread.Sheets.Events.TableFiltered, function (e, info) {
  5461. * alert("Sheet (" + info.sheetName + ")");
  5462. * });
  5463. */
  5464. static TableFiltered: string;
  5465. /**
  5466. * Occurs when a table column is about to be automatically filtered.
  5467. * @name GC.Spread.Sheets.Worksheet#TableFiltering
  5468. * @event
  5469. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5470. * @param {string} sheetName The sheet's name.
  5471. * @param {GC.Spread.Sheets.Tables.Table} table The table column to be automatically filtered.
  5472. * @param {number} col The index of the table column to be automatically filtered.
  5473. * @param {Array} filterValues The values by which to filter the column.
  5474. * @param {Object} conditionInfo The condition rule info by which to filter the column.
  5475. * @example
  5476. * //This example uses the TableFiltering event.
  5477. * activeSheet.tables.add("Table1", 0, 0, 3, 3, GC.Spread.Sheets.Tables.TableTheme.dark1);
  5478. * activeSheet.getCell(0,0).text("Name");
  5479. * activeSheet.getCell(0,1).text("Value");
  5480. * activeSheet.getCell(0,2).text("T/F");
  5481. * activeSheet.getCell(1,0).text("AW");
  5482. * activeSheet.getCell(1,1).text("5");
  5483. * activeSheet.getCell(1,2).text("T");
  5484. * activeSheet.bind(GC.Spread.Sheets.Events.TableFiltering, function (e, info) {
  5485. * alert("Sheet (" + info.sheetName + ")");
  5486. * });
  5487. */
  5488. static TableFiltering: string;
  5489. /**
  5490. * Occurs after the user resized table.
  5491. * @name GC.Spread.Sheets.Worksheet#TableResized
  5492. * @event
  5493. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5494. * @param {Table} table The table which is resized.
  5495. * @param {GC.Spread.Sheets.Range} oldRange The table range before resize.
  5496. * @param {GC.Spread.Sheets.Range} newRange The table range after resize.
  5497. */
  5498. static TableResized: string;
  5499. /**
  5500. * Occurs when the user resizing table by resize handler.
  5501. * @name GC.Spread.Sheets.Worksheet#TableResizing
  5502. * @event
  5503. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5504. * @param {Table} table The table which is resizing.
  5505. * @param {GC.Spread.Sheets.Range} oldRange The table range before resize.
  5506. * @param {GC.Spread.Sheets.Range} newRange The table range after resize.
  5507. * @example
  5508. * //This example uses the TableResizing and TableResized event.
  5509. * window.onload = function(){
  5510. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
  5511. * var activeSheet = spread.getActiveSheet();
  5512. * spread.bind(GC.Spread.Sheets.Events.TableResizing, function (e, data) {});
  5513. * spread.bind(GC.Spread.Sheets.Events.TableResized, function (e, data) {});
  5514. * }
  5515. */
  5516. static TableResizing: string;
  5517. /**
  5518. * Occurs when the user insert/delete rows in table.
  5519. * @name GC.Spread.Sheets.Worksheet#TableRowsChanged
  5520. * @event
  5521. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5522. * @param {Table} table The table which is insert/delete rows.
  5523. * @param {string} propertyName The operation name which trigger event.
  5524. * @param {number} row The index of the starting row to insert/delete based on table index.
  5525. * @param {number} count The number of rows to insert/delete.
  5526. * @param {boolean} isAfter Whether insert rows before the specified row index or after. By default is false, insert before.
  5527. * @param {Array.<Object>} deletedItem The deleted rows collection in binding. The every item in array specifies deleted data item.
  5528. * @example
  5529. * //This example uses the TableRowsChanged event.
  5530. * window.onload = function(){
  5531. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
  5532. * var activeSheet = spread.getActiveSheet();
  5533. * spread.bind(GC.Spread.Sheets.Events.TableRowsChanged, function (e, data) {});
  5534. * }
  5535. */
  5536. static TableRowsChanged: string;
  5537. /**
  5538. * Occurs when the top row changes.
  5539. * @name GC.Spread.Sheets.Worksheet#TopRowChanged
  5540. * @event
  5541. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5542. * @param {string} sheetName The sheet's name.
  5543. * @param {number} oldTopRow The old top row index.
  5544. * @param {number} newTopRow The new top row index.
  5545. * @example
  5546. * //This example synchronizes vertical and horizontal scrolling for sheet 1 and sheet 2.
  5547. * var sheet1 = spread.getSheet(0),
  5548. * sheet2 = spread.getSheet(1);
  5549. * sheet1.bind(GC.Spread.Sheets.Events.TopRowChanged, function (sender, args) {
  5550. * //Set the displayed top row of sheet1 to sheet2 (vertical scroll synchronization).
  5551. * sheet2.showRow(args.newTopRow, GC.Spread.Sheets.VerticalPosition.top);
  5552. * });
  5553. * sheet1.bind(GC.Spread.Sheets.Events.LeftColumnChanged, function (sender, args) {
  5554. * //Set the displayed left column of sheet1 to sheet2 (Horizontal scroll synchronization).
  5555. * sheet2.showColumn(args.newLeftCol, GC.Spread.Sheets.HorizontalPosition.left);
  5556. * });
  5557. */
  5558. static TopRowChanged: string;
  5559. /**
  5560. * Occurs before the touch toolbar pops up.
  5561. * @name GC.Spread.Sheets.Worksheet#TouchToolStripOpening
  5562. * @event
  5563. * @param {number} x The <i>x</i>-coordinate of the horizontal position.
  5564. * @param {number} y The <i>y</i>-coordinate of the vertical position.
  5565. * @param {boolean} handled If <c>true</c>, the touch toolbar is prevented from popping up; otherwise, the toolbar is displayed at the default position.
  5566. * @example
  5567. * //This example uses the TouchToolStripOpening event.
  5568. * activeSheet.bind(GC.Spread.Sheets.Events.TouchToolStripOpening, function (e, info) {
  5569. * alert(info.x);
  5570. * });
  5571. */
  5572. static TouchToolStripOpening: string;
  5573. /**
  5574. * Occurs when the user types a formula.
  5575. * @name GC.Spread.Sheets.Worksheet#UserFormulaEntered
  5576. * @event
  5577. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5578. * @param {string} sheetName The sheet's name.
  5579. * @param {number} row The row index of the cell in which the user entered a formula.
  5580. * @param {number} col The column index of the cell in which the user entered a formula.
  5581. * @param {string} formula The formula that the user entered.
  5582. * @example
  5583. * //This example uses the UserFormulaEntered event.
  5584. * activeSheet.bind(GC.Spread.Sheets.Events.UserFormulaEntered, function (e, info) {
  5585. * alert("Formula (" + info.formula + ")");
  5586. * });
  5587. */
  5588. static UserFormulaEntered: string;
  5589. /**
  5590. * Occurs when the user zooms.
  5591. * @name GC.Spread.Sheets.Worksheet#UserZooming
  5592. * @event
  5593. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5594. * @param {string} sheetName The sheet's name.
  5595. * @param {number} oldZoomFactor The new zoom factor.
  5596. * @param {number} newZoomFactor The old zoom factor.
  5597. * @example
  5598. * //This example uses the UserZooming event.
  5599. * spread.options.allowUserZoom = true;
  5600. * activeSheet.bind(GC.Spread.Sheets.Events.UserZooming, function (e, info) {
  5601. * alert("Zoom (" + info.newZoomFactor + ")");
  5602. * });
  5603. */
  5604. static UserZooming: string;
  5605. /**
  5606. * Occurs when the applied cell value is invalid.
  5607. * @name GC.Spread.Sheets.Worksheet#ValidationError
  5608. * @event
  5609. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5610. * @param {string} sheetName The sheet's name.
  5611. * @param {number} row The cell's row index.
  5612. * @param {number} col The cell's column index.
  5613. * @param {GC.Spread.Sheets.DataValidation.DefaultDataValidator} validator The data validator that caused the error.
  5614. * @param {GC.Spread.Sheets.DataValidation.DataValidationResult} validationResult The policy that the user can set to determine how to process the error.
  5615. * @example
  5616. * //This example uses the ValidationError event.
  5617. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.cellValueCondition);
  5618. * nCondition.compareType(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.equalsTo);
  5619. * nCondition.expected(0);
  5620. * //When the option is false, the validation fails and the red alert is displayed.
  5621. * //When the option is true, the blank cell is treated as zero and the validation is successful.
  5622. * nCondition.treatNullValueAsZero(false);
  5623. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition)
  5624. * validator.ignoreBlank(false);
  5625. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.wholeNumber)
  5626. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  5627. * spread.options.highlightInvalidData = true;
  5628. * activeSheet.setValue(0, 0, null);
  5629. * //Type different values in cell (0,0). This event fires if the user types an invalid value.
  5630. * activeSheet.bind("ValidationError", vError);
  5631. * function vError(sender, args) {
  5632. * alert("error");
  5633. * }
  5634. */
  5635. static ValidationError: string;
  5636. /**
  5637. * Occurs when the value in the subeditor changes.
  5638. * @name GC.Spread.Sheets.Worksheet#ValueChanged
  5639. * @event
  5640. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet that triggered the event.
  5641. * @param {string} sheetName The sheet's name.
  5642. * @param {number} row The row index of the cell.
  5643. * @param {number} col The column index of the cell.
  5644. * @param {Object} oldValue The old value of the cell.
  5645. * @param {Object} newValue The new value of the cell.
  5646. * @example
  5647. * //This example uses the ValueChanged event.
  5648. * activeSheet.bind(GC.Spread.Sheets.Events.ValueChanged, function (e, info) {
  5649. * alert("Value (" + info.newValue + ")");
  5650. * });
  5651. */
  5652. static ValueChanged: string;
  5653. }
  5654. export class LineBorder{
  5655. /**
  5656. * Represents the line border for a border side.
  5657. * @class
  5658. * @param {string} [color] Indicates the border color and uses a format such as color name (for example, "red") or "#RGB", "#RRGGBB", "rgb(R,B,B)", "rgba(R,G,B,A)".
  5659. * @param {GC.Spread.Sheets.LineStyle} [style] Indicates the border line style.
  5660. * @example
  5661. * //This example creates a border.
  5662. * var border = new GC.Spread.Sheets.LineBorder
  5663. * border.color = "#7FFFD4";
  5664. * border.style = GC.Spread.Sheets.LineStyle.double;
  5665. * var cell = activeSheet.getCell(1, 1, GC.Spread.Sheets.SheetArea.viewport);
  5666. * cell.borderLeft(border);
  5667. */
  5668. constructor(color?: string, style?: GC.Spread.Sheets.LineStyle);
  5669. /**
  5670. * Indicates the color of the border line. Use a known color name or HEX style color value. The default value is black.
  5671. * @example
  5672. * //This example sets the color property.
  5673. * var border = new GC.Spread.Sheets.LineBorder
  5674. * border.color = "#7FFFD4";
  5675. * border.style = GC.Spread.Sheets.LineStyle.double;
  5676. * var cell = activeSheet.getCell(1, 1, GC.Spread.Sheets.SheetArea.viewport);
  5677. * cell.borderLeft(border);
  5678. */
  5679. color: string;
  5680. /**
  5681. * Indicates the line style of the border line. The default value is empty.
  5682. * @example
  5683. * //This example sets the style property.
  5684. * var border = new GC.Spread.Sheets.LineBorder
  5685. * border.color = "#7FFFD4";
  5686. * border.style = GC.Spread.Sheets.LineStyle.double;
  5687. * var cell = activeSheet.getCell(1, 1, GC.Spread.Sheets.SheetArea.viewport);
  5688. * cell.borderLeft(border);
  5689. */
  5690. style: GC.Spread.Sheets.LineStyle;
  5691. }
  5692. export class NameInfo{
  5693. /**
  5694. * Represents a custom named expression that can be used by formulas.
  5695. * @class
  5696. * @param {string} name The custom expression name.
  5697. * @param {GC.Spread.CalcEngine.Expression} expr The custom named expression.
  5698. * @param {number} row The base row of the expression.
  5699. * @param {number} column The base column of the expression.
  5700. * @param {string} [comment] The custom expression comment.
  5701. */
  5702. constructor(name: string, expr: GC.Spread.CalcEngine.Expression, row: number, column: number, comment?: string);
  5703. /**
  5704. * Gets the base column of the custom named expression.
  5705. * @returns {number} The base column.
  5706. */
  5707. getColumn(): number;
  5708. /**
  5709. * Gets the comment of the current NameInfo object.
  5710. * @returns {string} The name of the current NameInfo object.
  5711. */
  5712. getComment(): string;
  5713. /**
  5714. * Gets the expression.
  5715. * @returns {GC.Spread.CalcEngine.Expression} The expression.
  5716. */
  5717. getExpression(): GC.Spread.CalcEngine.Expression;
  5718. /**
  5719. * Gets the name of the current NameInfo object.
  5720. * @returns {string} The name of the current NameInfo object.
  5721. */
  5722. getName(): string;
  5723. /**
  5724. * Gets the base row of the custom named expression.
  5725. * @returns {number} The base row.
  5726. */
  5727. getRow(): number;
  5728. }
  5729. export class Point{
  5730. /**
  5731. * Represents an <i>x</i>- and <i>y</i>-coordinate pair in two-dimensional space.
  5732. * @class
  5733. * @param {number} x The <i>x</i>-coordinate.
  5734. * @param {number} y The <i>y</i>-coordinate.
  5735. * @example
  5736. * //This example creates a floating object.
  5737. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1");
  5738. * customFloatingObject.x(10);
  5739. * customFloatingObject.y(10);
  5740. * customFloatingObject.width(60);
  5741. * customFloatingObject.height(64);
  5742. * var btn = document.createElement('button');
  5743. * btn.style.width = "60px";
  5744. * btn.style.height = "30px";
  5745. * btn.innerText = "button";
  5746. * customFloatingObject.content(btn);
  5747. * activeSheet.floatingObjects.add(customFloatingObject);
  5748. */
  5749. constructor(x: number, y: number);
  5750. /**
  5751. * Clones a new point from the current point.
  5752. * @returns {GC.Spread.Sheets.Point} The cloned object.
  5753. */
  5754. clone(): GC.Spread.Sheets.Point;
  5755. }
  5756. export class Range{
  5757. /**
  5758. * Represents a range, which is described by the row index, column index, row count, and column count.
  5759. * @class
  5760. * @param {number} r The row index.
  5761. * @param {number} c The column index.
  5762. * @param {number} rc The row count.
  5763. * @param {number} cc The column count.
  5764. * @example
  5765. * var style = new GC.Spread.Sheets.Style();
  5766. * style.backColor = "red";
  5767. * var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  5768. * rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  5769. * rule.ranges([new GC.Spread.Sheets.Range(0,0,5,1)]);
  5770. * rule.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between);
  5771. * rule.style(style);
  5772. * rule.value1(2);
  5773. * rule.value2(100);
  5774. * activeSheet.conditionalFormats.addRule(rule);
  5775. * activeSheet.setValue(0,0,1,3);
  5776. * activeSheet.setValue(1,0,45,3);
  5777. */
  5778. constructor(r: number, c: number, rc: number, cc: number);
  5779. /**
  5780. * The column index.
  5781. * @example
  5782. * var cellrange = new GC.Spread.Sheets.Range();
  5783. * cellrange.col = 0;
  5784. * cellrange.row = 1;
  5785. * cellrange.colCount = 1;
  5786. * cellrange.rowCount = 8;
  5787. * activeSheet.setValue(1, 0, 1);
  5788. * activeSheet.setValue(2, 0, -2);
  5789. * activeSheet.setValue(3, 0, -1);
  5790. * activeSheet.setValue(4, 0, 6);
  5791. * activeSheet.setValue(5, 0, 4);
  5792. * activeSheet.setValue(6, 0, -4);
  5793. * activeSheet.setValue(7, 0, 3);
  5794. * activeSheet.setValue(8, 0, 8);
  5795. * var setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
  5796. * setting.options.showMarkers = true;
  5797. * activeSheet.setSparkline(13, 0, cellrange, GC.Spread.Sheets.Sparklines.DataOrientation.vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
  5798. */
  5799. col: number;
  5800. /**
  5801. * The column count.
  5802. * @example
  5803. * var cellrange = new GC.Spread.Sheets.Range();
  5804. * cellrange.col = 0;
  5805. * cellrange.row = 1;
  5806. * cellrange.colCount = 1;
  5807. * cellrange.rowCount = 8;
  5808. * activeSheet.setValue(1, 0, 1);
  5809. * activeSheet.setValue(2, 0, -2);
  5810. * activeSheet.setValue(3, 0, -1);
  5811. * activeSheet.setValue(4, 0, 6);
  5812. * activeSheet.setValue(5, 0, 4);
  5813. * activeSheet.setValue(6, 0, -4);
  5814. * activeSheet.setValue(7, 0, 3);
  5815. * activeSheet.setValue(8, 0, 8);
  5816. * var setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
  5817. * setting.options.showMarkers = true;
  5818. * activeSheet.setSparkline(13, 0, cellrange, GC.Spread.Sheets.Sparklines.DataOrientation.vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
  5819. */
  5820. colCount: number;
  5821. /**
  5822. * The row index.
  5823. * @example
  5824. * var cellrange = new GC.Spread.Sheets.Range();
  5825. * cellrange.col = 0;
  5826. * cellrange.row = 1;
  5827. * cellrange.colCount = 1;
  5828. * cellrange.rowCount = 8;
  5829. * activeSheet.setValue(1, 0, 1);
  5830. * activeSheet.setValue(2, 0, -2);
  5831. * activeSheet.setValue(3, 0, -1);
  5832. * activeSheet.setValue(4, 0, 6);
  5833. * activeSheet.setValue(5, 0, 4);
  5834. * activeSheet.setValue(6, 0, -4);
  5835. * activeSheet.setValue(7, 0, 3);
  5836. * activeSheet.setValue(8, 0, 8);
  5837. * var setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
  5838. * setting.options.showMarkers = true;
  5839. * activeSheet.setSparkline(13, 0, cellrange, GC.Spread.Sheets.Sparklines.DataOrientation.vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
  5840. */
  5841. row: number;
  5842. /**
  5843. * The row count.
  5844. * @example
  5845. * var cellrange = new GC.Spread.Sheets.Range();
  5846. * cellrange.col = 0;
  5847. * cellrange.row = 1;
  5848. * cellrange.colCount = 1;
  5849. * cellrange.rowCount = 8;
  5850. * activeSheet.setValue(1, 0, 1);
  5851. * activeSheet.setValue(2, 0, -2);
  5852. * activeSheet.setValue(3, 0, -1);
  5853. * activeSheet.setValue(4, 0, 6);
  5854. * activeSheet.setValue(5, 0, 4);
  5855. * activeSheet.setValue(6, 0, -4);
  5856. * activeSheet.setValue(7, 0, 3);
  5857. * activeSheet.setValue(8, 0, 8);
  5858. * var setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
  5859. * setting.options.showMarkers = true;
  5860. * activeSheet.setSparkline(13, 0, cellrange, GC.Spread.Sheets.Sparklines.DataOrientation.vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
  5861. */
  5862. rowCount: number;
  5863. /**
  5864. * Gets whether the current range contains the specified cell.
  5865. * @param {number} row The row index.
  5866. * @param {number} col The column index.
  5867. * @param {number} rowCount The row count.
  5868. * @param {number} colCount The column count.
  5869. * @returns {boolean} <c>true</c> if the range contains the cell; otherwise, <c>false</c>.
  5870. */
  5871. contains(row: number, col: number, rowCount: number, colCount: number): boolean;
  5872. /**
  5873. * Gets whether the current range contains the specified range.
  5874. * @param {GC.Spread.Sheets.Range} range The cell range.
  5875. * @returns {boolean} <c>true</c> if the current range contains the specified cell range; otherwise, <c>false</c>.
  5876. */
  5877. containsRange(range: GC.Spread.Sheets.Range): boolean;
  5878. /**
  5879. * Gets whether the current range is equal to the specified range.
  5880. * @param {GC.Spread.Sheets.Range} range The range to compare.
  5881. * @returns {boolean} <c>true</c> if the current range is equal to the specified range; otherwise, <c>false</c>.
  5882. */
  5883. equals(range: GC.Spread.Sheets.Range): boolean;
  5884. /**
  5885. * Gets the intersection of two cell ranges.
  5886. * @param {GC.Spread.Sheets.Range} range The cell range.
  5887. * @param {number} maxRowCount The maximum row count.
  5888. * @param {number} maxColumnCount The maximum column count.
  5889. * @returns {GC.Spread.Sheets.Range} Returns null if there is no intersection, or the cell range of the intersection.
  5890. */
  5891. getIntersect(range: GC.Spread.Sheets.Range, maxRowCount: number, maxColumnCount: number): GC.Spread.Sheets.Range;
  5892. /**
  5893. * Gets whether the current range intersects with the one specified by the row and column index and the row and column count.
  5894. * @param {number} row The row index.
  5895. * @param {number} col The column index.
  5896. * @param {number} rowCount The row count.
  5897. * @param {number} colCount The column count.
  5898. * @returns {boolean} <c>true</c> if the specified range intersects with the current range; otherwise <c>false</c>.
  5899. */
  5900. intersect(row: number, col: number, rowCount: number, colCount: number): boolean;
  5901. /**
  5902. * Offsets the location of the range by the specified coordinates.
  5903. * @param {number} x The offset along the <i>x</i>-axis.
  5904. * @param {number} y The offset along the <i>y</i>-axis.
  5905. * @returns {GC.Spread.Sheets.Range} The new location.
  5906. */
  5907. offset(x: number, y: number): GC.Spread.Sheets.Range;
  5908. /**
  5909. * Joins this range with the specified range as a union.
  5910. * @param {GC.Spread.Sheets.Range} range The target range.
  5911. * @returns {GC.Spread.Sheets.Range} Returns the union of the ranges.
  5912. */
  5913. union(range: GC.Spread.Sheets.Range): GC.Spread.Sheets.Range;
  5914. }
  5915. export class Rect{
  5916. /**
  5917. * Represents a rectangle with a special location, and its width and height in two-dimensional space.
  5918. * @class
  5919. * @param {number} x The <i>x</i>-coordinate of the top-left corner of the rectangle.
  5920. * @param {number} y The <i>y</i>-coordinate of the top-left corner of the rectangle.
  5921. * @param {number} w The width of the rectangle.
  5922. * @param {number} h The height of the rectangle.
  5923. */
  5924. constructor(x: number, y: number, w: number, h: number);
  5925. /**
  5926. * The width of the rectangle.
  5927. */
  5928. height: number;
  5929. /**
  5930. * The height of the rectangle.
  5931. */
  5932. width: number;
  5933. /**
  5934. * The <i>x</i>-coordinate of the top-left corner of the rectangle.
  5935. */
  5936. x: number;
  5937. /**
  5938. * The <i>y</i>-coordinate of the top-left corner of the rectangle.
  5939. */
  5940. y: number;
  5941. /**
  5942. * Indicates whether the rectangle contains the specified <i>x</i>-coordinate and <i>y</i>-coordinate.
  5943. * @param {number} x The <i>x</i>-coordinate of the point to check.
  5944. * @param {number} y The <i>y</i>-coordinate of the point to check.
  5945. * @returns {boolean} <c>true</c> if (x, y) is contained by the rectangle; otherwise, <c>false</c>.
  5946. */
  5947. contains(x: number, y: number): boolean;
  5948. /**
  5949. * Gets the rectangle that intersects with the current rectangle.
  5950. * @param {GC.Spread.Sheets.Rect} rect The rectangle.
  5951. * @returns {GC.Spread.Sheets.Rect} The intersecting rectangle. If the two rectangles do not intersect, returns null.
  5952. */
  5953. getIntersectRect(x: number, y: number, width: number, height: number): GC.Spread.Sheets.Rect;
  5954. /**
  5955. * Indicates whether the specified rectangle intersects with the current rectangle.
  5956. * @param {number} x The <i>x</i>-coordinate of the top-left corner of the rectangle.
  5957. * @param {number} y The <i>y</i>-coordinate of the top-left corner of the rectangle.
  5958. * @param {number} w The width of the rectangle.
  5959. * @param {number} h The height of the rectangle.
  5960. * @returns {boolean} <c>true</c> if the specified rectangle intersects with the current rectangle; otherwise, <c>false</c>.
  5961. */
  5962. intersect(x: number, y: number, width: number, height: number): boolean;
  5963. /**
  5964. * Indicates whether the specified rectangle intersects with the current rectangle.
  5965. * @param {GC.Spread.Sheets.Rect} rect The specified rectangle.
  5966. * @returns {boolean} <c>true</c> if the specified rectangle intersects with the current rectangle; otherwise, <c>false</c>.
  5967. */
  5968. intersectRect(rect: GC.Spread.Sheets.Rect): boolean;
  5969. }
  5970. export class Style{
  5971. /**
  5972. * Represents the style for a cell, row, and column.
  5973. * @class
  5974. * @param {string} backColor The background color.
  5975. * @param {string} foreColor The foreground color.
  5976. * @param {GC.Spread.Sheets.HorizontalAlign} hAlign The horizontal alignment.
  5977. * @param {GC.Spread.Sheets.VerticalAlign} vAlign The vertical alignment.
  5978. * @param {string} font The font.
  5979. * @param {string} themeFont The font theme.
  5980. * @param {string|GC.Spread.Formatter.GeneralFormatter} formatter The formatting object.
  5981. * @param {GC.Spread.Sheets.LineBorder} borderLeft The left border.
  5982. * @param {GC.Spread.Sheets.LineBorder} borderTop The top border.
  5983. * @param {GC.Spread.Sheets.LineBorder} borderRight The right border.
  5984. * @param {GC.Spread.Sheets.LineBorder} borderBottom The bottom border.
  5985. * @param {GC.Spread.Sheets.LineBorder} diagonalDown The diagonal with LeftTop to bottomRight.
  5986. * @param {GC.Spread.Sheets.LineBorder} diagonalUp The diagonal with topRight to bottomLeft.
  5987. * @param {boolean} locked Whether the cell, row, or column is locked.
  5988. * @param {number} textIndent The text indent amount.
  5989. * @param {boolean} wordWrap Whether words wrap within the cell or cells.
  5990. * @param {boolean} shrinkToFit Whether content shrinks to fit the cell or cells.
  5991. * @param {string} backgroundImage The background image to display.
  5992. * @param {GC.Spread.Sheets.CellTypes.Base} cellType The cell type.
  5993. * @param {GC.Spread.Sheets.ImageLayout} backgroundImageLayout The layout for the background image.
  5994. * @param {boolean} tabStop Whether the user can set focus to the cell using the Tab key.
  5995. * @param {GC.Spread.Sheets.TextDecorationType} textDecoration Specifies the decoration added to text.
  5996. * @param {GC.Spread.Sheets.ImeMode} imeMode Specifies the input method editor mode.
  5997. * @param {string} name Specifies the name.
  5998. * @param {string} parentName Specifies the name of the parent style.
  5999. * @param {string} watermark Specifies the watermark content.
  6000. * @param {string} cellPadding Specifies the cell padding.
  6001. * @param {Object} labelOptions Specifies the cell label options.
  6002. * @param {GC.Spread.Sheets.LabelAlignment} [labelOptions.alignment] The cell label position.
  6003. * @param {GC.Spread.Sheets.LabelVisibility} [labelOptions.visibility] The cell label visibility.
  6004. * @param {string} [labelOptions.font] The cell label font.
  6005. * @param {string} [labelOptions.foreColor] The cell label forecolor.
  6006. * @param {string} [labelOptions.margin] The cell label margin.
  6007. * @param {boolean} isVerticalText Whether to set the cell's text vertical.
  6008. * @param {number} textOrientation he cell text rotation angle.
  6009. * @example
  6010. * //This example uses a style with rules.
  6011. * activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
  6012. * var style = new GC.Spread.Sheets.Style();
  6013. * style.backColor = "red";
  6014. * style.foreColor = "black";
  6015. * var cell = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  6016. * cell.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  6017. * cell.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan);
  6018. * cell.value1(5);
  6019. * cell.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  6020. * cell.style(style);
  6021. * activeSheet.conditionalFormats.addRule(cell);
  6022. * var style1 = new GC.Spread.Sheets.Style();
  6023. * style1.foreColor = "red";
  6024. * var top = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  6025. * top.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.top10Rule);
  6026. * top.type(GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType.top);
  6027. * top.rank(3);
  6028. * top.style(style1);
  6029. * top.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  6030. * top.stopIfTrue(true);
  6031. * activeSheet.conditionalFormats.addRule(top);
  6032. * @example
  6033. * //This example creates and sets parameters for the style.
  6034. * sheet.setValue(0,0, 1,3);
  6035. * sheet.setValue(1,0, 50,3);
  6036. * sheet.setValue(2,0, 100,3);
  6037. * sheet.setValue(3,0, 2,3);
  6038. * sheet.setValue(4,0, 60,3);
  6039. * sheet.setValue(5,0, 90,3);
  6040. * sheet.setValue(6,0, 3,3);
  6041. * sheet.setValue(7,0, 40,3);
  6042. * sheet.setValue(8,0, 70,3);
  6043. * sheet.setValue(9,0, 5,3);
  6044. * sheet.setValue(10,0, 35,3);
  6045. * var style = new GC.Spread.Sheets.Style();
  6046. * style.backColor = "red";
  6047. * style.borderLeft =new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6048. * style.borderTop = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6049. * style.borderRight = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6050. * style.borderBottom = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6051. * sheet.conditionalFormats.addAverageRule(GC.Spread.Sheets.ConditionalFormatting.AverageConditionType.above, style, [new GC.Spread.Sheets.Range(0, 0, 10, 3)]);
  6052. */
  6053. constructor(backColor?: string, foreColor?: string, hAlign?: GC.Spread.Sheets.HorizontalAlign, vAlign?: GC.Spread.Sheets.VerticalAlign, font?: string, themeFont?: string, formatter?: string | GC.Spread.Formatter.GeneralFormatter, borderLeft?: GC.Spread.Sheets.LineBorder, borderTop?: GC.Spread.Sheets.LineBorder, borderRight?: GC.Spread.Sheets.LineBorder, borderBottom?: GC.Spread.Sheets.LineBorder, locked?: boolean, textIndent?: number, wordWrap?: boolean, shrinkToFit?: boolean, backgroundImage?: string, cellType?: GC.Spread.Sheets.CellTypes.Base, backgroundImageLayout?: GC.Spread.Sheets.ImageLayout, tabStop?: boolean, textDecoration?: GC.Spread.Sheets.TextDecorationType, imeMode?: GC.Spread.Sheets.ImeMode, name?: string, parentName?: string, watermark?: string, cellPadding?: string, labelOptions?: GC.Spread.Sheets.ILabelOptions, diagonalDown?: GC.Spread.Sheets.LineBorder, diagonalUp?: GC.Spread.Sheets.LineBorder, isVerticalText?: boolean, textOrientation?: number);
  6054. /**
  6055. * Indicates the background color.
  6056. * @type {string}
  6057. * @example
  6058. * //This example sets the style backColor property.
  6059. * activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
  6060. * var style = new GC.Spread.Sheets.Style();
  6061. * style.backColor = "red";
  6062. * style.foreColor = "black";
  6063. * var cell = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  6064. * cell.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  6065. * cell.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan);
  6066. * cell.value1(5);
  6067. * cell.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  6068. * cell.style(style);
  6069. * activeSheet.conditionalFormats.addRule(cell);
  6070. * var style1 = new GC.Spread.Sheets.Style();
  6071. * style1.foreColor = "red";
  6072. * var top = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  6073. * top.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.top10Rule);
  6074. * top.type(GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType.top);
  6075. * top.rank(3);
  6076. * top.style(style1);
  6077. * top.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  6078. * top.stopIfTrue(true);
  6079. * activeSheet.conditionalFormats.addRule(top);
  6080. */
  6081. backColor: string | undefined;
  6082. /**
  6083. * Indicates the background image.
  6084. * @type {string}
  6085. * @example
  6086. * //This example sets the backgroundImage property.
  6087. * var style = new GC.Spread.Sheets.Style();
  6088. * style.backColor = "lightgreen";
  6089. * style.backgroundImage = "./css/images/quarter1.png";
  6090. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6091. */
  6092. backgroundImage: string | undefined;
  6093. /**
  6094. * Indicates the background image layout.
  6095. * @type {GC.Spread.Sheets.ImageLayout}
  6096. * @example
  6097. * //This example sets the backgroundImageLayout property.
  6098. * var style = new GC.Spread.Sheets.Style();
  6099. * style.backColor = "lightgreen";
  6100. * style.backgroundImage = "./css/images/quarter1.png";
  6101. * style.backgroundImageLayout = GC.Spread.Sheets.ImageLayout.center;
  6102. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6103. */
  6104. backgroundImageLayout: GC.Spread.Sheets.ImageLayout | undefined;
  6105. /**
  6106. * Indicates the bottom border line.
  6107. * @type {GC.Spread.Sheets.LineBorder}
  6108. * @example
  6109. * //This example creates a border.
  6110. * var cellType = new GC.Spread.Sheets.CellTypes.Button();
  6111. * cellType.buttonBackColor("#FFFF00");
  6112. * cellType.text("this is a button");
  6113. * var style = new GC.Spread.Sheets.Style();
  6114. * style.backColor = "red";
  6115. * style.borderLeft =new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6116. * style.borderTop = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6117. * style.borderRight = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6118. * style.borderBottom = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6119. * style.cellType = cellType
  6120. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6121. */
  6122. borderBottom: GC.Spread.Sheets.LineBorder | undefined;
  6123. /**
  6124. * Indicates the left border line.
  6125. * @type {GC.Spread.Sheets.LineBorder}
  6126. * @example
  6127. * //This example creates a border.
  6128. * var cellType = new GC.Spread.Sheets.CellTypes.Button();
  6129. * cellType.buttonBackColor("#FFFF00");
  6130. * cellType.text("this is a button");
  6131. * var style = new GC.Spread.Sheets.Style();
  6132. * style.backColor = "red";
  6133. * style.borderLeft =new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6134. * style.borderTop = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6135. * style.borderRight = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6136. * style.borderBottom = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6137. * style.cellType = cellType
  6138. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6139. */
  6140. borderLeft: GC.Spread.Sheets.LineBorder | undefined;
  6141. /**
  6142. * Indicates the right border line.
  6143. * @type {GC.Spread.Sheets.LineBorder}
  6144. * @example
  6145. * //This example creates a border.
  6146. * var cellType = new GC.Spread.Sheets.CellTypes.Button();
  6147. * cellType.buttonBackColor("#FFFF00");
  6148. * cellType.text("this is a button");
  6149. * var style = new GC.Spread.Sheets.Style();
  6150. * style.backColor = "red";
  6151. * style.borderLeft =new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6152. * style.borderTop = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6153. * style.borderRight = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6154. * style.borderBottom = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6155. * style.cellType = cellType
  6156. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6157. */
  6158. borderRight: GC.Spread.Sheets.LineBorder | undefined;
  6159. /**
  6160. * Indicates the top border line.
  6161. * @type {GC.Spread.Sheets.LineBorder}
  6162. * @example
  6163. * //This example creates a border.
  6164. * var cellType = new GC.Spread.Sheets.CellTypes.Button();
  6165. * cellType.buttonBackColor("#FFFF00");
  6166. * cellType.text("this is a button");
  6167. * var style = new GC.Spread.Sheets.Style();
  6168. * style.backColor = "red";
  6169. * style.borderLeft =new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6170. * style.borderTop = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6171. * style.borderRight = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6172. * style.borderBottom = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6173. * style.cellType = cellType
  6174. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6175. */
  6176. borderTop: GC.Spread.Sheets.LineBorder | undefined;
  6177. /**
  6178. * Indicates the cellButtons of cell.
  6179. * @type {Object[]}
  6180. * @example
  6181. * leftButtonConfig1 = {
  6182. * caption: "left",
  6183. * enabled: true,
  6184. * visibility:GC.Spread.Sheets.ButtonVisibility.always,
  6185. * };
  6186. * rightButtonConfig1 = {
  6187. * caption: "left",
  6188. * enabled: true,
  6189. * visibility:GC.Spread.Sheets.ButtonVisibility.onSelected,
  6190. * };
  6191. * //create style
  6192. * var style = new GC.Spread.Sheets.Style();
  6193. * style.cellButtons=[
  6194. * leftButtonConfig1,
  6195. * rightButtonConfig1
  6196. * ];
  6197. * sheet.setStyle(0, 0, style);
  6198. */
  6199. cellButtons: GC.Spread.Sheets.ICellButton[] | undefined;
  6200. /**
  6201. * Indicates the cell padding.
  6202. * @type {string}
  6203. * @example
  6204. * //This example sets the cell padding for the watermark.
  6205. * var type = new GC.Spread.Sheets.Style();
  6206. * type.watermark = "User name";
  6207. * type.cellPadding = "20";
  6208. * type.labelOptions = {alignment:GC.Spread.Sheets.LabelAlignment.topLeft, visibility: GC.Spread.Sheets.LabelVisibility.visible};
  6209. * activeSheet.setStyle(0, 1, type);
  6210. * activeSheet.getRange(0, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).height(60);
  6211. * activeSheet.getRange(-1, 1, -1, 1).width(150);
  6212. * var combo = new GC.Spread.Sheets.CellTypes.ComboBox();
  6213. * combo.items([{ text: "Oranges", value: "11k" }, { text: "Apples", value: "15k" }, { text: "Grape", value: "100k" }]);
  6214. * combo.editorValueType(GC.Spread.Sheets.CellTypes.EditorValueType.text);
  6215. * activeSheet.setCellType(2, 1, combo, GC.Spread.Sheets.SheetArea.viewport);
  6216. * activeSheet.getCell(2, 1, GC.Spread.Sheets.SheetArea.viewport).watermark("ComboBox Cell Type").cellPadding('10 10 20 10');
  6217. * activeSheet.getCell(2, 1, GC.Spread.Sheets.SheetArea.viewport).labelOptions({alignment: GC.Spread.Sheets.LabelAlignment.bottomCenter, foreColor: 'yellowgreen', font: 'bold 15px Arial'});
  6218. * activeSheet.getRange(2, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).height(60);
  6219. */
  6220. cellPadding: string | undefined;
  6221. /**
  6222. * Indicates the cell type.
  6223. * @type {GC.Spread.Sheets.CellTypes.Base}
  6224. * @example
  6225. * //This example creates a style and applies it to a cell.
  6226. * var cellType = new GC.Spread.Sheets.CellTypes.Button();
  6227. * cellType.buttonBackColor("#FFFF00");
  6228. * cellType.text("this is a button");
  6229. * var style = new GC.Spread.Sheets.Style();
  6230. * style.backColor = "red";
  6231. * style.borderLeft =new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6232. * style.borderTop = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6233. * style.borderRight = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6234. * style.borderBottom = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6235. * style.cellType = cellType
  6236. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6237. */
  6238. cellType: GC.Spread.Sheets.CellTypes.Base | undefined;
  6239. /**
  6240. * Indicates the diagonalDown border line.
  6241. * @type {GC.Spread.Sheets.LineBorder}
  6242. * @example
  6243. * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).diagonalDown(new GC.Spread.Sheets.LineBorder("blue", GC.Spread.Sheets.LineStyle.mediumDashed));
  6244. */
  6245. diagonalDown: GC.Spread.Sheets.LineBorder | undefined;
  6246. /**
  6247. * Indicates the diagonalUp border line.
  6248. * @type {GC.Spread.Sheets.LineBorder}
  6249. * @example
  6250. * activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).diagonalUp(new GC.Spread.Sheets.LineBorder("blue", GC.Spread.Sheets.LineStyle.mediumDashed));
  6251. */
  6252. diagonalUp: GC.Spread.Sheets.LineBorder | undefined;
  6253. /**
  6254. * Indicates the dropdown type of cell.
  6255. * @type {Object[]}
  6256. * @example
  6257. * leftButtonConfig1 = {
  6258. * caption: "left",
  6259. * enabled: true,
  6260. * isLeft: true,
  6261. * visibility:GC.Spread.Sheets.ButtonVisibility.always,
  6262. * command: "opendropdown"
  6263. * }
  6264. * //create style
  6265. * var style = new GC.Spread.Sheets.Style();
  6266. * style.cellButtons=[
  6267. * leftButtonConfig1
  6268. * ];
  6269. * style.dropDowns= [{ type: "colorPicker" }];
  6270. * sheet.setStyle(0, 0, style);
  6271. */
  6272. dropDowns: GC.Spread.Sheets.IDropdown[] | undefined;
  6273. /**
  6274. * Indicates the font.
  6275. * @type {string}
  6276. * @example
  6277. * //This example sets the font property.
  6278. * var style = new GC.Spread.Sheets.Style();
  6279. * style.font = "8pt Arial";
  6280. * style.hAlign = GC.Spread.Sheets.HorizontalAlign.center;
  6281. * style.vAlign = GC.Spread.Sheets.VerticalAlign.center;
  6282. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6283. * activeSheet.getCell(1,1).value("B2");
  6284. */
  6285. font: string | undefined;
  6286. /**
  6287. * Indicates the foreground color.
  6288. * @type {string}
  6289. * @example
  6290. * //This example sets the foreColor property.
  6291. * activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
  6292. * var style = new GC.Spread.Sheets.Style();
  6293. * style.backColor = "red";
  6294. * style.foreColor = "black";
  6295. * var cell = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  6296. * cell.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  6297. * cell.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan);
  6298. * cell.value1(5);
  6299. * cell.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  6300. * cell.style(style);
  6301. * activeSheet.conditionalFormats.addRule(cell);
  6302. * var style1 = new GC.Spread.Sheets.Style();
  6303. * style1.foreColor = "red";
  6304. * var top = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  6305. * top.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.top10Rule);
  6306. * top.type(GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType.top);
  6307. * top.rank(3);
  6308. * top.style(style1);
  6309. * top.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  6310. * top.stopIfTrue(true);
  6311. * activeSheet.conditionalFormats.addRule(top);
  6312. */
  6313. foreColor: string | undefined;
  6314. /**
  6315. * Indicates the formatter.
  6316. * @type {string|GC.Spread.Formatter.GeneralFormatter}
  6317. * @example
  6318. * //This example uses the formatter property.
  6319. * var style = new GC.Spread.Sheets.Style();
  6320. * style.formatter = "0.000%";
  6321. * style.themeFont = "Body";
  6322. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6323. * activeSheet.getCell(1,1).value("11");
  6324. */
  6325. formatter: string | GC.Spread.Formatter.GeneralFormatter | undefined;
  6326. /**
  6327. * Indicates the horizontal alignment.
  6328. * @type {GC.Spread.Sheets.HorizontalAlign}
  6329. * @example
  6330. * //This example sets the hAlign property.
  6331. * var style = new GC.Spread.Sheets.Style();
  6332. * style.font = "8pt Arial";
  6333. * style.hAlign = GC.Spread.Sheets.HorizontalAlign.center;
  6334. * style.vAlign = GC.Spread.Sheets.VerticalAlign.center;
  6335. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6336. * activeSheet.getCell(1,1).value("B2");
  6337. */
  6338. hAlign: GC.Spread.Sheets.HorizontalAlign | undefined;
  6339. /**
  6340. * Indicates the Input Method Editor (IME) mode.
  6341. * @type {GC.Spread.Sheets.ImeMode}
  6342. * @example
  6343. * //This example sets the IME mode.
  6344. * var style = new GC.Spread.Sheets.Style();
  6345. * style.imeMode = GC.Spread.Sheets.ImeMode.auto;
  6346. * activeSheet.setStyle(0, 0, style);
  6347. */
  6348. imeMode: GC.Spread.Sheets.ImeMode | undefined;
  6349. /**
  6350. * Indicates whether to set the text vertical.
  6351. * @type {boolean}
  6352. * @example
  6353. * //This example uses the rotate property.
  6354. * var style = new GC.Spread.Sheets.Style();
  6355. * style.isVerticalText = true;
  6356. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6357. */
  6358. isVerticalText: boolean | undefined;
  6359. /**
  6360. * Indicates the cell label options.
  6361. * @property {GC.Spread.Sheets.LabelAlignment} [alignment] - The cell label position.
  6362. * @property {GC.Spread.Sheets.LabelVisibility} [visibility] - The cell label visibility.
  6363. * @property {string} [font] - The cell label font.
  6364. * @property {string} [foreColor] - The cell label forecolor.
  6365. * @property {string} [margin] - The cell label margin.
  6366. * @type {Object}
  6367. * @example
  6368. * //This example sets label options for the watermark.
  6369. * var type = new GC.Spread.Sheets.Style();
  6370. * type.watermark = "User name";
  6371. * type.cellPadding = "20";
  6372. * type.labelOptions = {alignment:GC.Spread.Sheets.LabelAlignment.topLeft, visibility: GC.Spread.Sheets.LabelVisibility.visible};
  6373. * activeSheet.setStyle(0, 1, type);
  6374. * activeSheet.getRange(0, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).height(60);
  6375. * activeSheet.getRange(-1, 1, -1, 1).width(150);
  6376. * var combo = new GC.Spread.Sheets.CellTypes.ComboBox();
  6377. * combo.items([{ text: "Oranges", value: "11k" }, { text: "Apples", value: "15k" }, { text: "Grape", value: "100k" }]);
  6378. * combo.editorValueType(GC.Spread.Sheets.CellTypes.EditorValueType.text);
  6379. * activeSheet.setCellType(2, 1, combo, GC.Spread.Sheets.SheetArea.viewport);
  6380. * activeSheet.getCell(2, 1, GC.Spread.Sheets.SheetArea.viewport).watermark("ComboBox Cell Type").cellPadding('10 10 20 10');
  6381. * activeSheet.getCell(2, 1, GC.Spread.Sheets.SheetArea.viewport).labelOptions({alignment: GC.Spread.Sheets.LabelAlignment.bottomCenter, foreColor: 'yellowgreen', font: 'bold 15px Arial'});
  6382. * activeSheet.getRange(2, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).height(60);
  6383. */
  6384. labelOptions: GC.Spread.Sheets.ILabelOptions | undefined;
  6385. /**
  6386. * Indicates whether a cell is marked as locked from editing.
  6387. * @type {boolean}
  6388. * @example
  6389. * //This example unlocks a single cell.
  6390. * activeSheet.options.isProtected = true;
  6391. * var style = new GC.Spread.Sheets.Style();
  6392. * style.backColor = "red";
  6393. * style.borderLeft =new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6394. * style.borderTop = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6395. * style.borderRight = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6396. * style.borderBottom = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  6397. * style.locked = false;
  6398. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6399. */
  6400. locked: boolean | undefined;
  6401. /**
  6402. * Indicates the name.
  6403. * @type {string}
  6404. * @example
  6405. * //This example sets the style name.
  6406. * var namedStyle = new GC.Spread.Sheets.Style();
  6407. * namedStyle.name = "style1";
  6408. * namedStyle.backColor = "green";
  6409. * activeSheet.addNamedStyle(namedStyle);
  6410. * activeSheet.setStyleName(1, 1, "style1"); // cell(1,1)'s backColor is green.
  6411. * var namedStyle1 = new GC.Spread.Sheets.Style();
  6412. * namedStyle1.name = "style2";
  6413. * namedStyle1.parentName = "style1";
  6414. * namedStyle1.foreColor = "red"; // the namedStyle's foreColor is red.
  6415. * activeSheet.addNamedStyle(namedStyle1);
  6416. * activeSheet.setStyleName(2, 1, "style2");
  6417. */
  6418. name: string | undefined;
  6419. /**
  6420. * Indicates the name of the parent style.
  6421. * @type {string}
  6422. * @example
  6423. * //This example sets the parent name.
  6424. * var namedStyle = new GC.Spread.Sheets.Style();
  6425. * namedStyle.name = "style1";
  6426. * namedStyle.backColor = "green";
  6427. * activeSheet.addNamedStyle(namedStyle);
  6428. * activeSheet.setStyleName(1, 1, "style1"); // cell(1,1)'s backColor is green.
  6429. * var namedStyle1 = new GC.Spread.Sheets.Style();
  6430. * namedStyle1.name = "style2";
  6431. * namedStyle1.parentName = "style1";
  6432. * namedStyle1.foreColor = "red"; // the namedStyle's foreColor is red.
  6433. * activeSheet.addNamedStyle(namedStyle1);
  6434. * activeSheet.setStyleName(2, 1, "style2");
  6435. */
  6436. parentName: string | undefined;
  6437. /**
  6438. * Controls whether the Text out of bounds shows ellipsis.
  6439. * @type {boolean}
  6440. * @example
  6441. * //This example sets the showEllipsis property.
  6442. * var style = new GC.Spread.Sheets.Style();
  6443. * style.showEllipsis = true;
  6444. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6445. * activeSheet.getCell(1,1).text("TestTestTestTest");
  6446. */
  6447. showEllipsis: boolean | undefined;
  6448. /**
  6449. * Indicates whether to shrink to fit.
  6450. * @type {boolean}
  6451. * @example
  6452. * //This example sets the shrinkToFit property.
  6453. * var style = new GC.Spread.Sheets.Style();
  6454. * style.shrinkToFit = true;
  6455. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6456. * activeSheet.getCell(1,1).text("Shrink To Fit");
  6457. */
  6458. shrinkToFit: boolean | undefined;
  6459. /**
  6460. * Indicates whether the user can set focus to the cell using the Tab key.
  6461. * @type {boolean}
  6462. * @example
  6463. * //This example sets the tabStop property.
  6464. * var style = new GC.Spread.Sheets.Style();
  6465. * style.tabStop = false;
  6466. * style.backColor = "lightgreen";
  6467. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6468. */
  6469. tabStop: boolean | undefined;
  6470. /**
  6471. * Indicates the decoration added to text.
  6472. * @type {GC.Spread.Sheets.TextDecorationType}
  6473. * @example
  6474. * //This example uses the textDecoration property.
  6475. * activeSheet.getCell(0, 0).textDecoration(GC.Spread.Sheets.TextDecorationType.underline);
  6476. * activeSheet.getRange(1, -1, 1, -1).textDecoration(GC.Spread.Sheets.TextDecorationType.overline | GC.Spread.Sheets.TextDecorationType.underline);
  6477. * activeSheet.getRange(-1, 1, -1, 1).textDecoration(GC.Spread.Sheets.TextDecorationType.overline | GC.Spread.Sheets.TextDecorationType.lineThrough | GC.Spread.Sheets.TextDecorationType.underline);
  6478. * var style = new GC.Spread.Sheets.Style();
  6479. * style.textDecoration = GC.Spread.Sheets.TextDecorationType.overline | GC.Spread.Sheets.TextDecorationType.underline;
  6480. * activeSheet.setStyle(1, 1, style, GC.Spread.Sheets.SheetArea.viewport);
  6481. * activeSheet.getCell(0, 0).value("Test");
  6482. * activeSheet.getCell(1, 0).value("Test");
  6483. * activeSheet.getCell(0, 1).value("Test");
  6484. */
  6485. textDecoration: GC.Spread.Sheets.TextDecorationType | undefined;
  6486. /**
  6487. * Indicates the number of units of indentation for text in a cell, an integer value, where an increment of 1 represents 8 pixels.
  6488. * @type {number}
  6489. * @example
  6490. * //This example sets the textIndent property.
  6491. * var style = new GC.Spread.Sheets.Style();
  6492. * style.textIndent = 3;
  6493. * // Enter multiple lines with Alt+Enter
  6494. * style.wordWrap = true;
  6495. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6496. * activeSheet.getCell(1,1).text("Test");
  6497. */
  6498. textIndent: number | undefined;
  6499. /**
  6500. * Indicates the text rotation angle of cell.
  6501. * @type {number}
  6502. * @example
  6503. * //This example sets the textOrientation property.
  6504. * var style = new GC.Spread.Sheets.Style();
  6505. * style.textOrientation = 66;
  6506. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6507. * activeSheet.getCell(1,1).text("TestTestTestTest");
  6508. */
  6509. textOrientation: number | undefined;
  6510. /**
  6511. * Indicates the font theme.
  6512. * @type {string}
  6513. * @example
  6514. * //This example uses the themeFont property.
  6515. * var style = new GC.Spread.Sheets.Style();
  6516. * style.formatter = "0.000%";
  6517. * style.themeFont = "Body";
  6518. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6519. * activeSheet.getCell(1,1).value("11");
  6520. */
  6521. themeFont: string | undefined;
  6522. /**
  6523. * Indicates the vertical alignment.
  6524. * @type {GC.Spread.Sheets.VerticalAlign}
  6525. * @example
  6526. * //This example sets the vAlign property.
  6527. * var style = new GC.Spread.Sheets.Style();
  6528. * style.font = "8pt Arial";
  6529. * style.hAlign = GC.Spread.Sheets.HorizontalAlign.center;
  6530. * style.vAlign = GC.Spread.Sheets.VerticalAlign.center;
  6531. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6532. * activeSheet.getCell(1,1).value("B2");
  6533. */
  6534. vAlign: GC.Spread.Sheets.VerticalAlign | undefined;
  6535. /**
  6536. * Indicates the watermark content.
  6537. * @type {string}
  6538. * @example
  6539. * //The following examples add watermarks to cells, columns, and rows.
  6540. * var type = new GC.Spread.Sheets.Style();
  6541. * type.watermark = "User name";
  6542. * sheet.setStyle(0, 1, type);
  6543. * var type = new GC.Spread.Sheets.Style();
  6544. * type.watermark = "Password";
  6545. * sheet.setStyle(1, 1, type);
  6546. * @example
  6547. * var type = new GC.Spread.Sheets.Style();
  6548. * type.watermark = "The watermark.";
  6549. * activeSheet.setStyle(-1, 1, type);
  6550. * activeSheet.setStyle(1, -1, type);
  6551. * activeSheet.setStyle(2, 2, type);
  6552. */
  6553. watermark: string | undefined;
  6554. /**
  6555. * Indicates whether to wrap text.
  6556. * @type {boolean}
  6557. * @example
  6558. * //This example sets the wordWrap property.
  6559. * var style = new GC.Spread.Sheets.Style();
  6560. * style.textIndent = 3;
  6561. * // Enter multiple lines with Alt+Enter
  6562. * style.wordWrap = true;
  6563. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  6564. * activeSheet.getCell(1,1).text("Test");
  6565. */
  6566. wordWrap: boolean | undefined;
  6567. /**
  6568. * Clones the current style.
  6569. * @returns {GC.Spread.Sheets.Style} The cloned style.
  6570. */
  6571. clone(): GC.Spread.Sheets.Style;
  6572. }
  6573. export class Theme{
  6574. /**
  6575. * Represents a color scheme.
  6576. * @class
  6577. * @param {string} name The name of the theme.
  6578. * @param {GC.Spread.Sheets.ColorScheme} colorScheme The base colors of the theme color.
  6579. * @param {string} headerFont The name of the heading font.
  6580. * @param {string} bodyFont The name of the body font.
  6581. * @example
  6582. * //This example creates a new SpreadTheme object.
  6583. * sheet.getCell(0, 0).backColor("accent 1");
  6584. * sheet.getCell(1, 0).backColor("accent 6");
  6585. * $("#btn").click(function () {
  6586. * var custom = new GC.Spread.Sheets.Theme("Custom");
  6587. * custom.colors().accent1("red");
  6588. * custom.colors().accent6("green");
  6589. * sheet.currentTheme(custom);
  6590. * })
  6591. */
  6592. constructor(name: string, colorScheme: ColorScheme, headerFont: string, bodyFont: string);
  6593. /**
  6594. * Gets or sets the body font of the theme.
  6595. * @param {string} value The body font.
  6596. * @returns {string|GC.Spread.Sheets.Theme} If no value is set, returns the body font; otherwise, returns the theme.
  6597. */
  6598. bodyFont(value?: string): any;
  6599. /**
  6600. * Gets or sets the base colors of the theme.
  6601. * @param {GC.Spread.Sheets.ColorScheme} value The base colors of the theme.
  6602. * @returns {GC.Spread.Sheets.ColorScheme|GC.Spread.Sheets.Theme} If no value is set, returns the base colors of the theme; otherwise, returns the theme.
  6603. */
  6604. colors(value?: GC.Spread.Sheets.ColorScheme): any;
  6605. /**
  6606. * Gets or sets the heading font of the theme.
  6607. * @param {string} value The heading font.
  6608. * @returns {string|GC.Spread.Sheets.Theme} If no value is set, returns the heading font; otherwise, returns the theme.
  6609. */
  6610. headerFont(value?: string): any;
  6611. /**
  6612. * Gets or sets the name of the theme.
  6613. * @param {string} value The theme name.
  6614. * @returns {string|GC.Spread.Sheets.Theme} If no value is set, returns the theme name; otherwise, returns the theme.
  6615. */
  6616. name(value?: string): any;
  6617. }
  6618. export class ThemeColors{
  6619. /**
  6620. * Represents the theme color of built-in themes.
  6621. * @class
  6622. * @example
  6623. * //This example creates a custom theme.
  6624. * var custom = new GC.Spread.Sheets.Theme("CustomTheme");
  6625. * custom.colors().accent1("red");
  6626. * custom.colors().accent6("green");
  6627. * custom.colors().textColor1("orange");
  6628. * activeSheet.currentTheme(custom);
  6629. * activeSheet.getCell(0, 0).backColor("accent 1");
  6630. * activeSheet.getCell(1, 0).backColor("accent 1 30");
  6631. */
  6632. constructor();
  6633. /**
  6634. * The theme color of the Apex theme.
  6635. * @example
  6636. * //This example uses the Apex theme.
  6637. * activeSheet.currentTheme("Apex");
  6638. * activeSheet.resumePaint();
  6639. * activeSheet.repaint();
  6640. */
  6641. Apex: ColorScheme;
  6642. /**
  6643. * The theme color of the Aspect theme.
  6644. * @example
  6645. * //This example uses the Aspect theme.
  6646. * activeSheet.currentTheme("Aspect");
  6647. * activeSheet.resumePaint();
  6648. * activeSheet.repaint();
  6649. */
  6650. Aspect: ColorScheme;
  6651. /**
  6652. * The theme color of the Civic theme.
  6653. * @example
  6654. * //This example uses the Civic theme.
  6655. * activeSheet.currentTheme("Civic");
  6656. * activeSheet.resumePaint();
  6657. * activeSheet.repaint();
  6658. */
  6659. Civic: ColorScheme;
  6660. /**
  6661. * The theme color of the Concourse theme.
  6662. * @example
  6663. * //This example uses the Concourse theme.
  6664. * activeSheet.currentTheme("Concourse");
  6665. * activeSheet.resumePaint();
  6666. * activeSheet.repaint();
  6667. */
  6668. Concourse: ColorScheme;
  6669. /**
  6670. * The theme color of the Default theme.
  6671. * @example
  6672. * //This example sets the Default theme.
  6673. * activeSheet.currentTheme("Default");
  6674. * activeSheet.resumePaint();
  6675. * activeSheet.repaint();
  6676. */
  6677. Default: ColorScheme;
  6678. /**
  6679. * The theme color of the Equity theme.
  6680. * @example
  6681. * //This example sets the Equity theme.
  6682. * activeSheet.currentTheme("Equity");
  6683. * activeSheet.resumePaint();
  6684. * activeSheet.repaint();
  6685. */
  6686. Equity: ColorScheme;
  6687. /**
  6688. * The theme color of the Flow theme.
  6689. * @example
  6690. * //This example sets the Flow theme.
  6691. * activeSheet.currentTheme("Flow");
  6692. * activeSheet.resumePaint();
  6693. * activeSheet.repaint();
  6694. */
  6695. Flow: ColorScheme;
  6696. /**
  6697. * The theme color of the Foundry theme.
  6698. * @example
  6699. * //This example sets the Foundry theme.
  6700. * activeSheet.currentTheme("Foundry");
  6701. * activeSheet.resumePaint();
  6702. * activeSheet.repaint();
  6703. */
  6704. Foundry: ColorScheme;
  6705. /**
  6706. * The theme color of the Median theme.
  6707. * @example
  6708. * //This example sets the Median theme.
  6709. * activeSheet.currentTheme("Median");
  6710. * activeSheet.resumePaint();
  6711. * activeSheet.repaint();
  6712. */
  6713. Median: ColorScheme;
  6714. /**
  6715. * The theme color of the Metro theme.
  6716. * @example
  6717. * //This example sets the Metro theme.
  6718. * activeSheet.currentTheme("Metro");
  6719. * activeSheet.resumePaint();
  6720. * activeSheet.repaint();
  6721. */
  6722. Metro: ColorScheme;
  6723. /**
  6724. * The theme color of the Module theme.
  6725. * @example
  6726. * //This example sets the Module theme.
  6727. * activeSheet.currentTheme("Module");
  6728. * activeSheet.resumePaint();
  6729. * activeSheet.repaint();
  6730. */
  6731. Module: ColorScheme;
  6732. /**
  6733. * The theme color of the Office theme.
  6734. * @example
  6735. * //This example sets the Office theme.
  6736. * activeSheet.currentTheme("Office");
  6737. * activeSheet.resumePaint();
  6738. * activeSheet.repaint();
  6739. */
  6740. Office: ColorScheme;
  6741. /**
  6742. * The theme color of the Office 2007 theme.
  6743. * @example
  6744. * //This example uses the Office2007 theme.
  6745. * activeSheet.currentTheme("Office2007");
  6746. * activeSheet.resumePaint();
  6747. * activeSheet.repaint();
  6748. */
  6749. Office2007: ColorScheme;
  6750. /**
  6751. * The theme color of the Opulent theme.
  6752. * @example
  6753. * //This example sets the Opulent theme.
  6754. * activeSheet.currentTheme("Opulent");
  6755. * activeSheet.resumePaint();
  6756. * activeSheet.repaint();
  6757. */
  6758. Opulent: ColorScheme;
  6759. /**
  6760. * The theme color of the Oriel theme.
  6761. * @example
  6762. * //This example sets the Oriel theme.
  6763. * activeSheet.currentTheme("Oriel");
  6764. * activeSheet.resumePaint();
  6765. * activeSheet.repaint();
  6766. */
  6767. Oriel: ColorScheme;
  6768. /**
  6769. * The theme color of the Origin theme.
  6770. * @example
  6771. * //This example sets the Origin theme.
  6772. * activeSheet.currentTheme("Origin");
  6773. * activeSheet.resumePaint();
  6774. * activeSheet.repaint();
  6775. */
  6776. Origin: ColorScheme;
  6777. /**
  6778. * The theme color of the Paper theme.
  6779. * @example
  6780. * //This example sets the Paper theme.
  6781. * activeSheet.currentTheme("Paper");
  6782. * activeSheet.resumePaint();
  6783. * activeSheet.repaint();
  6784. */
  6785. Paper: ColorScheme;
  6786. /**
  6787. * The theme color of the Solstice theme.
  6788. * @example
  6789. * //This example sets the Solstice theme.
  6790. * activeSheet.currentTheme("Solstice");
  6791. * activeSheet.resumePaint();
  6792. * activeSheet.repaint();
  6793. */
  6794. Solstice: ColorScheme;
  6795. /**
  6796. * The theme color of the Technic theme.
  6797. * @example
  6798. * //This example sets the Technic theme.
  6799. * activeSheet.currentTheme("Technic");
  6800. * activeSheet.resumePaint();
  6801. * activeSheet.repaint();
  6802. */
  6803. Technic: ColorScheme;
  6804. /**
  6805. * The theme color of the Trek theme.
  6806. * @example
  6807. * //This example sets the Trek theme.
  6808. * activeSheet.currentTheme("Trek");
  6809. * activeSheet.resumePaint();
  6810. * activeSheet.repaint();
  6811. */
  6812. Trek: ColorScheme;
  6813. /**
  6814. * The theme color of the Urban theme.
  6815. * @example
  6816. * //This example sets the Urban theme.
  6817. * activeSheet.currentTheme("Urban");
  6818. * activeSheet.resumePaint();
  6819. * activeSheet.repaint();
  6820. */
  6821. Urban: ColorScheme;
  6822. /**
  6823. * The theme color of the Verve theme.
  6824. * @example
  6825. * //This example sets the Verve theme.
  6826. * activeSheet.currentTheme("Verve");
  6827. * activeSheet.resumePaint();
  6828. * activeSheet.repaint();
  6829. */
  6830. Verve: ColorScheme;
  6831. }
  6832. export class Themes{
  6833. /**
  6834. * Represents all built-in themes.
  6835. * @class
  6836. */
  6837. constructor();
  6838. /**
  6839. * Indicates the Apex theme.
  6840. */
  6841. Apex: Theme;
  6842. /**
  6843. * Indicates the Aspect theme.
  6844. */
  6845. Aspect: Theme;
  6846. /**
  6847. * Indicates the Civic theme.
  6848. */
  6849. Civic: Theme;
  6850. /**
  6851. * Indicates the Concourse theme.
  6852. */
  6853. Concourse: Theme;
  6854. /**
  6855. * Indicates the Default theme.
  6856. */
  6857. Default: Theme;
  6858. /**
  6859. * Indicates the Equity theme.
  6860. */
  6861. Equity: Theme;
  6862. /**
  6863. * Indicates the Flow theme.
  6864. */
  6865. Flow: Theme;
  6866. /**
  6867. * Indicates the Foundry theme.
  6868. */
  6869. Foundry: Theme;
  6870. /**
  6871. * Indicates the Median theme.
  6872. */
  6873. Median: Theme;
  6874. /**
  6875. * Indicates the Metro theme.
  6876. */
  6877. Metro: Theme;
  6878. /**
  6879. * Indicates the Module theme.
  6880. */
  6881. Module: Theme;
  6882. /**
  6883. * Indicates the Office theme.
  6884. */
  6885. Office: Theme;
  6886. /**
  6887. * Indicates the Office 2007 theme.
  6888. */
  6889. Office2007: Theme;
  6890. /**
  6891. * Indicates the Opulent theme.
  6892. */
  6893. Opulent: Theme;
  6894. /**
  6895. * Indicates the Oriel theme.
  6896. */
  6897. Oriel: Theme;
  6898. /**
  6899. * Indicates the Origin theme.
  6900. */
  6901. Origin: Theme;
  6902. /**
  6903. * Indicates the Paper theme.
  6904. */
  6905. Paper: Theme;
  6906. /**
  6907. * Indicates the Solstice theme.
  6908. */
  6909. Solstice: Theme;
  6910. /**
  6911. * Indicates the Technic theme.
  6912. */
  6913. Technic: Theme;
  6914. /**
  6915. * Indicates the Trek theme.
  6916. */
  6917. Trek: Theme;
  6918. /**
  6919. * Indicates the Urban theme.
  6920. */
  6921. Urban: Theme;
  6922. /**
  6923. * Indicates the Verve theme.
  6924. */
  6925. Verve: Theme;
  6926. }
  6927. export class Workbook{
  6928. /**
  6929. * Represents a spreadsheet with the specified hosted DOM element and options setting.
  6930. * @class
  6931. * @param {HTMLElement} host - The host DOM element.
  6932. * @param {Object} [options] - The initialization options.<br />
  6933. * @param {number} [options.sheetCount] - The number of sheets.<br />
  6934. * @param {string} [options.font] - The tab strip font.<br />
  6935. * @param {boolean} [options.allowUserDragMerge] - Whether to allow the user to drag merge cells.<br />
  6936. * @param {boolean} [options.allowUserDragDrop] - Whether to allow the user to drag and drop range data.<br />
  6937. * @param {boolean} [options.allowUserDragFill] - Whether to allow the user to drag fill a range.<br />
  6938. * @param {boolean} [options.allowUserZoom] - Whether to zoom the display by scrolling the mouse wheel while pressing the Ctrl key.<br />
  6939. * @param {boolean} [options.allowUserResize] - Whether to allow the user to resize columns and rows.<br />
  6940. * @param {boolean} [options.allowUndo] - Whether to allow the user to undo edits.<br />
  6941. * @param {boolean} [options.allowSheetReorder] - Whether the user can reorder the sheets in the Spread component.<br />
  6942. * @param {boolean} [options.allowContextMenu] - Whether to allow the user to open the built-in context menu.<br />
  6943. * @param {boolean} [options.allowUserDeselect] - Whether to allow the user to can use deselect in selection.<br />
  6944. * @param {GC.Spread.Sheets.Fill.AutoFillType} [options.defaultDragFillType] - The default fill type.<br />
  6945. * @param {boolean} [options.showDragFillSmartTag] - Whether to display the drag fill dialog.<br />
  6946. * @param {boolean} [options.showHorizontalScrollbar] - Whether to display the horizontal scroll bar.<br />
  6947. * @param {boolean} [options.showVerticalScrollbar] - Whether to display the vertical scroll bar.<br />
  6948. * @param {boolean} [options.scrollbarShowMax] - Whether the displayed scroll bars are based on the entire number of columns and rows in the sheet.<br />
  6949. * @param {boolean} [options.scrollbarMaxAlign] - Whether the scroll bar aligns with the last row and column of the active sheet.<br />
  6950. * @param {boolean} [options.tabStripVisible] - Whether to display the sheet tab strip.<br />
  6951. * @param {number} [options.tabStripRatio] - The width of the tab strip expressed as a percentage of the overall horizontal scroll bar width.<br />
  6952. * @param {boolean} [options.tabEditable] - Whether to allow the user to edit the sheet tab strip.<br />
  6953. * @param {boolean} [options.newTabVisible] - Whether the spreadsheet displays the special tab to let users insert new sheets.<br />
  6954. * @param {boolean} [options.tabNavigationVisible] - Whether to display the sheet tab navigation.<br />
  6955. * @param {boolean} [options.cutCopyIndicatorVisible] - Whether to display an indicator when copying or cutting the selected item.<br />
  6956. * @param {string} [options.cutCopyIndicatorBorderColor] - The border color for the indicator displayed when the user cuts or copies the selection.<br />
  6957. * @param {string} [options.backColor] - A color string used to represent the background color of the Spread component, such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5", and so on.<br />
  6958. * @param {string} [options.backgroundImage] - The background image of the Spread component.<br />
  6959. * @param {GC.Spread.Sheets.ImageLayout} [options.backgroundImageLayout] - The background image layout for the Spread component.<br />
  6960. * @param {string} [options.grayAreaBackColor] - A color string used to represent the background color of the gray area , such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5", and so on.<br />
  6961. * @param {GC.Spread.Sheets.ShowResizeTip} [options.showResizeTip] - How to display the resize tip.<br />
  6962. * @param {boolean} [options.showDragDropTip] -Whether to display the drag-drop tip.<br />
  6963. * @param {boolean} [options.showDragFillTip] - Whether to display the drag-fill tip.<br />
  6964. * @param {GC.Spread.Sheets.ShowScrollTip} [options.showScrollTip] - How to display the scroll tip.<br />
  6965. * @param {boolean} [options.scrollIgnoreHidden] - Whether the scroll bar ignores hidden rows or columns.<br />
  6966. * @param {boolean} [options.highlightInvalidData] - Whether to highlight invalid data.<br />
  6967. * @param {boolean} [options.useTouchLayout] - Whether to use touch layout to present the Spread component.<br />
  6968. * @param {boolean} [options.hideSelection] - Whether to display the selection highlighting when the Spread component does not have focus.<br />
  6969. * @param {GC.Spread.Sheets.ResizeZeroIndicator} [options.resizeZeroIndicator] - The drawing policy when the row or column is resized to zero.<br />
  6970. * @param {boolean} [options.allowUserEditFormula] - Whether the user can edit formulas in a cell in the spreadsheet.<br />
  6971. * @param {boolean} [options.enableFormulaTextbox] - Whether to enable the formula text box in the spreadsheet.<br />
  6972. * @param {GC.Spread.Sheets.AutoFitType} [options.autoFitType] - Whether content will be formatted to fit in cells or in cells and headers.<br />
  6973. * @param {GC.Spread.Sheets.ReferenceStyle} [options.referenceStyle] - the style for cell and range references in cell formulas on this sheet.
  6974. * @param {boolean} [options.calcOnDemand] - Whether to calculate formulas only when they are demanded.
  6975. * @param {boolean} [options.allowCopyPasteExcelStyle] - Whether the user can copy style from Spread Sheets then paste to Excel, or copy style from Excel then paste to Spread Sheets.
  6976. * @param {boolean} [options.allowExtendPasteRange] - Whether extend paste range if the paste range is not enough for pasting.
  6977. * @param {GC.Spread.Sheets.CopyPasteHeaderOptions} [options.copyPasteHeaderOptions] - Which headers are included when data is copied to or pasted.
  6978. * @param {boolean} [options.scrollByPixel] - Whether to enable the precision scrolling by pixel.
  6979. * @param {number} [options.scrollPixel] - Decides scrolling by that number of pixels at a time when scrollByPixel is true. The final scrolling pixels are the result of scrolling delta multiply scrollPixel. For example, the scrolling delta is 3, and the scrollPixel is 5, the final scrolling pixels are 15.
  6980. * @param {boolean} [options.allowAutoCreateHyperlink] - Whether to enable auto creating hyperlink in the spreadsheet.
  6981. * @param {GC.Spread.Sheets.ResizeMode} [options.columnResizeMode] - Specifies the way to resize column.
  6982. * @param {GC.Spread.Sheets.ResizeMode} [options.rowResizeMode] - Specifies the way to resize row.
  6983. * @param {Array} [options.customList] - The list for user to customize drag fill, prioritize matching this list in each fill. Each array item is type of string array.
  6984. * @example
  6985. * var workbook = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), {sheetCount:3, font:"12pt Arial"});
  6986. * var workbook = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), {sheetcount:3, newTabVisible:false});
  6987. * var workbook = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 3, tabEditable: false });
  6988. * var workbook = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), {sheetCount:3, tabStripVisible:false});
  6989. * var workbook = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), {sheetCount:3, allowUserResize:false});
  6990. * var workbook = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 3, allowUserZoom: false});
  6991. */
  6992. constructor(host?: HTMLElement, options?: GC.Spread.Sheets.IWorkBookDefaultOptions);
  6993. /**
  6994. * ContextMenu for the spread.
  6995. * @type {GC.Spread.Sheets.ContextMenu.ContextMenu}
  6996. * @example
  6997. * //This example shows how to get contextMenu's menuData.
  6998. * var menuData = spread.contextMenu.menuData;
  6999. */
  7000. contextMenu: GC.Spread.Sheets.ContextMenu.ContextMenu;
  7001. /**
  7002. * Represents the name of the Spread control.
  7003. * @type {string}
  7004. * @example
  7005. * spread.name = "Spread1";
  7006. */
  7007. name: string;
  7008. /**
  7009. * Represents the options of the Spread control.
  7010. * @type {Object}
  7011. * @property {boolean} allowUserDragMerge - Whether to allow the user to drag merge cells.<br />
  7012. * @property {boolean} allowUserDragDrop - Whether to allow the user to drag and drop range data.<br />
  7013. * @property {boolean} allowUserDragFill - Whether to allow the user to drag fill a range.<br />
  7014. * @property {boolean} allowUserZoom - Whether to zoom the display by scrolling the mouse wheel while pressing the Ctrl key.<br />
  7015. * @property {boolean} allowUserResize - Whether to allow the user to resize columns and rows.<br />
  7016. * @property {boolean} allowUndo - Whether to allow the user to undo edits.<br />
  7017. * @property {boolean} allowSheetReorder - Whether the user can reorder the sheets in the Spread component.<br />
  7018. * @property {boolean} allowContextMenu - Whether to allow the user to open the built-in context menu. <br />
  7019. * @property {boolean} allowUserDeselect - Whether to allow the user to can use deselect in selection.<br />
  7020. * @property {GC.Spread.Sheets.Fill.AutoFillType} defaultDragFillType - The default fill type.<br />
  7021. * @property {boolean} showDragFillSmartTag - Whether to display the drag fill dialog.<br />
  7022. * @property {boolean} showHorizontalScrollbar - Whether to display the horizontal scroll bar.<br />
  7023. * @property {boolean} showVerticalScrollbar - Whether to display the vertical scroll bar.<br />
  7024. * @property {boolean} scrollbarShowMax - Whether the displayed scroll bars are based on the entire number of columns and rows in the sheet.<br />
  7025. * @property {boolean} scrollbarMaxAlign - Whether the scroll bar aligns with the last row and column of the active sheet.<br />
  7026. * @property {boolean} tabStripVisible - Whether to display the sheet tab strip.<br />
  7027. * @property {number} tabStripRatio - The width of the tab strip expressed as a percentage of the overall horizontal scroll bar width.<br />
  7028. * @property {boolean} tabEditable - Whether to allow the user to edit the sheet tab strip.<br />
  7029. * @property {boolean} newTabVisible - Whether the spreadsheet displays the special tab to let users insert new sheets.<br />
  7030. * @property {boolean} tabNavigationVisible - Whether to display the sheet tab navigation.<br />
  7031. * @property {boolean} cutCopyIndicatorVisible - Whether to display an indicator when copying or cutting the selected item.<br />
  7032. * @property {string} cutCopyIndicatorBorderColor - The border color for the indicator displayed when the user cuts or copies the selection.<br />
  7033. * @property {string} backColor - A color string used to represent the background color of the Spread component, such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5", and so on.<br />
  7034. * @property {string} backgroundImage - The background image of the Spread component.<br />
  7035. * @property {GC.Spread.Sheets.ImageLayout} backgroundImageLayout - The background image layout for the Spread component.<br />
  7036. * @property {string} grayAreaBackColor - A color string used to represent the background color of the gray area , such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5", and so on.<br />
  7037. * @property {GC.Spread.Sheets.ShowResizeTip} showResizeTip - How to display the resize tip.<br />
  7038. * @property {boolean} showDragDropTip -Whether to display the drag-drop tip.<br />
  7039. * @property {boolean} showDragFillTip - Whether to display the drag-fill tip.<br />
  7040. * @property {GC.Spread.Sheets.ShowScrollTip} showScrollTip - How to display the scroll tip.<br />
  7041. * @property {boolean} scrollIgnoreHidden - Whether the scroll bar ignores hidden rows or columns.<br />
  7042. * @property {boolean} highlightInvalidData - Whether to highlight invalid data.<br />
  7043. * @property {boolean} useTouchLayout - Whether to use touch layout to present the Spread component.<br />
  7044. * @property {boolean} hideSelection - Whether to display the selection highlighting when the Spread component does not have focus.<br />
  7045. * @property {GC.Spread.Sheets.ResizeZeroIndicator} resizeZeroIndicator - The drawing policy when the row or column is resized to zero.<br />
  7046. * @property {boolean} allowUserEditFormula - Whether the user can edit formulas in a cell in the spreadsheet.<br />
  7047. * @property {boolean} enableFormulaTextbox - Whether to enable the formula text box in the spreadsheet.<br />
  7048. * @property {GC.Spread.Sheets.AutoFitType} autoFitType - Whether content will be formatted to fit in cells or in cells and headers.<br />
  7049. * @property {GC.Spread.Sheets.ReferenceStyle} referenceStyle - the style for cell and range references in cell formulas on this sheet.
  7050. * @property {boolean} allowDynamicArray - Whether to enable dynamic array.
  7051. * @property {boolean} calcOnDemand - Whether to calculate formulas only when they are demanded.
  7052. * @property {boolean} allowCopyPasteExcelStyle - Whether the user can copy style from Spread Sheets then paste to Excel, or copy style from Excel then paste to Spread Sheets.
  7053. * @property {boolean} allowExtendPasteRange - Whether extend paste range if the paste range is not enough for pasting.
  7054. * @property {GC.Spread.Sheets.CopyPasteHeaderOptions} copyPasteHeaderOptions - Which headers are included when data is copied to or pasted.
  7055. * @property {boolean} scrollByPixel - Whether to enable the precision scrolling by pixel.
  7056. * @property {number} scrollPixel - Decides scrolling by that number of pixels at a time when scrollByPixel is true. The final scrolling pixels are the result of scrolling delta multiply scrollPixel. For example, the scrolling delta is 3, and the scrollPixel is 5, the final scrolling pixels are 15.
  7057. * @property {boolean} allowAutoCreateHyperlink - Whether to enable auto creating hyperlink in the spreadsheet.
  7058. * @property {GC.Spread.Sheets.ResizeMode} columnResizeMode - Specifies the way to resize column.
  7059. * @property {GC.Spread.Sheets.ResizeMode} rowResizeMode - Specifies the way to resize row.
  7060. * @property {Array} customList - The list for user to customize drag fill, prioritize matching this list in each fill. Each array item is type of string array.
  7061. * @example
  7062. * var workbook = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:5,showHorizontalScrollbar:false});
  7063. * workbook.options.allowUserDragDrop = false;
  7064. * workbook.options.allowUserZoom = false;
  7065. */
  7066. options: IWorkbookOptions;
  7067. /**
  7068. * Represents the sheet collection.
  7069. * @type {Array.<GC.Spread.Sheets.Worksheet>}
  7070. */
  7071. sheets: GC.Spread.Sheets.Worksheet[];
  7072. /**
  7073. * Represents the touch toolstrip.
  7074. * @type {GC.Spread.Sheets.Touch.TouchToolStrip}
  7075. */
  7076. touchToolStrip: GC.Spread.Sheets.Touch.TouchToolStrip;
  7077. /**
  7078. * Adds a custom function.
  7079. * @param {GC.Spread.CalcEngine.Functions.Function} fn The function to add.
  7080. */
  7081. addCustomFunction(fn: GC.Spread.CalcEngine.Functions.Function): void;
  7082. /**
  7083. * Adds a custom name.
  7084. * @param {string} name The custom name.
  7085. * @param {string} formula The formula.
  7086. * @param {number} baseRow The row index.
  7087. * @param {number} baseCol The column index.
  7088. * @param {string} comment The custom comment.
  7089. */
  7090. addCustomName(name: string, formula: string, baseRow: number, baseCol: number, comment: string): void;
  7091. /**
  7092. * Adds a style to the Workbook named styles collection.
  7093. * @param {GC.Spread.Sheets.Style} style The style to be added.
  7094. */
  7095. addNamedStyle(style: GC.Spread.Sheets.Style): void;
  7096. /**
  7097. * Inserts a sheet at the specific index.
  7098. * @param {number} index The index at which to add a sheet.
  7099. * @param {GC.Spread.Sheets.Worksheet} sheet The sheet to be added.
  7100. * @example
  7101. * //This example adds a sheet to the spreadsheet.
  7102. * spread.addSheet(0,new GC.Spread.Sheets.Worksheet("custom"));
  7103. */
  7104. addSheet(index: number, sheet?: GC.Spread.Sheets.Worksheet): void;
  7105. /**
  7106. * Adds a SparklineEx to the SparklineEx collection.
  7107. * @param {GC.Spread.Sheets.Sparklines.SparklineEx} sparklineEx The SparklineEx to be added.
  7108. */
  7109. addSparklineEx(sparklineEx: GC.Spread.Sheets.Sparklines.SparklineEx): void;
  7110. /**
  7111. * Binds an event to the Workbook.
  7112. * @param {string} type The event type.
  7113. * @param {Object} data Specifies additional data to pass along to the function.
  7114. * @param {Function} fn Specifies the function to run when the event occurs.
  7115. * @example
  7116. * //This example binds events to functions.
  7117. * sheet.setActiveCell(5,5);
  7118. * alert(sheet.getActiveColumnIndex());
  7119. * alert(sheet.getActiveRowIndex());
  7120. * spread.bind(GC.Spread.Sheets.Events.EnterCell, function (event, data) {
  7121. * alert(data.col);
  7122. * alert(data.row);
  7123. * });
  7124. * spread.bind(GC.Spread.Sheets.Events.LeaveCell, function (event, data) {
  7125. * alert(data.col);
  7126. * alert(data.row);
  7127. * });
  7128. */
  7129. bind(type: string, data?: any, fn?: Function): void;
  7130. /**
  7131. * Clears all custom functions.
  7132. */
  7133. clearCustomFunctions(): void;
  7134. /**
  7135. * Clears custom names.
  7136. */
  7137. clearCustomNames(): void;
  7138. /**
  7139. * Clears all sheets in the control.
  7140. * @example
  7141. * //This example uses the clearSheets method.
  7142. * spread.clearSheets();
  7143. */
  7144. clearSheets(): void;
  7145. /**
  7146. * Gets the command manager.
  7147. * @returns {GC.Spread.Commands.CommandManager} The command manager.
  7148. * @example
  7149. * //This example executes a command that performs a specified action.
  7150. * spread.options.allowUndo = true;
  7151. * spread.commandManager().execute({cmd: "outlineRow", sheetName: "Sheet1", index: 3, count: 5});
  7152. */
  7153. commandManager(): GC.Spread.Commands.CommandManager;
  7154. /**
  7155. * Destroys the workbook and all sheets it contains.
  7156. * @example
  7157. * //This example destroys the workbook instance.
  7158. * spread.destroy();
  7159. */
  7160. destroy(): void;
  7161. /**
  7162. * Makes the Workbook component get focus or lose focus.
  7163. * @param {boolean} focusIn <c>false</c> makes the Workbook component lose the focus; otherwise, get focus.
  7164. * @example
  7165. * //This example sets focus to the Spread control.
  7166. * $("#button1").click(function () {
  7167. * spread.focus(true);
  7168. * });
  7169. */
  7170. focus(focusIn?: boolean): void;
  7171. /**
  7172. * Loads the object state from the specified JSON string.
  7173. * @param {Object} workbookData The spreadsheet data from deserialization.
  7174. * @param {Object} [deserializationOptions] - The deserialization options.
  7175. * @param {boolean} [deserializationOptions.ignoreStyle] - Whether to ignore the style when converting json to the workbook.
  7176. * @param {boolean} [deserializationOptions.ignoreFormula] - Whether to ignore the formula when converting json to the workbook.
  7177. * @param {boolean} [deserializationOptions.frozenColumnsAsRowHeaders] - Whether to treat the frozen columns as row headers when converting json to the workbook.
  7178. * @param {boolean} [deserializationOptions.frozenRowsAsColumnHeaders] - Whether to treat the frozen rows as column headers when converting json to the workbook.
  7179. * @param {boolean} [deserializationOptions.doNotRecalculateAfterLoad] - Whether to prevent recalculation after loading the json data.
  7180. * @example
  7181. * //This example uses the fromJSON method.
  7182. * activeSheet.getCell(0,0).value(123);
  7183. * var jsonStr = null;
  7184. * //export
  7185. * jsonStr = JSON.stringify(spread.toJSON(false));
  7186. * //import
  7187. * spread.fromJSON(JSON.parse(jsonStr));
  7188. * alert(jsonStr);
  7189. */
  7190. fromJSON(workbookData: Object, deserializationOptions?: Object): void;
  7191. /**
  7192. * Gets the active sheet.
  7193. * @returns {GC.Spread.Sheets.Worksheet} The active sheet instance.
  7194. */
  7195. getActiveSheet(): GC.Spread.Sheets.Worksheet;
  7196. /**
  7197. * Gets the active sheet index of the control.
  7198. * @returns {number} The active sheet index.
  7199. * @example
  7200. * //This example uses the getActiveSheetIndex method.
  7201. * var index = spread.getActiveSheetIndex();
  7202. * alert(index);
  7203. */
  7204. getActiveSheetIndex(): number;
  7205. /**
  7206. * Gets a custom function.
  7207. * @param {string} name The custom function name.
  7208. * @returns {GC.Spread.CalcEngine.Functions.Function} The custom function.
  7209. */
  7210. getCustomFunction(name: string): void;
  7211. /**
  7212. * Gets the specified custom name information.
  7213. * @param {string} name The custom name.
  7214. * @returns {GC.Spread.Sheets.NameInfo} The information for the specified custom name.
  7215. */
  7216. getCustomName(name: string): GC.Spread.Sheets.NameInfo;
  7217. /**
  7218. * Gets all custom name information.
  7219. * @returns {Array.<GC.Spread.Sheets.NameInfo>} The type GC.Spread.Sheets.NameInfo stored in an array.
  7220. */
  7221. getCustomNames(): GC.Spread.Sheets.NameInfo[];
  7222. /**
  7223. * Gets the host element of the current Workbook instance.
  7224. * @returns {HTMLElement} host The host element of the current Workbook instance.
  7225. */
  7226. getHost(): HTMLElement;
  7227. /**
  7228. * Gets a style from the Workbook named styles collection which has the specified name.
  7229. * @param {string} name The name of the style to return.
  7230. * @returns {GC.Spread.Sheets.Style} Returns the specified named style.
  7231. */
  7232. getNamedStyle(name: string): GC.Spread.Sheets.Style;
  7233. /**
  7234. * Gets named styles from the Workbook.
  7235. * @returns {Array.<GC.Spread.Sheets.Style>} The GC.Spread.Sheets.Style array of named styles.
  7236. */
  7237. getNamedStyles(): GC.Spread.Sheets.Style[];
  7238. /**
  7239. * Gets the specified sheet.
  7240. * @param {number} index The index of the sheet to return.
  7241. * @returns {GC.Spread.Sheets.Worksheet} The specified sheet.
  7242. * @example
  7243. * //This example gets the sheet and sets the cell forecolor.
  7244. * var sheet1 = spread.getSheet(1);
  7245. * sheet1.getCell(0,0).value("A1").foreColor("red");
  7246. */
  7247. getSheet(index: number): GC.Spread.Sheets.Worksheet;
  7248. /**
  7249. * Gets the number of sheets.
  7250. * @returns {number} The number of sheets.
  7251. * @example
  7252. * //This example uses the getSheetCount method.
  7253. * var index = spread.getSheetCount();
  7254. * alert(index);
  7255. */
  7256. getSheetCount(): number;
  7257. /**
  7258. * Gets the sheet with the specified name.
  7259. * @param {string} name The sheet name.
  7260. * @returns {GC.Spread.Sheets.Worksheet} The sheet with the specified name.
  7261. * @example
  7262. * //This example gets the sheet and sets the cell forecolor.
  7263. * var sheet1 = spread.getSheetFromName("Sheet2");
  7264. * sheet1.getCell(0,0).value("A1").foreColor("red");
  7265. */
  7266. getSheetFromName(name: string): GC.Spread.Sheets.Worksheet;
  7267. /**
  7268. * Gets the sheet index with the specified name.
  7269. * @param {string} name The sheet name.
  7270. * @returns {number} The sheet index.
  7271. * @example
  7272. * //This example uses the getSheetIndex method.
  7273. * var sheet1 = spread.getSheetIndex("Sheet2");
  7274. * alert(sheet1);
  7275. */
  7276. getSheetIndex(name: string): number;
  7277. /**
  7278. * Performs a hit test.
  7279. * @param {number} x The <i>x</i>-coordinate, x relative to spread horizontal axis.
  7280. * @param {number} y The <i>y</i>-coordinate, y relative to spread vertical axis.
  7281. * @returns {Object} The hit test information. If selecting the worksheet, the worksheet information is returned. The information contains x, y, and worksheetHitInfo;
  7282. * If selecting the sheetsTabStrip, the sheetsTabStrip information is returned. This information contains x, y, and tabStripHitInfo;
  7283. * If selecting the horizontalScrollbar, the horizontalScrollbar information is returned. This information contains x, y, and horizontalScrollBarHitInfo;
  7284. * If selecting the verticalScrollbar, the verticalScrollbar information is returned. This information contains x, y, and verticalScrollBarHitInfo;
  7285. * If selecting the footerCorner, the footerCorner information is returned. This information contains x, y, and footerCornerHitInfo.
  7286. * @example
  7287. * //This example uses the hitTest method.
  7288. * window.onload = function(){
  7289. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3});
  7290. * var activeeSheet = spread.getActiveSheet();
  7291. * $("#ss").click(function (e) {
  7292. * //Acquire cell index from mouse-clicked point of regular cells which are neither fixed rows/columns nor row/column headers.
  7293. * var offset = $("#ss").offset();
  7294. * var x = e.pageX - offset.left;
  7295. * var y = e.pageY - offset.top;
  7296. * var target = spread.hitTest(x, y);
  7297. * if(target.worksheetHitInfo) {
  7298. * if(target.worksheetHitInfo.hitTestType === 0) {
  7299. * str = 'corner';
  7300. * } else if (target.worksheetHitInfo.hitTestType === 1) {
  7301. * str = 'colHeader';
  7302. * } else if (target.worksheetHitInfo.hitTestType === 2) {
  7303. * str = 'rowHeader';
  7304. * } else {
  7305. * str = 'viewport';
  7306. * }
  7307. * } else if(target.tabStripHitInfo) {
  7308. * if(target.tabStripHitInfo.navButton){
  7309. * str = target.tabStripHitInfo.navButton;
  7310. * } else if(target.tabStripHitInfo.sheetTab) {
  7311. * str = target.tabStripHitInfo.sheetTab.sheetName;
  7312. * } else if(target.tabStripHitInfo.resize === true) {
  7313. * str = "resize";
  7314. * } else {
  7315. * str = "blank";
  7316. * }
  7317. * } else if(target.horizontalScrollBarHitInfo) {
  7318. * str = target.horizontalScrollBarHitInfo.element;
  7319. * } else if(target.verticalScrollBarHitInfo) {
  7320. * str = target.verticalScrollBarHitInfo.element;
  7321. * } else if(target.footerCornerHitInfo) {
  7322. * str = target.footerCornerHitInfo.element;
  7323. * }
  7324. * alert(str);
  7325. * });
  7326. * }
  7327. */
  7328. hitTest(x: number, y: number): IWorkbookHitTestInformation;
  7329. /**
  7330. * Updates the control layout information.
  7331. * @example
  7332. * //This example updates the layout.
  7333. * spread.invalidateLayout();
  7334. * spread.repaint();
  7335. */
  7336. invalidateLayout(): void;
  7337. /**
  7338. * Get if spread paint is suspended.
  7339. */
  7340. isPaintSuspended(): boolean;
  7341. /**
  7342. * Gets or sets the next control used by GC.Spread.Sheets.Actions.selectNextControl and GC.Spread.Sheets.Actions.moveToNextCellThenControl.
  7343. * @param {HTMLElement} value The next control. The control must have a focus method.
  7344. * @returns {HTMLElement|GC.Spread.Sheets.Workbook} If no value is set, returns the next control; otherwise, returns the spreadsheet.
  7345. */
  7346. nextControl(value?: HTMLElement): any;
  7347. /**
  7348. *Get a page info for a sheet
  7349. * @param {number} sheetIndex The sheet index.
  7350. * @returns {Object | Array} return a page info for a sheet, If the sheet index is ignored return all sheet's page info in an array
  7351. * @example
  7352. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
  7353. * spread.suspendPaint();
  7354. * var sheet = spread.getActiveSheet();
  7355. * for(var i=0;i<20;i++){
  7356. * for(var j=0;j<20;j++){
  7357. * sheet.setValue(i,j,"Row"+i+"_Column"+j);
  7358. * }
  7359. * }
  7360. * var pageInfos = spread.pageInfo(0);
  7361. * console.table(pageInfos.pages);
  7362. */
  7363. pageInfo(sheetIndex?: number): any;
  7364. /**
  7365. * Gets or sets the previous control used by GC.Spread.Sheets.Actions.selectPreviousControl and GC.Spread.Sheets.Actions.moveToPreviousCellThenControl.
  7366. * @param {HTMLElement} value The previous control. The control must have a focus method.
  7367. * @returns {HTMLElement|GC.Spread.Sheets.Workbook} If no value is set, returns the previous control; otherwise, returns the spreadsheet.
  7368. */
  7369. previousControl(value?: HTMLElement): any;
  7370. /**
  7371. *Prints the specified sheet.
  7372. *@param {number} sheetIndex The sheet index. If the sheet index is ignored, prints all visible sheets.
  7373. */
  7374. print(sheetIndex?: number): void;
  7375. /**
  7376. * Manually refreshes the layout and rendering of the Workbook object.
  7377. * @example
  7378. * //This example uses the refresh method.
  7379. * spread.refresh();
  7380. */
  7381. refresh(): void;
  7382. /**
  7383. * Removes a custom function.
  7384. * @param {string} name The custom function name.
  7385. */
  7386. removeCustomFunction(name: string): void;
  7387. /**
  7388. * Removes the specified custom name.
  7389. * @param {string} name The custom name.
  7390. * @example
  7391. * //This example uses the removeCustomName method.
  7392. * activeSheet.setValue(0, 0, 1);
  7393. * activeSheet.setValue(0, 1, 2);
  7394. * activeSheet.setValue(0, 2, 3);
  7395. * spread.addCustomName("customName1","=12", 0, 0);
  7396. * activeSheet.setFormula(1, 0, "customName1");
  7397. * //spread.removeCustomName("customName1");
  7398. */
  7399. removeCustomName(name: string): void;
  7400. /**
  7401. * Removes a style from the Workbook named styles collection which has the specified name.
  7402. * @param {string} name The name of the style to remove.
  7403. * @example
  7404. * var namedStyle = new GC.Spread.Sheets.Style();
  7405. * namedStyle.name = "style1";
  7406. * namedStyle.backColor = "green";
  7407. * spread.addNamedStyle(namedStyle);
  7408. * activeSheet.setStyleName(1, 1, "style1"); // cell(1,1)'s backColor is green.
  7409. * activeSheet.setStyleName(2, 1, "style1");
  7410. * var style = spread.getNamedStyle("style1");
  7411. * style.foreColor = "red"; // the namedStyle's foreColor is red.
  7412. * activeSheet.repaint(); // the foreColor of the cell(1,1) and cell(2,1) is red.
  7413. * activeSheet.getCell(1,1).value("test");
  7414. * $("#button1").click(function () {
  7415. * spread.removeNamedStyle("style1");
  7416. * });
  7417. */
  7418. removeNamedStyle(name: string): void;
  7419. /**
  7420. * Removes the specified sheet.
  7421. * @param {number} index The index of the sheet to remove.
  7422. * @example
  7423. * //This example removes a sheet from the spreadsheet.
  7424. * spread.setSheetCount(5);
  7425. * spread.removeSheet(0);
  7426. */
  7427. removeSheet(index: number): void;
  7428. /**
  7429. * Removes a SparklineEx from the SparklineEx collection.
  7430. * @param {string} name The name of the SparklineEx to remove.
  7431. */
  7432. removeSparklineEx(name: string): void;
  7433. /**
  7434. * Repaints the Workbook control.
  7435. * @example
  7436. * //This example updates the layout.
  7437. * spread.invalidateLayout();
  7438. * spread.repaint();
  7439. */
  7440. repaint(): void;
  7441. /**
  7442. * Resumes the calculation service.
  7443. * @param {boolean} recalcAll Specifies whether to recalculate all formulas.
  7444. * @example
  7445. * //This example uses the resumeCalcService method.
  7446. * spread.suspendCalcService(false);
  7447. * activeSheet.setValue(0,0,1);
  7448. * activeSheet.setValue(0,1,2);
  7449. * activeSheet.setValue(0,2,10);
  7450. * activeSheet.getCell(1,1).formula("=SUM(A1:C1)");
  7451. * spread.resumeCalcService(true);
  7452. */
  7453. resumeCalcService(ignoreDirty: boolean): void;
  7454. /**
  7455. * Resumes the event.
  7456. * @example
  7457. * //This example suspends and resumes the event.
  7458. * activeSheet.bind(GC.Spread.Sheets.Events.CellChanged, function (sender, args) {
  7459. * if (args.propertyName === "value") {
  7460. * alert(activeSheet.getValue(args.row, args.col));
  7461. * }
  7462. * });
  7463. * spread.suspendEvent();
  7464. * activeSheet.setValue(0, 0, "111");
  7465. * spread.resumeEvent();
  7466. * activeSheet.setValue(1, 1, "222");
  7467. */
  7468. resumeEvent(): void;
  7469. /**
  7470. * Resumes the paint of active sheet and tab strip.
  7471. */
  7472. resumePaint(): void;
  7473. /**
  7474. *Exports the specified sheet to PDF.
  7475. *@param {function} successCallback Call this function after successfully export. function (blob) {}.
  7476. *@param {function} errorCallback Call this function if an error occurs. The exception parameter object structure { errorCode: GC.Spread.Sheets.PDF.ErrorCode, errorMessage: string}.
  7477. *@param {Object} [options] The options for export PDF.
  7478. *@param {string} [options.creator] The name of the application (for example, Adobe FrameMaker\xae) that created the original document from which it was converted.
  7479. *@param {string} [options.title] The document\u2019s title.
  7480. *@param {string} [options.author] The name of the person who created the document.
  7481. *@param {string} [options.keywords] Keywords associated with the document.
  7482. *@param {string} [options.subject] The subject of the document.
  7483. *@param {number} sheetIndex The sheet index. If the sheet index is ignored, exports all visible sheets.
  7484. */
  7485. savePDF(successCallback: Function, errorCallback: Function, options?: Object, sheetIndex?: number): void;
  7486. /**
  7487. * Searches the text in the cells in the specified sheet for the specified string with the specified criteria.
  7488. * @param {GC.Spread.Sheets.Search.SearchCondition} searchCondition The search conditions.
  7489. * @returns {GC.Spread.Sheets.Search.SearchResult} The search result.
  7490. * @example
  7491. * //This example searches the active sheet using the specified search condition.
  7492. * activeSheet.getCell(2,3).value("testSearch");
  7493. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  7494. * searchCondition.searchString = "testSearch";
  7495. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  7496. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  7497. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  7498. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  7499. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.ignoreCase| GC.Spread.Sheets.Search.SearchFlags.useWildCards;
  7500. * var searchresult= spread.search(searchCondition);
  7501. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" +
  7502. * searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundSheetIndex+"]";
  7503. * alert(str);
  7504. */
  7505. search(searchCondition: GC.Spread.Sheets.Search.SearchCondition): GC.Spread.Sheets.Search.SearchResult;
  7506. /**
  7507. * Sets the active sheet by name.
  7508. * @param {string} name The name of the sheet to make the active sheet.
  7509. * @example
  7510. * //This example sets the active sheet.
  7511. * spread.setSheetCount(3);
  7512. * spread.setActiveSheet("Sheet2");
  7513. */
  7514. setActiveSheet(name: string): void;
  7515. /**
  7516. * Sets the active sheet index for the control.
  7517. * @param {number} value The active sheet index.
  7518. * @example
  7519. * //This example uses the setActiveSheetIndex method.
  7520. * spread.setActiveSheetIndex(1);
  7521. */
  7522. setActiveSheetIndex(value: number): void;
  7523. /**
  7524. * Sets the number of sheets.
  7525. * @param {number} count The number of sheets.
  7526. * @example
  7527. * spread.setSheetCount(5);
  7528. */
  7529. setSheetCount(count: number): void;
  7530. /**
  7531. * Gets or sets the index of the first sheet to display in the spreadsheet.
  7532. * @param {number} value The index of the first sheet to display in the spreadsheet.
  7533. * @returns {number|GC.Spread.Sheets.Workbook} If no value is set, returns the index of the first sheet displayed in the spreadsheet; otherwise, returns the spreadsheet.
  7534. */
  7535. startSheetIndex(value?: number): any;
  7536. /**
  7537. * Suspends the calculation service.
  7538. * @param {boolean} ignoreDirty Specifies whether to invalidate the dependency cells.
  7539. * @example
  7540. * //This example uses the suspendCalcService method.
  7541. * spread.suspendCalcService(false);
  7542. * activeSheet.setValue(0,0,1);
  7543. * activeSheet.setValue(0,1,2);
  7544. * activeSheet.setValue(0,2,10);
  7545. * activeSheet.getCell(1,1).formula("=SUM(A1:C1)");
  7546. * spread.resumeCalcService(true);
  7547. */
  7548. suspendCalcService(ignoreDirty: boolean): void;
  7549. /**
  7550. * Suspends the event.
  7551. * @example
  7552. * //This example suspends and resumes the event.
  7553. * activeSheet.bind(GC.Spread.Sheets.Events.CellChanged, function (sender, args) {
  7554. * if (args.propertyName === "value") {
  7555. * alert(activeSheet.getValue(args.row, args.col));
  7556. * }
  7557. * });
  7558. * spread.suspendEvent();
  7559. * activeSheet.setValue(0, 0, "111");
  7560. * spread.resumeEvent();
  7561. * activeSheet.setValue(1, 1, "222");
  7562. */
  7563. suspendEvent(): void;
  7564. /**
  7565. * Suspends the paint of active sheet and tab strip.
  7566. */
  7567. suspendPaint(): void;
  7568. /**
  7569. * Saves the object state to a JSON string.
  7570. * @param {Object} serializationOption - The serialization options.
  7571. * @param {boolean} [serializationOption.includeBindingSource] - Whether to include the binding source when converting the workbook to json.
  7572. * @param {boolean} [serializationOption.ignoreStyle] - Whether to ignore the style when converting the workbook to json.
  7573. * @param {boolean} [serializationOption.ignoreFormula] - Whether to ignore the formula when converting the workbook to json.
  7574. * @param {boolean} [serializationOption.saveAsView] - Whether to ignore the format string when converting the workbook to json.
  7575. * @param {boolean} [serializationOption.rowHeadersAsFrozenColumns] - Whether to treat the row headers as frozen columns when converting the workbook to json.
  7576. * @param {boolean} [serializationOption.columnHeadersAsFrozenRows] - Whether to treat the column headers as frozen rows when converting the workbook to json.
  7577. * @param {boolean} [serializationOption.includeAutoMergedCells] - Whether to include the automatically merged cells when converting the workbook to json.
  7578. * @returns {Object} The spreadsheet data.
  7579. * @example
  7580. * activeSheet.getCell(0,0).value(123);
  7581. * var jsonStr = null;
  7582. * //export
  7583. * jsonStr = JSON.stringify(spread.toJSON(false));
  7584. * //import
  7585. * spread.fromJSON(JSON.parse(jsonStr));
  7586. * alert(jsonStr);
  7587. */
  7588. toJSON(serializationOption?: Object): Object;
  7589. /**
  7590. * Removes the binding of an event to Workbook.
  7591. * @param {string} type The event type.
  7592. * @param {Function} fn Specifies the function to run when the event occurs.
  7593. * @example
  7594. * //This example removes the event binding.
  7595. * activeSheet.bind(GC.Spread.Sheets.Events.CellChanged, function (sender, args) {
  7596. * if (args.propertyName === "value") {
  7597. * alert(activeSheet.getValue(args.row, args.col));
  7598. * }
  7599. * });
  7600. * activeSheet.setValue(0, 0, "111");
  7601. * spread.unbind(GC.Spread.Sheets.Events.CellChanged);
  7602. * //spread.unbindAll(); //cancel monitoring of all events.
  7603. * activeSheet.setValue(1, 0, "222");
  7604. * activeSheet.setValue(2, 0, "333");
  7605. * activeSheet.setValue(3, 0, "444");
  7606. */
  7607. unbind(type: string, fn?: Function): void;
  7608. /**
  7609. * Removes the binding of all events to Workbook.
  7610. * @example
  7611. * //This example removes the event binding. Uncomment the unbindAll method to remove all event binding.
  7612. * activeSheet.bind(GC.Spread.Sheets.Events.CellChanged, function (sender, args) {
  7613. * if (args.propertyName === "value") {
  7614. * alert(activeSheet.getValue(args.row, args.col));
  7615. * }
  7616. * });
  7617. * activeSheet.setValue(0, 0, "111");
  7618. * spread.unbind(GC.Spread.Sheets.Events.CellChanged);
  7619. * //spread.unbindAll(); //cancel monitoring of all events.
  7620. * activeSheet.setValue(1, 0, "222");
  7621. * activeSheet.setValue(2, 0, "333");
  7622. * activeSheet.setValue(3, 0, "444");
  7623. */
  7624. unbindAll(): void;
  7625. /**
  7626. * Gets the undo manager.
  7627. * @returns {GC.Spread.Commands.UndoManager} The undo manager.
  7628. */
  7629. undoManager(): GC.Spread.Commands.UndoManager;
  7630. }
  7631. export class Worksheet{
  7632. /**
  7633. * Represents a worksheet.
  7634. * @class
  7635. * @param {string} name The name of the Worksheet.
  7636. */
  7637. constructor(name: string);
  7638. /**
  7639. * Indicates whether to generate columns automatically while binding data context.
  7640. * @type {boolean}
  7641. * @example
  7642. * //This example sets a data source for the sheet.
  7643. * var test = [
  7644. * { "Series0": 2, "Series1": 1 },
  7645. * { "Series0": 4, "Series1": 2 },
  7646. * { "Series0": 3, "Series1": 4 }
  7647. * ];
  7648. * activeSheet.autoGenerateColumns = true;
  7649. * activeSheet.setDataSource(test, true);
  7650. */
  7651. autoGenerateColumns: boolean;
  7652. /** The cellState manager.
  7653. * @type {GC.Spread.Sheets.CellState.CellStateManager}
  7654. */
  7655. cellStates: GC.Spread.Sheets.CellState.CellStateManager;
  7656. /**
  7657. * Chart manager for the sheet.
  7658. * @type {GC.Spread.Sheets.Charts.ChartCollection}
  7659. * @example
  7660. * //This example shows how to add a chart.
  7661. * var dataRange = "A1:D4";
  7662. * var chart = activeSheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, dataRange);
  7663. */
  7664. charts: GC.Spread.Sheets.Charts.ChartCollection;
  7665. /**
  7666. * Indicates the column range group.
  7667. * @type {GC.Spread.Sheets.Outlines.Outline}
  7668. */
  7669. columnOutlines: GC.Spread.Sheets.Outlines.Outline;
  7670. /**
  7671. * Comment manager for the sheet.
  7672. * @type {GC.Spread.Sheets.Comments.CommentManager}
  7673. */
  7674. comments: GC.Spread.Sheets.Comments.CommentManager;
  7675. /**
  7676. * Conditional format manager for the sheet.
  7677. * @type {GC.Spread.Sheets.ConditionalFormatting.ConditionalFormats}
  7678. * @example
  7679. * //This example creates a rule.
  7680. * var style = new GC.Spread.Sheets.Style();
  7681. * style.backColor = "red";
  7682. * var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  7683. * rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  7684. * rule.ranges([new GC.Spread.Sheets.Range(0,0,5,1)]);
  7685. * rule.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between);
  7686. * rule.style(style);
  7687. * rule.value1(2);
  7688. * rule.value2(100);
  7689. * activeSheet.conditionalFormats.addRule(rule);
  7690. * activeSheet.setValue(0,0,1,3);
  7691. * activeSheet.setValue(1,0,45,3);
  7692. * var ruletest = activeSheet.conditionalFormats.getRules();
  7693. * alert(ruletest[0].style().backColor);
  7694. */
  7695. conditionalFormats: ConditionalFormatting.ConditionalFormats;
  7696. /**
  7697. * Indicates the default row height and column width of the sheet.
  7698. * @type {Object}
  7699. * @example
  7700. * //This example sets the default row height and column width.
  7701. * activeSheet.suspendPaint();
  7702. * activeSheet.defaults.rowHeight = 40;
  7703. * activeSheet.defaults.colWidth = 30;
  7704. * activeSheet.resumePaint();
  7705. */
  7706. defaults: GC.Spread.Sheets.ISheetDefaultOption;
  7707. /**
  7708. * FloatingObject manager for the sheet.
  7709. * @type {GC.Spread.Sheets.FloatingObjects.FloatingObjectCollection}
  7710. * @example
  7711. * //This example creates a floating object.
  7712. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  7713. * var btn = document.createElement('button');
  7714. * btn.style.width = "60px";
  7715. * btn.style.height = "30px";
  7716. * btn.innerText = "button";
  7717. * customFloatingObject.content(btn);
  7718. * activeSheet.floatingObjects.add(customFloatingObject);
  7719. */
  7720. floatingObjects: GC.Spread.Sheets.FloatingObjects.FloatingObjectCollection;
  7721. /**
  7722. * Indicates the options of the sheet.
  7723. * @type {Object}
  7724. * @property {boolean} allowCellOverflow - Indicates whether data can overflow into adjacent empty cells.
  7725. * @property {boolean} showFormulas - Indicates whether display the formulas string not the formula result.
  7726. * @property {string} sheetTabColor - A color string used to represent the sheet tab color, such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5", and so on.
  7727. * @property {string} frozenlineColor - A color string used to represent the frozen line color, such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5", and so on.
  7728. * @property {GC.Spread.Sheets.ClipboardPasteOptions} clipBoardOptions - The clipboard option.
  7729. * @property {Object} gridline - The grid line's options.
  7730. * @property {string} gridline.color - The grid line color
  7731. * @property {boolean} gridline.showVerticalGridline - Whether to show the vertical grid line.
  7732. * @property {boolean} gridline.showHorizontalGridline - Whether to show the horizontal grid line.
  7733. * @property {boolean} rowHeaderVisible - Indicates whether the row header is visible.
  7734. * @property {boolean} colHeaderVisible - Indicates whether the column header is visible.
  7735. * @property {GC.Spread.Sheets.HeaderAutoText} rowHeaderAutoText - Indicates whether the row header displays letters or numbers or is blank.
  7736. * @property {GC.Spread.Sheets.HeaderAutoText} colHeaderAutoText - Indicates whether the column header displays letters or numbers or is blank.
  7737. * @property {number} rowHeaderAutoTextIndex - Specifies which row header column displays the automatic text when there are multiple row header columns.
  7738. * @property {number} colHeaderAutoTextIndex - Specifies which column header row displays the automatic text when there are multiple column header rows.
  7739. * @property {boolean} isProtected - Indicates whether cells on this sheet that are marked as protected cannot be edited.
  7740. * @property {Object} protectionOptions - A value that indicates the elements that you want users to be able to change.
  7741. * @property {boolean} [protectionOptions.allowSelectLockedCells] - True or undefined if the user can select locked cells.
  7742. * @property {boolean} [protectionOptions.allowSelectUnlockedCells] - True or undefined if the user can select unlocked cells.
  7743. * @property {boolean} [protectionOptions.allowSort] - True if the user can sort ranges.
  7744. * @property {boolean} [protectionOptions.allowFilter] - True if the user can filter ranges.
  7745. * @property {boolean} [protectionOptions.allowEditObjects] - True if the user can edit floating objects.
  7746. * @property {boolean} [protectionOptions.allowResizeRows] - True if the user can resize rows.
  7747. * @property {boolean} [protectionOptions.allowResizeColumns] - True if the user can resize columns.
  7748. * @property {boolean} [protectionOptions.allowDragInsertRows] - True if the user can drag to insert rows.
  7749. * @property {boolean} [protectionOptions.allowDragInsertColumns] - True if the user can drag to insert columns.
  7750. * @property {boolean} [protectionOptions.allowInsertRows] - True if the user can insert rows.
  7751. * @property {boolean} [protectionOptions.allowInsertColumns] - True if the user can insert columns.
  7752. * @property {boolean} [protectionOptions.allowDeleteRows] - True if the user can delete rows.
  7753. * @property {boolean} [protectionOptions.allowDeleteColumns] - True if the user can delete columns.
  7754. * @property {string} selectionBackColor - The selection's background color for the sheet.
  7755. * @property {string} selectionBorderColor - The selection's border color for the sheet.
  7756. * @property {Object} sheetAreaOffset - The sheetAreaOffset's options.
  7757. * @property {number} sheetAreaOffset.left - The offset left of sheet from host.
  7758. * @property {number} sheetAreaOffset.top - The offset top of sheet from host.
  7759. * @example
  7760. * sheet.setRowCount(2,GC.Spread.Sheets.SheetArea.colHeader);
  7761. * sheet.setColumnCount(2,GC.Spread.Sheets.SheetArea.rowHeader);
  7762. * sheet.setValue(0, 2,"Column",GC.Spread.Sheets.SheetArea.colHeader);
  7763. * sheet.options.colHeaderAutoTextIndex = 1;
  7764. * sheet.options.colHeaderAutoText = GC.Spread.Sheets.HeaderAutoText.numbers;
  7765. */
  7766. options: GC.Spread.Sheets.IWorksheetOptions;
  7767. /**
  7768. * Gets the outline column for the sheet.
  7769. * @returns {GC.Spread.Sheets.OutlineColumn.OutlineColumn}
  7770. */
  7771. outlineColumn: GC.Spread.Sheets.OutlineColumn.OutlineColumn;
  7772. /**
  7773. * Picture manager for the sheet.
  7774. * @type {GC.Spread.Sheets.FloatingObjects.FloatingObjectCollection}
  7775. * @example
  7776. * //This example adds a picture.
  7777. * activeSheet.pictures.add("f2","Event.png",2,2,10,10);
  7778. * var picture = activeSheet.pictures.get("f2");
  7779. * picture.pictureStretch(GC.Spread.Sheets.ImageLayout.center);
  7780. * picture.backColor("Blue");
  7781. * picture.borderWidth(2);
  7782. * picture.borderColor("Red");
  7783. * picture.borderStyle("dotted");
  7784. * picture.borderRadius(5);
  7785. */
  7786. pictures: GC.Spread.Sheets.FloatingObjects.FloatingObjectCollection;
  7787. /**
  7788. * Indicates the row range group.
  7789. * @type {GC.Spread.Sheets.Outlines.Outline}
  7790. */
  7791. rowOutlines: GC.Spread.Sheets.Outlines.Outline;
  7792. /**
  7793. * Shape manager for the sheet.
  7794. * @type {GC.Spread.Sheets.Shapes.ShapeCollection}
  7795. * @example
  7796. * //This example shows how to add a shape.
  7797. * var shape = activeSheet.shapes.add("shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 50, 100, 150);
  7798. */
  7799. shapes: GC.Spread.Sheets.Shapes.ShapeCollection;
  7800. /** The slicer manager.
  7801. * @type {GC.Spread.Sheets.Slicers.SlicerCollection}
  7802. * @example
  7803. * //This example adds a slicer.
  7804. * //create a table
  7805. * datas = [
  7806. * ["1", "NewYork", "1968/6/8", "80", "180"],
  7807. * ["4", "NewYork", "1972/7/3", "72", "168"],
  7808. * ["4", "NewYork", "1964/3/2", "71", "179"],
  7809. * ["5", "Washington", "1972/8/8","80", "171"],
  7810. * ["6", "Washington", "1986/2/2", "89", "161"],
  7811. * ["7", "Washington", "2012/2/15", "71", "240"]];
  7812. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  7813. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  7814. * table.setColumnName(0, dataColumns[0]);
  7815. * table.setColumnName(1, dataColumns[1]);
  7816. * table.setColumnName(2, dataColumns[2]);
  7817. * table.setColumnName(3, dataColumns[3]);
  7818. * table.setColumnName(4, dataColumns[4]);
  7819. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light4();
  7820. * //add a slicer to the sheet and return the slicer instance.
  7821. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Height");
  7822. * //change the slicer properties.
  7823. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  7824. * slicer.disableResizingAndMoving(true);
  7825. * slicer.style(style1);
  7826. */
  7827. slicers: GC.Spread.Sheets.Slicers.SlicerCollection;
  7828. /** The table manager.
  7829. * @type {GC.Spread.Sheets.Tables.TableManager}
  7830. * @example
  7831. * //This example creates a table.
  7832. * activeSheet.tables.add("Table1", 0, 0, 3, 3, GC.Spread.Sheets.Tables.TableThemes.dark1);
  7833. * activeSheet.getCell(0,0).text("Name");
  7834. * activeSheet.getCell(0,1).text("Value");
  7835. * activeSheet.getCell(0,2).text("T/F");
  7836. * activeSheet.getCell(1,0).text("AW");
  7837. * activeSheet.getCell(1,1).text("5");
  7838. * activeSheet.getCell(1,2).text("T");
  7839. */
  7840. tables: GC.Spread.Sheets.Tables.TableManager;
  7841. /**
  7842. * Adds the column or columns to the data model at the specified index.
  7843. * @param {number} col Column index at which to add the new columns.
  7844. * @param {number} count The number of columns to add.
  7845. * @example
  7846. * //This example adds columns.
  7847. * sheet.setValue(0, 0, "value");
  7848. * sheet.addRows(0, 2);
  7849. * sheet.addColumns(0, 2);
  7850. * sheet.setRowHeight(0, 50.0,GC.Spread.Sheets.SheetArea.viewport);
  7851. * sheet.setColumnWidth(0, 150.0,GC.Spread.Sheets.SheetArea.viewport);
  7852. * sheet.getRange(0, -1, 1, -1,GC.Spread.Sheets.SheetArea.viewport).backColor("Gray");
  7853. * sheet.getRange(-1, 0, -1, 1,GC.Spread.Sheets.SheetArea.viewport).backColor ("Brown");
  7854. */
  7855. addColumns(col: number, count: number): void;
  7856. /**
  7857. * Adds a custom function.
  7858. * @param {GC.Spread.CalcEngine.Functions.Function} fn The function to add.
  7859. */
  7860. addCustomFunction(fn: GC.Spread.CalcEngine.Functions.Function): void;
  7861. /**
  7862. * Adds a custom name.
  7863. * @param {string} name The custom name.
  7864. * @param {string} formula The formula.
  7865. * @param {number} baseRow The row index.
  7866. * @param {number} baseCol The column index.
  7867. * @param {string} comment The comment.
  7868. * @example
  7869. * //This example creates custom names.
  7870. * sheet.setValue(0, 0, 1);
  7871. * sheet.setValue(0, 1, 2);
  7872. * sheet.setValue(0, 2, 3);
  7873. * sheet.addCustomName("customName1","=12", 0, 0);
  7874. * sheet.addCustomName("customName2","Average(20,45)", 0, 0);
  7875. * sheet.addCustomName("customName3", "=$A$1:$C$1", 0, 0);
  7876. * sheet.setFormula(1, 0, "customName1");
  7877. * sheet.setFormula(1, 1, "customName2");
  7878. * sheet.setFormula(1, 2, "sum(customName3)");
  7879. */
  7880. addCustomName(name: string, formula: string, baseRow: number, baseCol: number, comment: string): void;
  7881. /**
  7882. * Adds a style to the Worksheet named styles collection.
  7883. * @param {GC.Spread.Sheets.Style} style The style to be added.
  7884. * @example
  7885. * var namedStyle = new GC.Spread.Sheets.Style();
  7886. * namedStyle.name = "style1";
  7887. * namedStyle.backColor = "green";
  7888. * activeSheet.addNamedStyle(namedStyle);
  7889. * activeSheet.setStyleName(1, 1, "style1"); // cell(1,1)'s backColor is green.
  7890. * activeSheet.setStyleName(2, 1, "style1");
  7891. * var style = activeSheet.getNamedStyle("style1");
  7892. * style.foreColor = "red"; // the namedStyle's foreColor is red.
  7893. * activeSheet.repaint(); // the foreColor of the cell(1,1) and cell(2,1) is red.
  7894. * activeSheet.getCell(1,1).value("test");
  7895. * $("#button1").click(function () {
  7896. * activeSheet.removeNamedStyle("style1");
  7897. * });
  7898. */
  7899. addNamedStyle(style: GC.Spread.Sheets.Style): void;
  7900. /**
  7901. * Adds rows in this worksheet.
  7902. * @param {number} row The index of the starting row.
  7903. * @param {number} count The number of rows to add.
  7904. * @example
  7905. * //This example adds rows.
  7906. * sheet.setValue(0, 0, "value");
  7907. * sheet.addRows(0, 2);
  7908. * sheet.addColumns(0, 2);
  7909. * sheet.setRowHeight(0, 50.0,GC.Spread.Sheets.SheetArea.viewport);
  7910. * sheet.setColumnWidth(0, 150.0,GC.Spread.Sheets.SheetArea.viewport);
  7911. * sheet.getRange(0, -1, 1, -1,GC.Spread.Sheets.SheetArea.viewport).backColor("Gray");
  7912. * sheet.getRange(-1, 0, -1, 1,GC.Spread.Sheets.SheetArea.viewport).backColor ("Brown");
  7913. */
  7914. addRows(row: number, count: number): void;
  7915. /**
  7916. * Adds a cell or cells to the selection.
  7917. * @param {number} row The row index of the first cell to add.
  7918. * @param {number} column The column index of the first cell to add.
  7919. * @param {number} rowCount The number of rows to add.
  7920. * @param {number} columnCount The number of columns to add.
  7921. * @example
  7922. * //This example adds a selection and uses the selection in a rule.
  7923. * sheet.setValue(0,0, 1,3);
  7924. * sheet.setValue(1,0, 50,3);
  7925. * sheet.setValue(2,0, 100,3);
  7926. * sheet.setValue(3,0, 2,3);
  7927. * sheet.setValue(4,0, 60,3);
  7928. * sheet.setValue(5,0, 90,3);
  7929. * sheet.setValue(6,0, 3,3);
  7930. * sheet.setValue(7,0, 40,3);
  7931. * sheet.setValue(8,0, 70,3);
  7932. * sheet.setValue(9,0, 5,3);
  7933. * sheet.setValue(10,0, 35,3);
  7934. * sheet.addSelection(0,0,11,1);
  7935. * sheet.conditionalFormats.add3ScaleRule(1, 10, "red", 0, 50, "blue",2, 100, "yellow", sheet.getSelections());
  7936. */
  7937. addSelection(row: number, column: number, rowCount: number, columnCount: number): void;
  7938. /**
  7939. * Adds a span of cells to this sheet in the specified sheet area.
  7940. * @param {number} row The row index of the cell at which to start the span.
  7941. * @param {number} column The column index of the cell at which to start the span.
  7942. * @param {number} rowCount The number of rows to span.
  7943. * @param {number} colCount The number of columns to span.
  7944. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to <b>viewport</b>.
  7945. * @example
  7946. * //This example creates cell spans.
  7947. * sheet.setRowCount(4,1);
  7948. * sheet.setColumnCount(4,2);
  7949. * sheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.colHeader);
  7950. * sheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.rowHeader);
  7951. * sheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.viewport);
  7952. */
  7953. addSpan(row: number, col: number, rowCount: number, colCount: number, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  7954. /**
  7955. * Automatically fits the viewport column.
  7956. * @param {number} column The column index.
  7957. * @example
  7958. * //This example sets the column width based on the text.
  7959. * activeSheet.setValue(0, 1, "testing");
  7960. * activeSheet.autoFitColumn(1);
  7961. */
  7962. autoFitColumn(column: number): void;
  7963. /**
  7964. * Automatically fits the viewport row.
  7965. * @param {number} row The row index.
  7966. * @example
  7967. * //This example sets the row height based on the text.
  7968. * activeSheet.setValue(0, 1, "testing\r\nmultiple\r\nlines");
  7969. * activeSheet.getCell(0,1).wordWrap(true);
  7970. * activeSheet.autoFitRow(0);
  7971. */
  7972. autoFitRow(row: number): void;
  7973. /**
  7974. * Applies auto merge for a range.
  7975. * @param {GC.Spread.Sheets.Range} range The auto merge range.
  7976. * @param {GC.Spread.Sheets.AutoMerge.AutoMergeDirection} direction The auto merge direction. If this parameter is not provided, it defaults to <b>column</b>. Specially, if the direction is <b>none</b>, the auto merge for the range will be canceled.
  7977. * @param {GC.Spread.Sheets.AutoMerge.AutoMergeMode} mode The auto merge mode. If this parameter is not provided, it defaults to <b>free</b>.
  7978. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheet area of the auto merge range. If this parameter is not provided, it defaults to <b>viewport</b>.
  7979. * @returns {Array} If no parameter is provided, returns all auto merge range infos of current worksheet. Each range info contains range, direction, mode, sheetArea.
  7980. * @example
  7981. * var range = new GC.Spread.Sheets.Range(-1, 0, -1, 1);
  7982. * sheet.autoMerge(range);
  7983. */
  7984. autoMerge(range: GC.Spread.Sheets.Range, direction?: GC.Spread.Sheets.AutoMerge.AutoMergeDirection, mode?: GC.Spread.Sheets.AutoMerge.AutoMergeMode, sheetArea?: GC.Spread.Sheets.SheetArea): GC.Spread.Sheets.AutoMerge.IRangeInfo[];
  7985. /**
  7986. * Binds an event to the sheet.
  7987. * @param {string} type The event type.
  7988. * @param {Object} data Optional. Specifies additional data to pass along to the function.
  7989. * @param {Function} fn Specifies the function to run when the event occurs.
  7990. * @example
  7991. * //This example binds events.
  7992. * sheet.bind(GC.Spread.Sheets.Events.LeftColumnChanged,function(event,data)
  7993. * {
  7994. * var str = "----------------------------------------\n";
  7995. * var title = "Event [LeftColumnChanged ] Fired";
  7996. * str = str.substr(0, 4) + title + str.substr(4 + title.length);
  7997. * if (typeof data == "object") {
  7998. * for (var key in data) {
  7999. * str += key + " : " + data[key] + "\n";
  8000. * }
  8001. * } else {
  8002. * str += data + "\n";
  8003. * }
  8004. * alert(str);
  8005. * });
  8006. * sheet.bind(GC.Spread.Sheets.Events.TopRowChanged,function(event,data)
  8007. * {
  8008. * var str = "----------------------------------------\n";
  8009. * var title = "Event [TopRowChanged] Fired";
  8010. * str = str.substr(0, 4) + title + str.substr(4 + title.length);
  8011. * if (typeof data == "object") {
  8012. * for (var key in data) {
  8013. * str += key + " : " + data[key] + "\n";
  8014. * }
  8015. * } else {
  8016. * str += data + "\n";
  8017. * }
  8018. * alert(str);
  8019. * });
  8020. */
  8021. bind(type: string, data?: any, fn?: Function): void;
  8022. /**
  8023. * Binds the column using the specified data field.
  8024. * @param {number} index The column index.
  8025. * @param {string|Object} column Column information with data field. If its type is string, it is regarded as name.
  8026. * @example
  8027. * var test = [
  8028. * {"Series0":2,"Series1":1},
  8029. * {"Series0":4,"Series1":2},
  8030. * {"Series0":3,"Series1":4}
  8031. * ];
  8032. * sheet.setDataSource(test);
  8033. * sheet.bindColumn(1,"Series0");
  8034. * sheet.bindColumn(0,"Series1");
  8035. */
  8036. bindColumn(index: number, column: string | GC.Spread.Sheets.IColumn): void;
  8037. /**
  8038. * Binds the columns using the specified data fields.
  8039. * @param {Array} columns The array of column information with data fields. If an item's type is string, the item is regarded as name.
  8040. * @example
  8041. * var datasource = [
  8042. * { name: "Alice", age: 27, birthday: "1985/08/31", position: "Beijing", isMarried: false},
  8043. * { name: "Aimee", age: 28, birthday: "1984/07/31", position: "Xi'An", isMarried: true},
  8044. * { name: "Charles", age: 29, birthday: "1983/03/31", position: "ShangHai", isMarried: true},
  8045. * ];
  8046. * var colInfos = [
  8047. * { name: "name", displayName: "Name", size: 70, pageBread: false},
  8048. * { name: "age", displayName: "Age", size: 40, resizable: false },
  8049. * { name: "birthday", displayName: "Birthday", formatter: "d/M/yy", size: 120 },
  8050. * { name: "position", displayName: "Position", size: 50, visible: true, value: function (item){
  8051. * return 'China ' + item['position'];
  8052. * }},
  8053. * { name: "isMarried", displayName: "IsMarried", size: 50, visible: true, cellType: new GC.Spread.Sheets.CellTypes.CheckBox()}
  8054. * ];
  8055. * activeSheet.autoGenerateColumns = true;
  8056. * activeSheet.setDataSource(datasource);
  8057. * activeSheet.bindColumns(colInfos);
  8058. */
  8059. bindColumns(columns: GC.Spread.Sheets.IColumn[]): void;
  8060. /**
  8061. * Clears the specified area.
  8062. * @param {number} row The start row index.
  8063. * @param {number} column The start column index.
  8064. * @param {number} rowCount The number of rows to clear.
  8065. * @param {number} columnCount The number of columns to clear.
  8066. * @param {GC.Spread.Sheets.SheetArea} area The area to clear.
  8067. * @param {GC.Spread.Sheets.StorageType} storageType The clear type.
  8068. * @example
  8069. * //This example clears the data from the specified range.
  8070. * activeSheet.getCell(0,0).value("A1");
  8071. * activeSheet.clear(0,0,3,3,GC.Spread.Sheets.SheetArea.viewport,GC.Spread.Sheets.StorageType.data);
  8072. */
  8073. clear(row: number, column: number, rowCount: number, colCount: number, area: GC.Spread.Sheets.SheetArea, storageType: GC.Spread.Sheets.StorageType): void;
  8074. /**
  8075. * Clears all custom functions.
  8076. * @example
  8077. * //This example clears the custom functions from the active sheet.
  8078. * activeSheet.clearCustomFunctions();
  8079. */
  8080. clearCustomFunctions(): void;
  8081. /**
  8082. * Clears custom names.
  8083. * @example
  8084. * //This example creates custom names and then clears them.
  8085. * activeSheet.setValue(0, 0, 1);
  8086. * activeSheet.setValue(0, 1, 2);
  8087. * activeSheet.setValue(0, 2, 3);
  8088. * activeSheet.addCustomName("customName1","=12", 0, 0);
  8089. * activeSheet.addCustomName("customName2","Average(20,45)", 0, 0);
  8090. * activeSheet.addCustomName("customName3", "=$A$1:$C$1", 0, 0);
  8091. * activeSheet.setFormula(1, 0, "customName1");
  8092. * activeSheet.setFormula(1, 1, "customName2");
  8093. * activeSheet.setFormula(1, 2, "sum(customName3)");
  8094. * activeSheet.clearCustomNames();
  8095. */
  8096. clearCustomNames(): void;
  8097. /**
  8098. * Clears the dirty, insert, and delete status from the current worksheet.
  8099. */
  8100. clearPendingChanges(): void;
  8101. /**
  8102. * Clears the selection.
  8103. * @example
  8104. * //This example clears the selection.
  8105. * sheet.addSelection(4, 0, 2, 2);
  8106. * sheet.clearSelection();
  8107. */
  8108. clearSelection(): void;
  8109. /**
  8110. * Copies data from one range to another.
  8111. * @param {number} fromRow The source row.
  8112. * @param {number} fromColumn The source column.
  8113. * @param {number} toRow The target row.
  8114. * @param {number} toColumn The target column.
  8115. * @param {number} rowCount The row count.
  8116. * @param {number} columnCount The column count.
  8117. * @param {GC.Spread.Sheets.CopyToOptions} option The copy option.
  8118. * @example
  8119. * //This example copies data to the specified location.
  8120. * activeSheet.getCell(0,0).value("1");
  8121. * activeSheet.copyTo(0,0,1,1,2,2,GC.Spread.Sheets.CopyToOptions.value);
  8122. */
  8123. copyTo(fromRow: number, fromColumn: number, toRow: number, toColumn: number, rowCount: number, columnCount: number, option: GC.Spread.Sheets.CopyToOptions): void;
  8124. /**
  8125. * Gets or sets the current theme for the sheet.
  8126. * @param {string|GC.Spread.Common.Theme} value The theme name or the theme.
  8127. * @returns {GC.Spread.Sheets.Theme|GC.Spread.Sheets.Worksheet} If no value is set, returns the current theme; otherwise, returns the worksheet.
  8128. * @example
  8129. * //This example sets a theme.
  8130. * sheet.currentTheme("Civic");
  8131. */
  8132. currentTheme(value?: string | GC.Spread.Sheets.Theme): any;
  8133. /**
  8134. * Deletes the columns in this sheet at the specified index.
  8135. * @param {number} col The index of the first column to delete.
  8136. * @param {number} count The number of columns to delete.
  8137. * @example
  8138. * activeSheet.getCell(0,0).value("A1");
  8139. * activeSheet.getCell(0,4).value("Test")
  8140. * activeSheet.deleteColumns(0,2);
  8141. * activeSheet.deleteRows(3,1);
  8142. */
  8143. deleteColumns(col: number, count: number): void;
  8144. /**
  8145. * Deletes the rows in this worksheet at the specified index.
  8146. * @param {number} row The index of the first row to delete.
  8147. * @param {number} count The number of rows to delete.
  8148. * @example
  8149. * activeSheet.getCell(0,0).value("A1");
  8150. * activeSheet.getCell(0,4).value("Test")
  8151. * activeSheet.deleteColumns(0,2);
  8152. * activeSheet.deleteRows(3,1);
  8153. */
  8154. deleteRows(row: number, count: number): void;
  8155. /**
  8156. * Returns the editor's status.
  8157. * @returns {GC.Spread.Sheets.EditorStatus} The editor status.
  8158. */
  8159. editorStatus(): GC.Spread.Sheets.EditorStatus;
  8160. /**
  8161. * Stops editing the active cell.
  8162. * @param {boolean} ignoreValueChange If set to <c>true</c>, does not apply the edited text to the cell.
  8163. * @returns {boolean} <c>true</c> when able to stop cell editing successfully; otherwise, <c>false</c>.
  8164. * @example
  8165. * //This example removes the text "123" when typing in a cell.
  8166. * activeSheet.bind(GC.Spread.Sheets.Events.EditChange, function (sender,args) {
  8167. * if (args.editingText === "123") {
  8168. * activeSheet.endEdit(true);
  8169. * }
  8170. * });
  8171. */
  8172. endEdit(ignoreValueChange?: boolean): boolean;
  8173. /**
  8174. * Fills the specified range automatically.
  8175. * @param {GC.Spread.Sheets.Range} startRange The fill start range.
  8176. * @param {GC.Spread.Sheets.Range} wholeRange The entire range to fill.
  8177. * @param {Object} options The range fill information.
  8178. * @param {GC.Spread.Sheets.Fill.FillType} [options.fillType] - Specifies how to fill the specified range.
  8179. * GC.Spread.Sheets.Fill.FillType.direction:<br />
  8180. * Fills the specified range in the specified direction.<br />
  8181. * GC.Spread.Sheets.Fill.FillType.linear:<br />
  8182. * Fills the specified range using a linear trend when the source value type is number.<br />
  8183. * The next value is generated by the step and stop values.<br />
  8184. * The next value is computed by adding the step value to the current cell value.<br />
  8185. * GC.Spread.Sheets.Fill.FillType.growth:<br />
  8186. * Fills the specified range using a growth trend when the source value type is number.<br />
  8187. * The next value is generated by the step and stop values.<br />
  8188. * The next value is computed by multiplying the step value with the current cell.<br />
  8189. * GC.Spread.Sheets.Fill.FillType.date:<br />
  8190. * Fills the specified range when the source value type is date.<br />
  8191. * The next value is generated by adding the step value to the current value.<br />
  8192. * The step value is affected by the fill date unit.<br />
  8193. * GC.Spread.Sheets.Fill.FillType.auto:<br />
  8194. * Fills the specified range automatically.<br />
  8195. * When the value is a string, the value is copied to other cells.<br />
  8196. * When the value is a number, the new value is generated by the TREND formula.<br />
  8197. * @param {GC.Spread.Sheets.Fill.FillSeries} [options.series] - The fill series.
  8198. * @param {GC.Spread.Sheets.Fill.FillDirection} [options.direction] - direction The fill direction.
  8199. * @param {number} [options.step] step - The fill step value.
  8200. * @param {number|Date} [options.stop] stop - The fill stop value.
  8201. * @param {GC.Spread.Sheets.Fill.FillDateUnit} [options.unit] - unit The fill date unit.
  8202. * @example
  8203. * activeSheet.setValue(0, 0, 5);
  8204. * var start = new GC.Spread.Sheets.Range(0, 0, 1, 1);
  8205. * var r3 = new GC.Spread.Sheets.Range(0, 0, 4, 1);
  8206. * activeSheet.fillAuto(start,r3, {fillType:GC.Spread.Sheets.Fill.FillType.auto, series:GC.Spread.Sheets.Fill.FillSeries.column, direction:GC.Spread.Sheets.Fill.FillDirection.down});
  8207. */
  8208. fillAuto(startRange: GC.Spread.Sheets.Range, wholeRange: GC.Spread.Sheets.Range, options: GC.Spread.Sheets.Fill.IFillOptions): void;
  8209. /**
  8210. * Loads the object state from the specified JSON string.
  8211. * @param {Object} sheetSettings The sheet data from deserialization.
  8212. * @example
  8213. * //This example uses the fromJSON method.
  8214. * activeSheet.getCell(0,0).value(123);
  8215. * var jsonStr = null;
  8216. * //export
  8217. * jsonStr = JSON.stringify(activeSheet.toJSON());
  8218. * //import
  8219. * activeSheet.fromJSON(JSON.parse(jsonStr));
  8220. * alert(jsonStr);
  8221. */
  8222. fromJSON(sheetSettings: Object): void;
  8223. /**
  8224. * Gets or sets the number of frozen columns of the sheet.
  8225. * @param {number} [colCount] The number of columns to freeze.
  8226. * @returns {number|GC.Spread.Sheets.Worksheet} If no value is set, returns the number of frozen columns; otherwise, returns the worksheet.
  8227. * @example
  8228. * sheet.frozenColumnCount(1);
  8229. */
  8230. frozenColumnCount(colCount?: number): any;
  8231. /**
  8232. * Gets or sets the number of frozen rows of the sheet.
  8233. * @param {number} [rowCount] The number of rows to freeze.
  8234. * @returns {number|GC.Spread.Sheets.Worksheet} If no value is set, returns the number of frozen rows; otherwise, returns the worksheet.
  8235. * @example
  8236. * sheet.frozenRowCount(1);
  8237. */
  8238. frozenRowCount(rowCount?: number): any;
  8239. /**
  8240. * Gets or sets the number of trailing frozen columns of the sheet.
  8241. * @param {number} [colCount] The number of columns to freeze at the right side of the sheet.
  8242. * @returns {number|GC.Spread.Sheets.Worksheet} If no value is set, returns the number of trailing frozen columns; otherwise, returns the worksheet.
  8243. * @example
  8244. * sheet.frozenTrailingColumnCount(1);
  8245. */
  8246. frozenTrailingColumnCount(colCount?: number): any;
  8247. /**
  8248. * Gets or sets the number of trailing frozen rows of the sheet.
  8249. * @param {number} [rowCount] The number of rows to freeze at the bottom of the sheet.
  8250. * @returns {number|GC.Spread.Sheets.Worksheet} If no value is set, returns the number of trailing frozen rows; otherwise, returns the worksheet.
  8251. * @example
  8252. * sheet.frozenTrailingRowCount(1);
  8253. */
  8254. frozenTrailingRowCount(rowCount?: number): any;
  8255. /**
  8256. * Gets the active column index for this sheet.
  8257. * @returns {number} The column index of the active cell.
  8258. * @example
  8259. * //This example gets the active column.
  8260. * sheet.setActiveCell(5,5);
  8261. * alert(sheet.getActiveColumnIndex());
  8262. * alert(sheet.getActiveRowIndex());
  8263. * spread.bind(GC.Spread.Sheets.Events.EnterCell, function (event, data) {
  8264. * alert(data.col);
  8265. * alert(data.row);
  8266. * });
  8267. * spread.bind(GC.Spread.Sheets.Events.LeaveCell, function (event, data) {
  8268. * alert(data.col);
  8269. * alert(data.row);
  8270. * });
  8271. */
  8272. getActiveColumnIndex(): number;
  8273. /**
  8274. * Gets the active row index for this sheet.
  8275. * @returns {number} The row index of the active cell.
  8276. * @example
  8277. * //This example gets the active row.
  8278. * sheet.setActiveCell(5,5);
  8279. * alert(sheet.getActiveColumnIndex());
  8280. * alert(sheet.getActiveRowIndex());
  8281. * spread.bind(GC.Spread.Sheets.Events.EnterCell, function (event, data) {
  8282. * alert(data.col);
  8283. * alert(data.row);
  8284. * });
  8285. * spread.bind(GC.Spread.Sheets.Events.LeaveCell, function (event, data) {
  8286. * alert(data.col);
  8287. * alert(data.row);
  8288. * });
  8289. */
  8290. getActiveRowIndex(): number;
  8291. /**
  8292. * Gets the actual style information for a specified cell in the specified sheet area.
  8293. * @param {number} row The row index.
  8294. * @param {number} column The column index.
  8295. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  8296. * @param {boolean} [sheetStyleOnly] If <c>true</c>, the row filter and the conditional format style are not applied to the return style;
  8297. * otherwise, the return style only contains the cell's inherited style.
  8298. * @returns {GC.Spread.Sheets.Style} Returns the cell style of the specified cell.
  8299. * @example
  8300. * //This example uses the getActualStyle method.
  8301. * var style = new GC.Spread.Sheets.Style();
  8302. * style.backColor = "red";
  8303. * style.borderLeft =new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  8304. * style.borderTop = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  8305. * style.borderRight = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  8306. * style.borderBottom = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  8307. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  8308. * var cstyle = activeSheet.getActualStyle(1,1,GC.Spread.Sheets.SheetArea.viewport, true);
  8309. * alert(cstyle.backColor);
  8310. */
  8311. getActualStyle(row: number, column: number, sheetArea?: GC.Spread.Sheets.SheetArea, sheetStyleOnly?: boolean): GC.Spread.Sheets.Style;
  8312. /**
  8313. * Gets an object array from a specified range of cells.
  8314. * @param {number} row The row index.
  8315. * @param {number} column The column index.
  8316. * @param {number} rowCount The row count.
  8317. * @param {number} colCount The column count.
  8318. * @param {boolean} getFormula If <c>true</c>, return formulas; otherwise, return values.
  8319. * @returns {Array.<Array.<Object>>} The object array from the specified range of cells.
  8320. * @example
  8321. * //This example uses the getArray method.
  8322. * //set value
  8323. * var array = [[1,2,3],[4,5],[6,7,8,9]];
  8324. * activeSheet.setArray(1, 2, array);
  8325. * //set formula
  8326. * var array = [["=1+1","=2+2","=3+3"],["=4+4","=5+5"],["=6+6","=7+7","=8+8","=9+9"]];
  8327. * activeSheet.setArray(1, 2, array, true);
  8328. * //get value
  8329. * var newArray = activeSheet.getArray(1, 2, 3, 4);
  8330. * //getformula
  8331. * var newArray = activeSheet.getArray(1, 2, 3, 4, true);
  8332. * //alert(newArray[0]);
  8333. */
  8334. getArray(row: number, column: number, rowCount: number, columnCount: number, getFormula?: boolean): any[];
  8335. /**
  8336. * Gets the binding path of cell-level binding from the specified cell in the specified sheet area.
  8337. * @param {number} row The row index.
  8338. * @param {number} col The column index.
  8339. * @returns {string} Returns the binding path of the cell for cell-level binding.
  8340. * @example
  8341. * //This example uses the getBindingPath method.
  8342. * var person = {name: "Wang feng", age: 25, address: {postcode: "710075"}};
  8343. * var source = new GC.Spread.Sheets.Bindings.CellBindingSource(person);
  8344. * activeSheet.setBindingPath(0, 0, "name");
  8345. * activeSheet.setBindingPath(1, 1, "age");
  8346. * activeSheet.setBindingPath(3, 3, "address.postcode");
  8347. * activeSheet.setDataSource(source);
  8348. * alert(activeSheet.getBindingPath(0, 0, GC.Spread.Sheets.SheetArea.viewport));
  8349. */
  8350. getBindingPath(row: number, col: number): string;
  8351. /**
  8352. * Gets the specified cell in the specified sheet area.
  8353. * @param {number} row The row index.
  8354. * @param {number} col The column index.
  8355. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheet area. If this parameter is not given, it defaults to <b>viewport</b>.
  8356. * @returns {GC.Spread.Sheets.CellRange} The cell.
  8357. * @example
  8358. * //This example gets the cell.
  8359. * activeSheet.getCell(1,1).text("cell object");
  8360. */
  8361. getCell(row: number, col: number, sheetArea?: GC.Spread.Sheets.SheetArea): GC.Spread.Sheets.CellRange;
  8362. /**
  8363. * Gets the rectangle of the cell.
  8364. * @param {number} row The row index.
  8365. * @param {number} col The column index.
  8366. * @param {number} [rowViewportIndex] Index of the row of the viewport: -1 represents column header area, 0 represents frozen row area, 1 represents viewport area, 2 represents trailing frozen row area.
  8367. * @param {number} [colViewportIndex] Index of the column of the viewport: -1 represents row header area, 0 represents frozen column area, 1 represents viewport area, 2 represents trailing frozen column area.
  8368. * @returns {GC.Spread.Sheets.Rect} Object that contains the size and location of the cell rectangle.
  8369. * @example
  8370. * //This example uses the getCellRect method.
  8371. * activeSheet.bind(GC.Spread.Sheets.Events.CellClick, function (e, info) {
  8372. * if (info.sheetArea === GC.Spread.Sheets.SheetArea.viewport) {
  8373. * alert("Clicked cell index (" + info.row + "," + info.col + ")");
  8374. * //Acquire the coordinate information of regular cells which exist at the specified index position
  8375. * var cellRect = activeSheet.getCellRect(info.row, info.col);
  8376. * alert("X coordinate:" + cellRect.x);
  8377. * alert("Y coordinate:" + cellRect.y);
  8378. * alert("Cell width:" + cellRect.width);
  8379. * alert("Cell height:" + cellRect.height);
  8380. * }
  8381. * });
  8382. */
  8383. getCellRect(row: number, col: number, rowViewportIndex?: number, colViewportIndex?: number): GC.Spread.Sheets.Rect;
  8384. /**
  8385. * Gets the cell type.
  8386. * @param {number} row The row index.
  8387. * @param {number} col The column index.
  8388. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  8389. * @returns {GC.Spread.Sheets.CellTypes.Base} Returns the cell type for the specified cell.
  8390. * @example
  8391. * //This example gets the cell type.
  8392. * var cellType = new GC.Spread.Sheets.CellTypes.Button();
  8393. * cellType.buttonBackColor("#FFFF00");
  8394. * cellType.text("this is a button");
  8395. * activeSheet.getCell(0, 2).cellType(cellType);
  8396. * var cellType = activeSheet.getCellType(0,2,GC.Spread.Sheets.SheetArea.viewport)
  8397. * if (cellType instanceof GC.Spread.Sheets.CellTypes.Button) {
  8398. * alert("This is a ButtonCellType");
  8399. * }
  8400. */
  8401. getCellType(row: number, col: number, sheetArea?: GC.Spread.Sheets.SheetArea): GC.Spread.Sheets.CellTypes.Base;
  8402. /**
  8403. * Gets the column count in the specified sheet area.
  8404. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to <b>viewport</b>.
  8405. * @returns {number} The number of columns.
  8406. * @example
  8407. * //This example gets the number of columns.
  8408. * var count = activeSheet.getColumnCount(GC.Spread.Sheets.SheetArea.viewport);
  8409. * alert(count);
  8410. */
  8411. getColumnCount(sheetArea?: GC.Spread.Sheets.SheetArea): number;
  8412. /**
  8413. * Gets whether a forced page break is inserted before the specified column on this sheet when printing.
  8414. * @param {number} column The column index.
  8415. * @returns {boolean} <c>true</c> if a forced page break is inserted before the specified column; otherwise, <c>false</c>.
  8416. */
  8417. getColumnPageBreak(column: number): boolean;
  8418. /**
  8419. * Gets a value that indicates whether the user can resize a specified column in the specified sheet area.
  8420. * @param {number} col The column index.
  8421. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to <b>viewport</b>.
  8422. * @returns {boolean} <c>true</c> if the user can resize the specified column; otherwise, <c>false</c>.
  8423. * @example
  8424. * //This example gets whether the column is resizable.
  8425. * sheet.setRowCount(10);
  8426. * sheet.setColumnCount(7);
  8427. * sheet.setValue(0, 0,"Western");
  8428. * sheet.setValue(0, 1,"Western");
  8429. * sheet.setValue(0, 2,"Western");
  8430. * sheet.setValue(1, 0,"A");
  8431. * sheet.setValue(1, 1,"B");
  8432. * sheet.setValue(1, 2,"C");
  8433. * sheet.setColumnResizable(0,true, GC.Spread.Sheets.SheetArea.colHeader);
  8434. * sheet.setRowResizable(0,true, GC.Spread.Sheets.SheetArea.rowHeader);
  8435. * alert( sheet.getColumnResizable(0));
  8436. * alert( sheet.getRowResizable(0, GC.Spread.Sheets.SheetArea.rowHeader));
  8437. */
  8438. getColumnResizable(col: number, sheetArea?: GC.Spread.Sheets.SheetArea): boolean;
  8439. /**
  8440. * Gets whether a column in the specified sheet area is displayed.
  8441. * @param {number} col The column index.
  8442. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to <b>viewport</b>.
  8443. * @returns {boolean} <c>true</c> if the column is visible in the sheet area; otherwise, <c>false</c>.
  8444. * @example
  8445. * //This example returns the visible and width settings for a column.
  8446. * var visible = activeSheet.getColumnVisible(1, GC.Spread.Sheets.SheetArea.viewport);
  8447. * var width = activeSheet.getColumnWidth(1, GC.Spread.Sheets.SheetArea.viewport);
  8448. * alert(visible);
  8449. * alert(width);
  8450. */
  8451. getColumnVisible(col: number, sheetArea?: GC.Spread.Sheets.SheetArea): boolean;
  8452. /**
  8453. * Gets the width in pixels or the dynamic size for the specified column in the specified sheet area.
  8454. * @param {number} col The column index.
  8455. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to viewport.
  8456. * @param {boolean} [getDynamicSize] Whether get the dynamic size. If not given, it defaults to false. If this parameter is true, and dynamic size is not set, will return undefined.
  8457. * @returns {number | string} The column width in pixels or the dynamic size.
  8458. * @example
  8459. * //This example returns the visible and width settings for a column.
  8460. * var visible = activeSheet.getColumnVisible(1, GC.Spread.Sheets.SheetArea.viewport);
  8461. * var width = activeSheet.getColumnWidth(1, GC.Spread.Sheets.SheetArea.viewport);
  8462. * alert(visible);
  8463. * alert(width);
  8464. */
  8465. getColumnWidth(col: number, sheetArea?: GC.Spread.Sheets.SheetArea, getDynamicSize?: boolean): any;
  8466. /**
  8467. * Gets delimited text from a range.
  8468. * @param {number} row The start row.
  8469. * @param {number} column The start column.
  8470. * @param {number} rowCount The row count.
  8471. * @param {number} columnCount The column count.
  8472. * @param {string} rowDelimiter The row delimiter that is appended to the end of the row.
  8473. * @param {string} columnDelimiter The column delimiter that is appended to the end of the column.
  8474. * @returns {string} The text from the range with the specified delimiters.
  8475. */
  8476. getCsv(row: number, column: number, rowCount: number, columnCount: number, rowDelimiter: string, columnDelimiter: string): string;
  8477. /**
  8478. * Gets a custom function.
  8479. * @param {string} fnName The custom function name.
  8480. * @returns {GC.Spread.CalcEngine.Functions.Function} The custom function.
  8481. */
  8482. getCustomFunction(name: string): void;
  8483. /**
  8484. * Gets the specified custom name information.
  8485. * @param {string} fnName The custom name.
  8486. * @returns {GC.Spread.Sheets.NameInfo} The information for the specified custom name.
  8487. * @example
  8488. * //This example gets the custom name and formula.
  8489. * activeSheet.setValue(0, 0, 1);
  8490. * activeSheet.setValue(0, 1, 2);
  8491. * activeSheet.setValue(0, 2, 3);
  8492. * activeSheet.addCustomName("customName1", "=12", 0, 0);
  8493. * activeSheet.addCustomName("customName2", "Average(20,45)", 0, 0);
  8494. * activeSheet.addCustomName("customName3", "=$A$1:$C$1");
  8495. * activeSheet.setFormula(1, 0, "customName1");
  8496. * activeSheet.setFormula(1, 1, "customName2");
  8497. * activeSheet.setFormula(1, 2, "sum(customName3)");
  8498. * $("#button1").click(function () {
  8499. * var cname = activeSheet.getCustomName("customName2");
  8500. * if (cname instanceof GC.Spread.Sheets.NameInfo) {
  8501. * //get CustomName
  8502. * var name = cname.getName();
  8503. * //get Expression
  8504. * var expression = cname.getExpression();
  8505. * //get Expression String
  8506. * var expStr = GC.Spread.Sheets.CalcEngine.expressionToFormula(activeSheet, expression, 0, 0);
  8507. * alert("Name:" + name + ";Expression: =" + expStr);
  8508. * }
  8509. * });
  8510. */
  8511. getCustomName(name: string): GC.Spread.Sheets.NameInfo;
  8512. /**
  8513. * Gets all custom name information.
  8514. * @returns {Array.<GC.Spread.Sheets.NameInfo>} The type GC.Spread.Sheets.NameInfo stored in an array.
  8515. */
  8516. getCustomNames(): GC.Spread.Sheets.NameInfo[];
  8517. /**
  8518. * Gets the column name at the specified position.
  8519. * @param {number} column The column index for which the name is requested.
  8520. * @returns {string} The column name for data binding.
  8521. * @example
  8522. * //This example returns the name for the specified bound column.
  8523. * var test = [
  8524. * {"Series0":2,"Series1":1},
  8525. * {"Series0":4,"Series1":2},
  8526. * {"Series0":3,"Series1":4}
  8527. * ];
  8528. * activeSheet.setDataSource(test);
  8529. * activeSheet.bindColumn(1,"Series0");
  8530. * activeSheet.bindColumn(0,"Series1");
  8531. * var colname = activeSheet.getDataColumnName(0);
  8532. * alert(colname);
  8533. */
  8534. getDataColumnName(column: number): string;
  8535. /**
  8536. * Gets the data item.
  8537. * @param {number} row The row index.
  8538. * @returns {Object} The row data.
  8539. * @example
  8540. * //This example uses the getDataItem method.
  8541. * var test = [
  8542. * { "Series0": 2, "Series1": 1 },
  8543. * { "Series0": 4, "Series1": 2 },
  8544. * { "Series0": 3, "Series1": 4 }
  8545. * ];
  8546. * activeSheet.autoGenerateColumns = true;
  8547. * activeSheet.setDataSource(test, false);
  8548. * alert(JSON.stringify(activeSheet.getDataItem(0)));
  8549. */
  8550. getDataItem(row: number): any;
  8551. /**
  8552. * Gets the data source that populates the sheet.
  8553. * @function
  8554. * @returns {Object} Returns the data source.
  8555. * @example
  8556. * var test = [
  8557. * {"Series0":2,"Series1":1},
  8558. * {"Series0":4,"Series1":2},
  8559. * {"Series0":3,"Series1":4}
  8560. * ];
  8561. * activeSheet.setDataSource(test);
  8562. * alert(activeSheet.getDataSource);
  8563. */
  8564. getDataSource(): any;
  8565. /**
  8566. * Gets the cell data validator.
  8567. * @param {number} row The row index.
  8568. * @param {number} col The column index.
  8569. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  8570. * @returns {GC.Spread.Sheets.DataValidation.DefaultDataValidator} Returns the cell data validator for the specified cell.
  8571. * @example
  8572. * spread.options.highlightInvalidData = true;
  8573. * var dv = GC.Spread.Sheets.DataValidation.createListValidator("1,2,3");
  8574. * dv.showInputMessage(true);
  8575. * dv.inputMessage("Value must be 1,2 or 3");
  8576. * dv.inputTitle("tip");
  8577. * activeSheet.setDataValidator(1,1,1,1,dv,GC.Spread.Sheets.SheetArea.viewport);
  8578. * alert(activeSheet.getDataValidator(1,1).getValidList(activeSheet,1,1));
  8579. */
  8580. getDataValidator(row: number, col: number, sheetArea: GC.Spread.Sheets.SheetArea): GC.Spread.Sheets.DataValidation.DefaultDataValidator;
  8581. /**
  8582. * Gets the default style information for the sheet.
  8583. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  8584. * @returns {GC.Spread.Sheets.Style} Returns the sheet's default style.
  8585. * @example
  8586. * //This example uses the getDefaultStyle method.
  8587. * var defaultStyle = new GC.Spread.Sheets.Style();
  8588. * defaultStyle.backColor = "LemonChiffon";
  8589. * defaultStyle.foreColor = "Red";
  8590. * defaultStyle.borderLeft = new GC.Spread.Sheets.LineBorder("Green");
  8591. * defaultStyle.borderTop = new GC.Spread.Sheets.LineBorder("Green");
  8592. * defaultStyle.borderRight = new GC.Spread.Sheets.LineBorder("Green");
  8593. * defaultStyle.borderBottom = new GC.Spread.Sheets.LineBorder("Green");
  8594. * activeSheet.setDefaultStyle(defaultStyle, GC.Spread.Sheets.SheetArea.viewport);
  8595. * var cstyle = activeSheet.getDefaultStyle(GC.Spread.Sheets.SheetArea.viewport);
  8596. * alert(cstyle.backColor);
  8597. */
  8598. getDefaultStyle(sheetArea?: GC.Spread.Sheets.SheetArea): GC.Spread.Sheets.Style;
  8599. /**
  8600. * Gets the deleted row collection.
  8601. * @return {Array.<Object>} The deleted rows collection. the item in array contains two properties, row.row: specifies deleted row index, row.originalItem: specifies deleted data item.
  8602. */
  8603. getDeletedRows(): any[];
  8604. /**
  8605. * Gets the dependent CellRange information object array of the cell.
  8606. * @param {number} row The row index.
  8607. * @param {number} col The column index.
  8608. * @returns {Array.<Object>} Returns dependent cell information object array
  8609. * dependentsInfo.row {number} Indicates the cellRange row index.
  8610. * dependentsInfo.col {number} Indicates the cellRange col index.
  8611. * dependentsInfo.rowCount {number} Indicates the cellRange row count.
  8612. * dependentsInfo.colCount {number} Indicates the cellRange colcount.
  8613. * dependentsInfo.sheetName {string} Indicates the workSheet name.
  8614. * @example
  8615. * sheet.getDependents(1, 1);
  8616. */
  8617. getDependents(row: number, col: number): GC.Spread.Sheets.ICellsInfo[];
  8618. /**
  8619. * Gets the dirty cell collection.
  8620. * @param {number} row The row index.
  8621. * @param {number} col The column index.
  8622. * @param {number} rowCount The number of rows in the range of dirty cells.
  8623. * @param {number} colCount The number of columns in the range of dirty cells.
  8624. * @return {Array} The dirty cells.
  8625. */
  8626. getDirtyCells(row: number, col: number, rowCount: number, colCount: number): GC.Spread.Sheets.IDirtyCellInfo[];
  8627. /**
  8628. * Gets the dirty row collection.
  8629. * @returns {Array.<Object>} The dirty rows collection, the item in array contains three properties, row.row: specifies row index, row.item: specifies data item of current row, row.originalItem: specifies original data item of the row.
  8630. */
  8631. getDirtyRows(): any[];
  8632. /**
  8633. * Gets the cell formatter.
  8634. * @param {number} row The row index.
  8635. * @param {number} col The column index.
  8636. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  8637. * @returns {string|GC.Spread.Formatter.FormatterBase} Returns the cell formatter string or object for the specified cell.
  8638. * @example
  8639. * //This example returns the format object for the active sheet.
  8640. * activeSheet.getCell(0, 1).formatter("M");
  8641. * activeSheet.setValue(0, 1, new Date(2011, 2, 9));
  8642. * var style = activeSheet.getFormatter(0,1,GC.Spread.Sheets.SheetArea.viewport);
  8643. * alert(style);
  8644. */
  8645. getFormatter(row: number, col: number, sheetArea: GC.Spread.Sheets.SheetArea): any;
  8646. /**
  8647. * Gets the formula in the specified cell in this sheet.
  8648. * @param {number} row The row index.
  8649. * @param {number} col The column index.
  8650. * @returns {string} Returns the formula string.
  8651. * @example
  8652. * //This example returns the formula in the specified cell.
  8653. * activeSheet.setValue(0,0,1);
  8654. * activeSheet.setValue(0,1,2);
  8655. * activeSheet.setValue(0,2,10);
  8656. * activeSheet.getCell(1,1).formula("=SUM(A1:C1)");
  8657. * var formula = activeSheet.getFormula(1,1);
  8658. * alert(formula);
  8659. */
  8660. getFormula(row: number, col: number): string;
  8661. /**
  8662. * Gets the formula detail information in the specified cell in this sheet.
  8663. * @param {number} row The row index.
  8664. * @param {number} col The column index.
  8665. * @returns {Object} formulaInfo - Returns the formula information about the cell.
  8666. * formulaInfo.hasFormula {boolean} Indicates whether there is a formula in the cell.
  8667. * formulaInfo.isArrayFormula {boolean} Indicates whether the formula is an array formula.
  8668. * formulaInfo.formula {string} The formula string.
  8669. * formulaInfo.formulaWithCulture {string} The formula string with culture.
  8670. * @example
  8671. * activeSheet.setValue(0,0,1);
  8672. * activeSheet.setValue(0,1,2);
  8673. * activeSheet.setValue(0,2,10);
  8674. * activeSheet.getCell(1,1).formula("=SUM(A1:C1)");
  8675. * var test = activeSheet.getFormulaInformation(1,1, GC.Spread.Sheets.SheetArea.viewport);
  8676. * alert(test.formula);
  8677. */
  8678. getFormulaInformation(row: number, col: number): GC.Spread.Sheets.IFormulaInfo;
  8679. /**
  8680. * Sets the hyperlink data for the specified cell in the specified sheet area.
  8681. * @param {number} row The row index.
  8682. * @param {number} col The column index.
  8683. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  8684. * @example
  8685. * //This example uses the getHyperlink method.
  8686. * let firstHyperlinkData = sheet.getHyperlink(0, 2, GC.Spread.Sheets.SheetArea.viewport);
  8687. * let secondHyperlinkData = sheet.setHyperlink(1, 1, GC.Spread.Sheets.SheetArea.viewport);
  8688. */
  8689. getHyperlink(row: number, col: number, sheetArea?: GC.Spread.Sheets.SheetArea): GC.Spread.Sheets.IHyperlink;
  8690. /**
  8691. * Gets the inserted row collection.
  8692. * @returns {Array.<Object>} The inserted rows collection, the item in array contains two properties, row.row: specifies insert row index, row.item: specifies insert data item.
  8693. */
  8694. getInsertRows(): any[];
  8695. /**
  8696. * Gets a style from the Worksheet named styles collection which has the specified name.
  8697. * @param {string} name The name of the style to return.
  8698. * @returns {GC.Spread.Sheets.Style} Returns the specified named style.
  8699. */
  8700. getNamedStyle(name: string): GC.Spread.Sheets.Style;
  8701. /**
  8702. * Gets named styles from the Worksheet.
  8703. * @returns {Array.<GC.Spread.Sheets.Style>} The GC.Spread.Sheets.Style array of named styles.
  8704. */
  8705. getNamedStyles(): GC.Spread.Sheets.Style[];
  8706. /**
  8707. * Gets the parent Spread object of the current sheet.
  8708. * @returns {GC.Spread.Sheets.Workbook} Returns the parent Spread object of the current sheet.
  8709. */
  8710. getParent(): GC.Spread.Sheets.Workbook;
  8711. /**
  8712. * Gets the precedent CellRange information object array of the cell.
  8713. * @param {number} row The row index.
  8714. * @param {number} col The column index.
  8715. * @returns {Array.<Object>} Returns precedent cellRange information object array
  8716. * precedentsInfo.row {number} Indicates the cellRange row index.
  8717. * precedentsInfo.col {number} Indicates the cellRange col index.
  8718. * precedentsInfo.rowCount {number} Indicates the cellRange row count.
  8719. * precedentsInfo.colCount {number} Indicates the cellRange colcount.
  8720. * precedentsInfo.sheetName {string} Indicates the workSheet name.
  8721. * @example
  8722. * sheet.getPrecedents(1, 1);
  8723. */
  8724. getPrecedents(row: number, col: number): GC.Spread.Sheets.ICellsInfo[];
  8725. /**
  8726. * Gets a range of cells in the specified sheet area.
  8727. * @param {number} row The row index.
  8728. * @param {number} col The column index.
  8729. * @param {number} rowCount The row count of the range. If you do not provide this parameter, it defaults to <b>1</b>.
  8730. * @param {number} colCount The column count of the range. If you do not provide this parameter, it defaults to <b>1</b>.
  8731. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheet area. If this parameter is not given, it defaults to <b>viewport</b>.
  8732. * @returns {GC.Spread.Sheets.CellRange} The cellRange.
  8733. * If row is -1 and rowCount is -1, the range represents columns. For example, sheet.getRange(-1,4,-1,6) returns the columns "E:J".
  8734. * If col is -1 and colCount is -1, the range represents rows. For example, sheet.getRange(4,-1,6,-1) returns the rows "5:10".
  8735. */
  8736. getRange(row: number, col: number, rowCount?: number, colCount?: number, sheetArea?: GC.Spread.Sheets.SheetArea): GC.Spread.Sheets.CellRange;
  8737. /**
  8738. * Gets the row count in the specified sheet area.
  8739. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to <b>viewport</b>.
  8740. * @returns {number} The number of rows.
  8741. * @example
  8742. * //This example gets the row count.
  8743. * var count = activeSheet.getRowCount(GC.Spread.Sheets.SheetArea.viewport);
  8744. * alert(count);
  8745. */
  8746. getRowCount(sheetArea?: GC.Spread.Sheets.SheetArea): number;
  8747. /**
  8748. * Gets the height in pixels or the dynamic size for the specified row in the specified sheet area.
  8749. * @param {number} row The row index.
  8750. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to <b>viewport</b>.
  8751. * @param {boolean} [getDynamicSize] Whether get the dynamic size. If not given, it defaults to false. If this parameter is true, and dynamic size is not set, will return undefined.
  8752. * @returns {number | string} The row height in pixels or the dynamic size.
  8753. * @example
  8754. * //This example returns the height for the specified row.
  8755. * var rheight = activeSheet.getRowHeight(1,GC.Spread.Sheets.SheetArea.viewport);
  8756. * alert(rheight);
  8757. */
  8758. getRowHeight(row: number, sheetArea?: GC.Spread.Sheets.SheetArea, getDynamicSize?: boolean): any;
  8759. /**
  8760. * Gets whether a forced page break is inserted before the specified row on this sheet when printing.
  8761. * @param {number} row The row index.
  8762. * @returns {boolean} <c>true</c> if a forced page break is inserted before the specified row; otherwise, <c>false</c>.
  8763. */
  8764. getRowPageBreak(row: number): boolean;
  8765. /**
  8766. * Gets a value that indicates whether users can resize the specified row in the specified sheet area.
  8767. * @param {number} row The row index.
  8768. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to <b>viewport</b>.
  8769. * @returns {boolean} <c>true</c> if the users can resize the specified row; otherwise, <c>false</c>.
  8770. * @example
  8771. * //This example gets whether the row is resizable.
  8772. * sheet.setRowCount(10);
  8773. * sheet.setColumnCount(7);
  8774. * sheet.setValue(0, 0,"Western");
  8775. * sheet.setValue(0, 1,"Western");
  8776. * sheet.setValue(0, 2,"Western");
  8777. * sheet.setValue(1, 0,"A");
  8778. * sheet.setValue(1, 1,"B");
  8779. * sheet.setValue(1, 2,"C");
  8780. * sheet.setColumnResizable(0,true, GC.Spread.Sheets.SheetArea.colHeader);
  8781. * sheet.setRowResizable(0,true, GC.Spread.Sheets.SheetArea.rowHeader);
  8782. * alert( sheet.getColumnResizable(0));
  8783. * alert( sheet.getRowResizable(0, GC.Spread.Sheets.SheetArea.rowHeader));
  8784. */
  8785. getRowResizable(row: number, sheetArea?: GC.Spread.Sheets.SheetArea): boolean;
  8786. /**
  8787. * Gets whether the control displays the specified row.
  8788. * @param {number} row The row index.
  8789. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to <b>viewport</b>.
  8790. * @returns {boolean} <c>true</c> if the row is visible in the sheet area; otherwise, <c>false</c>.
  8791. * @example
  8792. * //This example returns the visible setting for the specified row.
  8793. * rvisible = activeSheet.getRowVisible(1,GC.Spread.Sheets.SheetArea.viewport);
  8794. * alert(rvisible);
  8795. */
  8796. getRowVisible(row: number, sheetArea?: GC.Spread.Sheets.SheetArea): boolean;
  8797. /**
  8798. * Gets the selections in the current sheet.
  8799. * @returns {Array.<GC.Spread.Sheets.Range>} The type GC.Spread.Sheets.Range is stored in an Array.
  8800. */
  8801. getSelections(): GC.Spread.Sheets.Range[];
  8802. /**
  8803. * Gets the spans in the specified range in the specified sheet area.
  8804. * @param {GC.Spread.Sheets.Range} range The cell range.
  8805. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to <b>viewport</b>.
  8806. * @returns {Array.<GC.Spread.Sheets.Range>} An array that contains span information whose item type is GC.Spread.Sheets.Range.
  8807. */
  8808. getSpans(range?: GC.Spread.Sheets.Range, sheetArea?: GC.Spread.Sheets.SheetArea): GC.Spread.Sheets.Range[];
  8809. /**
  8810. * Gets the sparkline for the specified cell.
  8811. * @param {number} row The row index.
  8812. * @param {number} col The column index.
  8813. * @returns {GC.Spread.Sheets.Sparkline} The sparkline for the cell.
  8814. * @example
  8815. * //This example creates and gets a sparkline.
  8816. * var cellr = new GC.Spread.Sheets.Range(0, 0, 1, 5);
  8817. * var ex = new GC.Spread.Sheets.Sparklines.SparklineSetting();
  8818. * ex.options.SeriesColor = "Aquamarine";
  8819. * sheet.setValue(0, 0, 2);
  8820. * sheet.setValue(0, 1, 5);
  8821. * sheet.setValue(0, 2, 4);
  8822. * sheet.setValue(0, 3, -1);
  8823. * sheet.setValue(0, 4, 3);
  8824. * sheet.setSparkline(0, 5, cellr, GC.Spread.Sheets.Sparklines.DataOrientation.horizontal, GC.Spread.Sheets.Sparklines.SparklineType.column, ex);
  8825. * alert(sheet.getSparkline(0, 5).toString());
  8826. * //sheet.removeSparkline(0, 5);
  8827. */
  8828. getSparkline(row: number, column: number): GC.Spread.Sheets.Sparklines.Sparkline;
  8829. /**
  8830. * Gets the style information for a specified cell in the specified sheet area.
  8831. * @param {number} row The row index.
  8832. * @param {number} column The column index.
  8833. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  8834. * @returns {GC.Spread.Sheets.Style} Returns the cell style of the specified cell.
  8835. * @example
  8836. * //This example uses the getStyle method.
  8837. * var style = new GC.Spread.Sheets.Style();
  8838. * style.backColor = "red";
  8839. * style.borderLeft =new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  8840. * style.borderTop = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  8841. * style.borderRight = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  8842. * style.borderBottom = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  8843. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  8844. * var cstyle = activeSheet.getStyle(1,1,GC.Spread.Sheets.SheetArea.viewport, true);
  8845. * alert(cstyle.backColor);
  8846. */
  8847. getStyle(row: number, column: number, sheetArea?: GC.Spread.Sheets.SheetArea): GC.Spread.Sheets.Style;
  8848. /**
  8849. * Gets the name of the style for a specified cell in the specified sheet area.
  8850. * @param {number} row The row index.
  8851. * @param {number} column The column index.
  8852. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  8853. * @returns {string} Returns the name string for the style.
  8854. * @example
  8855. * //This example uses the getStyleName method.
  8856. * var namedStyle = new GC.Spread.Sheets.Style();
  8857. * namedStyle.name = "style1";
  8858. * namedStyle.backColor = "green";
  8859. * activeSheet.addNamedStyle(namedStyle);
  8860. * activeSheet.setStyleName(1, 1, "style1"); // cell(1,1)'s backColor is green.
  8861. * activeSheet.setStyleName(2, 1, "style1");
  8862. * alert(activeSheet.getStyleName(1,1,GC.Spread.Sheets.SheetArea.viewport));
  8863. */
  8864. getStyleName(row: number, column: number, sheetArea?: GC.Spread.Sheets.SheetArea): string;
  8865. /**
  8866. * Gets the tag value from the specified cell in the specified sheet area.
  8867. * @param {number} row The row index.
  8868. * @param {number} col The column index.
  8869. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  8870. * @returns {Object} Returns the tag value of the cell.
  8871. * @example
  8872. * //This example adds and gets a cell tag.
  8873. * activeSheet.getRange(1, -1, 1, -1).tag("row tag");
  8874. * alert(activeSheet.getTag(1,-1,GC.Spread.Sheets.SheetArea.viewport));
  8875. */
  8876. getTag(row: number, col: number, sheetArea?: GC.Spread.Sheets.SheetArea): any;
  8877. /**
  8878. * Gets the formatted text in the cell in the specified sheet area.
  8879. * @param {number} row The row index.
  8880. * @param {number} col The column index.
  8881. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  8882. * @returns {string} Returns the formatted text of the cell.
  8883. * @example
  8884. * activeSheet.getText(1, 0);
  8885. */
  8886. getText(row: number, col: number, sheetArea?: GC.Spread.Sheets.SheetArea): string;
  8887. /**
  8888. * Gets the unformatted data from the specified cell in the specified sheet area.
  8889. * @param {number} row The row index.
  8890. * @param {number} col The column index.
  8891. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  8892. * @param {GC.Spread.Sheets.ValueType} [valueType] - Indicate the return value type is normal text or rich text, default is normal text.
  8893. * @returns {Object} Returns the value of the cell.
  8894. * @example
  8895. * activeSheet.getValue(1, 1, GC.Spread.Sheets.SheetArea.viewport, GC.Spread.Sheets.ValueType.richText);
  8896. */
  8897. getValue(row: number, col: number, sheetArea?: GC.Spread.Sheets.SheetArea, valueType?: GC.Spread.Sheets.ValueType): any;
  8898. /**
  8899. * Gets the index of the bottom row in the viewport.
  8900. * @param {number} rowViewportIndex The index of the viewport.
  8901. * @returns {number} The index of the bottom row in the viewport.
  8902. * @example
  8903. * //This example returns the indices for the bottom and top rows and left and right columns in the current sheet view.
  8904. * var brow = activeSheet.getViewportBottomRow(1);
  8905. * var lcol = activeSheet.getViewportLeftColumn(1);
  8906. * var rcol = activeSheet.getViewportRightColumn(1);
  8907. * var trow = activeSheet.getViewportTopRow(1);
  8908. * alert(brow);
  8909. * alert(lcol);
  8910. * alert(rcol);
  8911. * alert(trow);
  8912. */
  8913. getViewportBottomRow(rowViewportIndex: number): number;
  8914. /**
  8915. * Gets the height of the specified viewport row for the active sheet.
  8916. * @param {number} rowViewportIndex The index of the row viewport.
  8917. * @returns {number} The height of the viewport.
  8918. * @example
  8919. * //This example uses the getViewportHeight method.
  8920. * alert(activeSheet.getViewportHeight(1));
  8921. */
  8922. getViewportHeight(rowViewportIndex: number): number;
  8923. /**
  8924. * Gets the index of the left column in the viewport.
  8925. * @param {number} columnViewportIndex The index of the viewport.
  8926. * @returns {number} The index of the left column in the viewport.
  8927. * @example
  8928. * //This example returns the indices for the bottom and top rows and left and right columns in the current sheet view.
  8929. * var brow = activeSheet.getViewportBottomRow(1);
  8930. * var lcol = activeSheet.getViewportLeftColumn(1);
  8931. * var rcol = activeSheet.getViewportRightColumn(1);
  8932. * var trow = activeSheet.getViewportTopRow(1);
  8933. * alert(brow);
  8934. * alert(lcol);
  8935. * alert(rcol);
  8936. * alert(trow);
  8937. */
  8938. getViewportLeftColumn(columnViewportIndex: number): number;
  8939. /**
  8940. * Gets the index of the right column in the viewport.
  8941. * @param {number} columnViewportIndex The index of the viewport.
  8942. * @returns {number} The index of the right column in the viewport.
  8943. * @example
  8944. * //This example returns the indices for the bottom and top rows and left and right columns in the current sheet view.
  8945. * var brow = activeSheet.getViewportBottomRow(1);
  8946. * var lcol = activeSheet.getViewportLeftColumn(1);
  8947. * var rcol = activeSheet.getViewportRightColumn(1);
  8948. * var trow = activeSheet.getViewportTopRow(1);
  8949. * alert(brow);
  8950. * alert(lcol);
  8951. * alert(rcol);
  8952. * alert(trow);
  8953. */
  8954. getViewportRightColumn(columnViewportIndex: number): number;
  8955. /**
  8956. * Gets the index of the top row in the viewport.
  8957. * @param {number} rowViewportIndex The index of the viewport.
  8958. * @returns {number} The index of the top row in the viewport.
  8959. * @example
  8960. * //This example returns the indices for the bottom and top rows and left and right columns in the current sheet view.
  8961. * var brow = activeSheet.getViewportBottomRow(1);
  8962. * var lcol = activeSheet.getViewportLeftColumn(1);
  8963. * var rcol = activeSheet.getViewportRightColumn(1);
  8964. * var trow = activeSheet.getViewportTopRow(1);
  8965. * alert(brow);
  8966. * alert(lcol);
  8967. * alert(rcol);
  8968. * alert(trow);
  8969. */
  8970. getViewportTopRow(rowViewportIndex: number): number;
  8971. /**
  8972. * Gets the width of the specified viewport column for the active sheet.
  8973. * @param {number} columnViewportIndex The index of the column viewport.
  8974. * @returns {number} The width of the viewport
  8975. * @example
  8976. * //This example uses the getViewportWidth method.
  8977. * alert(activeSheet.getViewportWidth(1));
  8978. */
  8979. getViewportWidth(columnViewportIndex: number): number;
  8980. /**
  8981. * Groups the sparklines.
  8982. * @param {Array.<GC.Spread.Sheets.Sparklines.Sparkline>} sparklines The sparklines to group.
  8983. * @returns {GC.Spread.Sheets.Sparklines.SparklineGroup} The sparkline group.
  8984. * @example
  8985. * //This example groups a sparkline.
  8986. * sheet.setValue(0, 0, "Data Range is A2-A9");
  8987. * sheet.setValue(1, 0, 1);
  8988. * sheet.setValue(2, 0, -2);
  8989. * sheet.setValue(3, 0, -1);
  8990. * sheet.setValue(4, 0, 6);
  8991. * sheet.setValue(5, 0, 4);
  8992. * sheet.setValue(6, 0, -4);
  8993. * sheet.setValue(7, 0, 3);
  8994. * sheet.setValue(8, 0, 8);
  8995. * var data = new GC.Spread.Sheets.Range(1, 0, 8, 1);
  8996. * var setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
  8997. * var s1= sheet.setSparkline(13, 0, data
  8998. * , GC.Spread.Sheets.Sparklines.DataOrientation.vertical
  8999. * , GC.Spread.Sheets.Sparklines.SparklineType.line
  9000. * , setting
  9001. * );
  9002. * var s2 =sheet.setSparkline(13, 3, data
  9003. * , GC.Spread.Sheets.Sparklines.DataOrientation.vertical
  9004. * , GC.Spread.Sheets.Sparklines.SparklineType.column
  9005. * , setting
  9006. * );
  9007. * var s3= sheet.setSparkline(13, 6, data
  9008. * , GC.Spread.Sheets.Sparklines.DataOrientation.vertical
  9009. * , GC.Spread.Sheets.Sparklines.SparklineType.winloss
  9010. * , setting
  9011. * );
  9012. * var group = sheet.groupSparkline([s1,s2,s3]);
  9013. */
  9014. groupSparkline(sparklines: Sparklines.Sparkline[]): GC.Spread.Sheets.Sparklines.SparklineGroup;
  9015. /**
  9016. * Gets whether there is a dirty, insert, or delete status for the specified range.
  9017. * @returns {boolean} <c>true</c> if any of the rows or cells in the range are dirty, or have been inserted or deleted; otherwise, <c>false</c>.
  9018. */
  9019. hasPendingChanges(): boolean;
  9020. /**
  9021. * Performs a hit test.
  9022. * @param {number} x The <i>x</i>-coordinate.
  9023. * @param {number} y The <i>y</i>-coordinate.
  9024. * @returns {Object} The hit test information.
  9025. */
  9026. hitTest(x: number, y: number): GC.Spread.Sheets.IHitTestInformation;
  9027. /**
  9028. * Invalidates the sheet layout.
  9029. * @example
  9030. * //This example updates the layout.
  9031. * activeSheet.columnOutlines.group(0, 1);
  9032. * activeSheet.invalidateLayout();
  9033. * activeSheet.repaint();
  9034. */
  9035. invalidateLayout(): void;
  9036. /**
  9037. * Gets whether recording the dirty data is suspended.
  9038. * @returns {boolean} Whether the dirty data is suspended.
  9039. * @example
  9040. * //This example uses the isDirtySuspended method.
  9041. * var customers = [
  9042. * { ID: 0, Name: 'A', Info1: 'Info0' },
  9043. * { ID: 1, Name: 'B', Info1: 'Info1' },
  9044. * { ID: 2, Name: 'C', Info1: 'Info2' },
  9045. * ];
  9046. * activeSheet.setDataSource(customers);
  9047. * activeSheet.suspendDirty();
  9048. * alert(activeSheet.isDirtySuspended());
  9049. * activeSheet.resumeDirty();
  9050. * alert(activeSheet.isDirtySuspended());
  9051. */
  9052. isDirtySuspended(): boolean;
  9053. /**
  9054. * Gets whether the sheet is in edit mode.
  9055. * @returns {boolean} <c>true</c> if the sheet is in edit mode; otherwise, <c>false</c>.
  9056. * @example
  9057. * //This example uses the isEditing method.
  9058. * alert(activeSheet.isEditing());
  9059. */
  9060. isEditing(): boolean;
  9061. /**
  9062. * Get if sheet paint is suspended.
  9063. */
  9064. isPaintSuspended(): boolean;
  9065. /**
  9066. * Gets or sets whether display a print line for the sheet.
  9067. * @param {boolean} [value] Whether display a print line for the sheet
  9068. * @returns {boolean} If no value is set, returns a value indicating whether the print line is displayed
  9069. */
  9070. isPrintLineVisible(value?: boolean): boolean;
  9071. /**
  9072. * Gets or sets the selected state of the worksheet.
  9073. * @param {boolean} [selectedState] The selected state of the worksheet.
  9074. * @returns {boolean|GC.Spread.Sheets.Worksheet} If no selectedState is set, returns the worksheet selected state; otherwise, returns the worksheet.
  9075. * @example
  9076. * spread.sheets[0].isSelected();
  9077. * spread.sheets[1].isSelected(true);
  9078. */
  9079. isSelected(selectedState?: boolean): any;
  9080. /**
  9081. * Determines whether the cell value is valid.
  9082. * @param {number} row The row index.
  9083. * @param {number} column The column index.
  9084. * @param {Object} value The cell value.
  9085. * @returns {boolean} <c>true</c> if the value is valid; otherwise, <c>false</c>.
  9086. * @example
  9087. * //This example uses the isValid method.
  9088. * alert(activeSheet.isValid(0, 0, 10));
  9089. */
  9090. isValid(row: number, column: number, value: Object): boolean;
  9091. /**
  9092. * Moves data from one range to another.
  9093. * @param {number} fromRow The source row.
  9094. * @param {number} fromColumn The source column.
  9095. * @param {number} toRow The target row.
  9096. * @param {number} toColumn The target column.
  9097. * @param {number} rowCount The row count.
  9098. * @param {number} columnCount The column count.
  9099. * @param {GC.Spread.Sheets.CopyToOptions} option The copy option.
  9100. * @example
  9101. * //This example moves the data to the specified location.
  9102. * activeSheet.getCell(0,0).value("A1");
  9103. * activeSheet.getCell(1,1).value("Test")
  9104. * activeSheet.moveTo(0,0,3,3,2,2,GC.Spread.Sheets.CopyToOptions.value);
  9105. */
  9106. moveTo(fromRow: number, fromColumn: number, toRow: number, toColumn: number, rowCount: number, columnCount: number, option: GC.Spread.Sheets.CopyToOptions): void;
  9107. /**
  9108. * Gets or sets the name of the worksheet.
  9109. * @param {string} [value] The name of the worksheet.
  9110. * @returns {string|GC.Spread.Sheets.Worksheet} If no value is set, returns the worksheet name; otherwise, returns the worksheet.
  9111. * @example
  9112. * spread.sheets[0].name("The first sheet");
  9113. * spread.sheets[1].name( "The second sheet");
  9114. */
  9115. name(value?: string): any;
  9116. /**
  9117. * Gets or sets the print information for the sheet.
  9118. * @param {GC.Spread.Sheets.Print.PrintInfo} [value] The print information for the sheet.
  9119. * @returns {GC.Spread.Sheets.Print.PrintInfo | GC.Spread.Sheets.Worksheet} If no value is set, returns the print information for the sheet; otherwise, returns the sheet.
  9120. */
  9121. printInfo(value?: GC.Spread.Sheets.Print.PrintInfo): any;
  9122. /**
  9123. * Recalculates all the formulas in the sheet.
  9124. * @param {boolean} refreshAll Specifies whether to rebuild all fromula reference, custom name and custom functions.
  9125. * @example
  9126. * //This example uses the recalcAll method.
  9127. * activeSheet.setValue(0,0,1);
  9128. * activeSheet.setValue(0,1,2);
  9129. * activeSheet.setValue(0,2,10);
  9130. * activeSheet.getCell(1,1).formula("=SUM(A1:C1)");
  9131. * activeSheet.recalcAll();
  9132. */
  9133. recalcAll(refreshAll?: boolean): void;
  9134. /**
  9135. * Removes a custom function.
  9136. * @param {string} fnName The custom function name.
  9137. * @example
  9138. * //This example uses the removeCustomFunction method.
  9139. * // Add Custom function
  9140. * // Type =myfunc(1)
  9141. * // in a cell to see the result
  9142. * function myfunc() {}
  9143. * myfunc.prototype = new GC.Spread.CalcEngine.Functions.Function("myfunc", 0, 0, {name: "myfunc",description: "This is my first function"});
  9144. * myfunc.prototype.evaluate = function (args) {
  9145. * return 100;
  9146. * }
  9147. * spread.addCustomFunction(new myfunc());
  9148. * //spread.removeCustomFunction("myfunc");
  9149. */
  9150. removeCustomFunction(name: string): void;
  9151. /**
  9152. * Removes the specified custom name.
  9153. * @param {string} fnName The custom name.
  9154. * @example
  9155. * //This example uses the removeCustomName method.
  9156. * activeSheet.setValue(0, 0, 1);
  9157. * activeSheet.setValue(0, 1, 2);
  9158. * activeSheet.setValue(0, 2, 3);
  9159. * activeSheet.addCustomName("customName1","=12", 0, 0);
  9160. * activeSheet.addCustomName("customName2","Average(20,45)", 0, 0);
  9161. * activeSheet.addCustomName("customName3", "=$A$1:$C$1", 0, 0);
  9162. * activeSheet.setFormula(1, 0, "customName1");
  9163. * activeSheet.setFormula(1, 1, "customName2");
  9164. * activeSheet.setFormula(1, 2, "sum(customName3)");
  9165. * //activeSheet.removeCustomName("customName3");
  9166. */
  9167. removeCustomName(name: string): void;
  9168. /**
  9169. * Removes a style from the Worksheet named styles collection which has the specified name.
  9170. * @param {string} name The name of the style to remove.
  9171. */
  9172. removeNamedStyle(name: string): void;
  9173. /**
  9174. * Removes the span that contains a specified anchor cell in the specified sheet area.
  9175. * @param {number} row The row index of the anchor cell for the span (at which spanned cells start).
  9176. * @param {number} col The column index of the anchor cell for the span (at which spanned cells start).
  9177. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to <b>viewport</b>.
  9178. * @example
  9179. * activeSheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.viewport);
  9180. * //activeSheet.removeSpan(0, 0, GC.Spread.Sheets.SheetArea.viewport);
  9181. */
  9182. removeSpan(row: number, col: number, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  9183. /**
  9184. * Removes the sparkline for the specified cell.
  9185. * @param {number} row The row index.
  9186. * @param {number} col The column index.
  9187. * @example
  9188. * //This example removes a sparkline.
  9189. * var cellr = new GC.Spread.Sheets.Range(0, 0, 1, 5);
  9190. * var ex = new GC.Spread.Sheets.Sparklines.SparklineSetting();
  9191. * ex.options.SeriesColor = "Aquamarine";
  9192. * sheet.setValue(0, 0, 2);
  9193. * sheet.setValue(0, 1, 5);
  9194. * sheet.setValue(0, 2, 4);
  9195. * sheet.setValue(0, 3, -1);
  9196. * sheet.setValue(0, 4, 3);
  9197. * sheet.setSparkline(0, 5, cellr, GC.Spread.Sheets.Sparklines.DataOrientation.horizontal, GC.Spread.Sheets.Sparklines.SparklineType.column, ex);
  9198. * alert(sheet.getSparkline(0, 5).toString());
  9199. * //sheet.removeSparkline(0, 5);
  9200. */
  9201. removeSparkline(row: number, col: number): void;
  9202. /**
  9203. * Repaints the specified rectangle.
  9204. * @param {GC.Spread.Sheets.Rect} clipRect The rectangle to repaint.
  9205. * @example
  9206. * //This example causes a repaint.
  9207. * var cellrange =new GC.Spread.Sheets.Range(0, 0, 5, 1);
  9208. * var hideRowFilter =new GC.Spread.Sheets.Filter.HideRowFilter(cellrange);
  9209. * sheet.rowFilter(hideRowFilter);
  9210. * sheet.resumePaint();
  9211. * sheet.repaint();
  9212. */
  9213. repaint(clipRect?: GC.Spread.Sheets.Rect): void;
  9214. /**
  9215. * Resets the sheet.
  9216. * @example
  9217. * //This example uses the reset method.
  9218. * activeSheet.reset();
  9219. */
  9220. reset(): void;
  9221. /**
  9222. * Resumes the calculation service.
  9223. * @param {boolean} recalcAll Specifies whether to recalculate all formulas.
  9224. * @example
  9225. * //This example uses the resumeCalcService method.
  9226. * activeSheet.suspendCalcService(false);
  9227. * activeSheet.setValue(0,0,1);
  9228. * activeSheet.setValue(0,1,2);
  9229. * activeSheet.setValue(0,2,10);
  9230. * activeSheet.getCell(1,1).formula("=SUM(A1:C1)");
  9231. * activeSheet.resumeCalcService(true);
  9232. */
  9233. resumeCalcService(recalcAll?: boolean): void;
  9234. /**
  9235. * Resumes recording the dirty data.
  9236. * @example
  9237. * //This example uses the resumeDirty method.
  9238. * var customers = [
  9239. * { ID: 0, Name: 'A', Info1: 'Info0' },
  9240. * { ID: 1, Name: 'B', Info1: 'Info1' },
  9241. * { ID: 2, Name: 'C', Info1: 'Info2' },
  9242. * ];
  9243. * activeSheet.setDataSource(customers);
  9244. * activeSheet.suspendDirty();
  9245. * alert(activeSheet.isDirtySuspended());
  9246. * activeSheet.resumeDirty();
  9247. * alert(activeSheet.isDirtySuspended());
  9248. */
  9249. resumeDirty(): void;
  9250. /**
  9251. * Resumes the event.
  9252. * @example
  9253. * //This example suspends and resumes the event.
  9254. * activeSheet.bind(GC.Spread.Sheets.Events.CellChanged, function (sender, args) {
  9255. * if (args.propertyName === "value") {
  9256. * alert(activeSheet.getValue(args.row, args.col));
  9257. * }
  9258. * });
  9259. * activeSheet.suspendEvent();
  9260. * activeSheet.setValue(0, 0, "111");
  9261. * activeSheet.resumeEvent();
  9262. * activeSheet.setValue(1, 1, "222");
  9263. */
  9264. resumeEvent(): void;
  9265. /**
  9266. * Resumes the paint.
  9267. */
  9268. resumePaint(): void;
  9269. /**
  9270. * Gets or sets the row filter for the sheet.
  9271. * @param {GC.Spread.Sheets.Filter.RowFilterBase} value The row filter for the sheet.
  9272. * @returns {GC.Spread.Sheets.Filter.RowFilterBase} The row filter for the sheet.
  9273. * @example
  9274. * //This example creates a row filter.
  9275. * sheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(1,1,10,3)));
  9276. */
  9277. rowFilter(value?: GC.Spread.Sheets.Filter.RowFilterBase): GC.Spread.Sheets.Filter.RowFilterBase;
  9278. /**
  9279. * Scrolls the sheet by specified pixels.
  9280. * When vPixels is positive, worksheet will scroll down; when vPixels is negative, worksheet will scroll up; when vPixels is 0, worksheet won't scroll in vertical direction.
  9281. * When hPixels is positive, worksheet will scroll right; when hPixels is negative, worksheet will scroll left; when hPixels is 0, worksheet won't scroll in horizontal direction.
  9282. * When Workbook's option scrollByPixel is true, worksheet will scroll to new top row/left column index and new top row/left column offset;
  9283. * When Workbook's option scrollByPixel is false, worksheet will scroll to new top row/left column index, and new top row/left column offset will be always 0.
  9284. * @param {number} vPixels The pixels to scroll in vertical direction.
  9285. * @param {number} hPixels The pixels to scroll in horizontal direction.
  9286. * @example
  9287. * //This example scrolls down the sheet 10 pixels and scrolls right the sheet 5 pixels.
  9288. * activeSheet.scroll(10, 5);
  9289. */
  9290. scroll(vPixels: number, hPixels: number): void;
  9291. /**
  9292. * Searches the specified content.
  9293. * @param {GC.Spread.Sheets.Search.SearchCondition} searchCondition The search condition.
  9294. * @returns {GC.Spread.Sheets.Search.SearchResult} The search result.
  9295. * @example
  9296. * //This example uses the search method.
  9297. * activeSheet.getCell(2,3).value("testSearch");
  9298. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  9299. * searchCondition.searchString = "testSearch";
  9300. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  9301. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  9302. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  9303. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  9304. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.ignoreCase| GC.Spread.Sheets.Search.SearchFlags.useWildCards;
  9305. * var searchresult= activeSheet.search(searchCondition);
  9306. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" +
  9307. * searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundSheetIndex+"]";
  9308. * alert(str);
  9309. */
  9310. search(searchCondition: GC.Spread.Sheets.Search.SearchCondition): GC.Spread.Sheets.Search.SearchResult;
  9311. /**
  9312. * Gets or sets whether users can select ranges of items on a sheet.
  9313. * @param {GC.Spread.Sheets.SelectionPolicy} [value] Whether users can select single items, ranges, or a combination of both.
  9314. * @returns {GC.Spread.Sheets.SelectionPolicy|GC.Spread.Sheets.Worksheet} If no value is set, returns the selection policy setting; otherwise, returns the sheet.
  9315. * @example
  9316. * //This example uses the selectionPolicy method.
  9317. * activeSheet.selectionUnit(GC.Spread.Sheets.SelectionUnit.row);
  9318. * activeSheet.selectionPolicy(GC.Spread.Sheets.SelectionPolicy.range);
  9319. */
  9320. selectionPolicy(value?: GC.Spread.Sheets.SelectionPolicy): any;
  9321. /**
  9322. * Gets or sets whether users can select cells, rows, or columns on a sheet.
  9323. * @param {GC.Spread.Sheets.SelectionUnit} [value] Whether users can select cells, rows, or columns.
  9324. * @returns {GC.Spread.Sheets.SelectionUnit|GC.Spread.Sheets.Worksheet} If no value is set, returns the selection unit setting; otherwise, returns the sheet.
  9325. * @example
  9326. * //This example uses the selectionUnit method.
  9327. * activeSheet.selectionUnit(GC.Spread.Sheets.SelectionUnit.row);
  9328. * activeSheet.selectionPolicy(GC.Spread.Sheets.SelectionPolicy.range);
  9329. */
  9330. selectionUnit(value?: GC.Spread.Sheets.SelectionUnit): any;
  9331. /**
  9332. * Sets the active cell for this sheet.
  9333. * @param {number} row The row index of the cell.
  9334. * @param {number} col The column index of the cell.
  9335. * @example
  9336. * //This example sets the active cell.
  9337. * sheet.setActiveCell(5,5);
  9338. * alert(sheet.getActiveColumnIndex());
  9339. * alert(sheet.getActiveRowIndex());
  9340. * spread.bind(GC.Spread.Sheets.Events.EnterCell, function (event, data) {
  9341. * alert(data.col);
  9342. * alert(data.row);
  9343. * });
  9344. * spread.bind(GC.Spread.Sheets.Events.LeaveCell, function (event, data) {
  9345. * alert(data.col);
  9346. * alert(data.row);
  9347. * });
  9348. */
  9349. setActiveCell(row: number, col: number): void;
  9350. /**
  9351. * Sets the values in the specified two-dimensional array of objects into the specified range of cells on this sheet.
  9352. * @param {number} row The row index.
  9353. * @param {number} column The column index.
  9354. * @param {Array} array The array from which to set values.
  9355. * @param {boolean} [setFormula] If <c>true</c>, set formulas; otherwise, set values.
  9356. * @example
  9357. * //This example uses the setArray method.
  9358. * //set value
  9359. * var array = [[1,2,3],[4,5],[6,7,8,9]];
  9360. * activeSheet.setArray(1, 2, array);
  9361. * //set formula
  9362. * var array = [["=1+1","=2+2","=3+3"],["=4+4","=5+5"],["=6+6","=7+7","=8+8","=9+9"]];
  9363. * activeSheet.setArray(1, 2, array, true);
  9364. * //get value
  9365. * var newArray = activeSheet.getArray(1, 2, 3, 4);
  9366. * //getformula
  9367. * var newArray = activeSheet.getArray(1, 2, 3, 4, true);
  9368. * //alert(newArray[0]);
  9369. */
  9370. setArray(row: number, column: number, array: any[], setFormula?: boolean): void;
  9371. /**
  9372. * Sets a formula in a specified cell in the specified sheet area.
  9373. * @param {number} row The start row index.
  9374. * @param {number} col The start column index.
  9375. * @param {number} rowCount The number of rows in range.
  9376. * @param {number} colCount The number of columns in range.
  9377. * @param {string} value The array formula to place in the specified range.
  9378. * @example
  9379. * //This example uses the setArrayFormula method.
  9380. * activeSheet.getCell(1,1).value(3);
  9381. * activeSheet.getCell(2,1).value(1);
  9382. * activeSheet.getCell(3,1).value(3);
  9383. * activeSheet.getCell(4,1).value(7);
  9384. * activeSheet.getCell(1,2).value(7);
  9385. * activeSheet.getCell(2,2).value(7);
  9386. * activeSheet.getCell(3,2).value(7);
  9387. * activeSheet.getCell(4,2).value(7);
  9388. * spread.allowUserEditFormula(true);
  9389. * activeSheet.setArrayFormula(0, 3, 4, 1, "B2:B5*C2:C5");
  9390. */
  9391. setArrayFormula(row: number, col: number, rowCount: number, colCount: number, value: string): void;
  9392. /**
  9393. * Sets the binding path for cell-level binding in a specified cell in the specified sheet area.
  9394. * @param {number} row The row index.
  9395. * @param {number} col The column index.
  9396. * @param {string} path The binding path for the cell binding source.
  9397. * @returns {GC.Spread.Sheets.Worksheet}
  9398. * @example
  9399. * //This example binds a cell.
  9400. * var test = {name: "John", gender: "male"};
  9401. * sheet.setBindingPath(0, 0, "name");
  9402. * sheet.setBindingPath(0, 1, "gender");
  9403. * sheet.setDataSource(new GC.Spread.Sheets.Bindings.CellBindingSource(test));
  9404. */
  9405. setBindingPath(row: number, col: number, path: string): GC.Spread.Sheets.Worksheet;
  9406. /**
  9407. * Sets the cell type.
  9408. * @param {number} row The row index.
  9409. * @param {number} col The column index.
  9410. * @param {GC.Spread.Sheets.CellTypes.Base} value The cell type.
  9411. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  9412. * @example
  9413. * //This example uses the setCellType method.
  9414. * var cellType = new GC.Spread.Sheets.CellTypes.Button();
  9415. * cellType.buttonBackColor("#FFFF00");
  9416. * cellType.text("this is a button");
  9417. * activeSheet.setCellType(1,1,cellType);
  9418. * spread.bind(GC.Spread.Sheets.Events.ButtonClicked, function (e, args) {
  9419. * var sheet = args.sheet, row = args.row, col = args.col;
  9420. * var cellType = activeSheet.getCellType(row, col);
  9421. * if (cellType instanceof GC.Spread.Sheets.CellTypes.Button) {
  9422. * alert("Button Clicked");
  9423. * }
  9424. * });
  9425. */
  9426. setCellType(row: number, col: number, value: GC.Spread.Sheets.CellTypes.Base, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  9427. /**
  9428. * Sets the column count in the specified sheet area.
  9429. * @param {number} colCount The column count.
  9430. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to <b>viewport</b>.
  9431. * @example
  9432. * //This example sets the number of columns.
  9433. * sheet.setRowCount(4,1);
  9434. * sheet.setColumnCount(4,2);
  9435. * sheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.colHeader);
  9436. * sheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.rowHeader);
  9437. * sheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.viewport);
  9438. */
  9439. setColumnCount(colCount: number, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  9440. /**
  9441. * Sets whether a forced page break is inserted before the specified column on this sheet when printing.
  9442. * @param {number} column The column index.
  9443. * @param {boolean} value Set to <c>true</c> to force a page break before the specified column on this sheet when printing.
  9444. * @example
  9445. * //This example sets the page break.
  9446. * activeSheet.setColumnPageBreak(5, true);
  9447. */
  9448. setColumnPageBreak(column: number, value: boolean): void;
  9449. /**
  9450. * Sets whether users can resize the specified column in the specified sheet area.
  9451. * @param {number} col The column index.
  9452. * @param {boolean} value Set to <c>true</c> to allow users to resize the column.
  9453. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to <b>viewport</b>.
  9454. * @example
  9455. * //This example sets the setColumnResizable method.
  9456. * sheet.setRowResizable(3,false,GC.Spread.Sheets.SheetArea.viewport);
  9457. * sheet.setColumnResizable(3,false,GC.Spread.Sheets.SheetArea.viewport);
  9458. * sheet.getRange(1,-1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).resizable(false);
  9459. * sheet.getRange(-1, 1, -1, 1, GC.Spread.Sheets.SheetArea.viewport).resizable(false);
  9460. */
  9461. setColumnResizable(col: number, value: boolean, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  9462. /**
  9463. * Sets whether a column in the specified sheet area is displayed.
  9464. * @param {number} col The column index.
  9465. * @param {boolean} value Whether to display the column.
  9466. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to <b>viewport</b>.
  9467. * @example
  9468. * //This example sets the specified column to be hidden.
  9469. * activeSheet.setColumnVisible(2,false,GC.Spread.Sheets.SheetArea.viewport);
  9470. */
  9471. setColumnVisible(col: number, value: boolean, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  9472. /**
  9473. * Sets the width in pixels or dynamic size for the specified column in the specified sheet area.
  9474. * @param {number} col The column index.
  9475. * @param {number | string} value The width in pixels, or use the string with "*" to represent the dynamic size.
  9476. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to viewport.
  9477. * @example
  9478. * //This example sets the column width.
  9479. * sheet.setValue(0, 0, "value");
  9480. * sheet.addRows(0, 2);
  9481. * sheet.addColumns(0, 2);
  9482. * sheet.setRowHeight(0, 50.0, GC.Spread.Sheets.SheetArea.viewport);
  9483. * sheet.setColumnWidth(0, 150.0, GC.Spread.Sheets.SheetArea.viewport);
  9484. * sheet.setColumnWidth(1, "2*", GC.Spread.Sheets.SheetArea.viewport);
  9485. * sheet.getRange(0, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).backColor("Gray");
  9486. * sheet.getRange(-1, 0, -1, 1, GC.Spread.Sheets.SheetArea.viewport).backColor ("Brown");
  9487. */
  9488. setColumnWidth(col: number, value: number | string, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  9489. /**
  9490. * Sets delimited text (CSV) in the sheet.
  9491. * @param {number} row The start row.
  9492. * @param {number} column The start column.
  9493. * @param {string} text The delimited text.
  9494. * @param {string} rowDelimiter The row delimiter.
  9495. * @param {string} columnDelimiter The column delimiter.
  9496. */
  9497. setCsv(row: number, column: number, text: string, rowDelimiter: string, columnDelimiter: string): void;
  9498. /**
  9499. * Sets the data source that populates the sheet.
  9500. * @param {Object} data The data source.
  9501. * @param {boolean} reset <c>true</c> if the sheet is reset; otherwise, <c>false</c>.
  9502. * @example
  9503. * var test = [
  9504. * { "Series0": 2, "Series1": 1 },
  9505. * { "Series0": 4, "Series1": 2 },
  9506. * { "Series0": 3, "Series1": 4 }
  9507. * ];
  9508. * activeSheet.autoGenerateColumns = true;
  9509. * activeSheet.setDataSource(test, true);
  9510. */
  9511. setDataSource(data: any, reset?: boolean): void;
  9512. /**
  9513. * Sets the cell data validator.
  9514. * @param {number} row The row index.
  9515. * @param {number} col The column index.
  9516. * @param {GC.Spread.Sheets.DataValidation.DefaultDataValidator} value The data validator.
  9517. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  9518. * @example
  9519. * spread.options.highlightInvalidData = true;
  9520. * var dv = GC.Spread.Sheets.DataValidation.createListValidator("1,2,3");
  9521. * dv.showInputMessage(true);
  9522. * dv.inputMessage("Value must be 1,2 or 3");
  9523. * dv.inputTitle("tip");
  9524. * activeSheet.setDataValidator(1,1,dv,GC.Spread.Sheets.SheetArea.viewport);
  9525. * alert(activeSheet.getDataValidator(1,1).getValidList(activeSheet,1,1));
  9526. */
  9527. setDataValidator(row: number, col: number, value: GC.Spread.Sheets.DataValidation.DefaultDataValidator, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  9528. /**
  9529. * Sets the cell data validator.
  9530. * @param {number} row The row index.
  9531. * @param {number} col The column index.
  9532. * @param {number} rowCount The row count.
  9533. * @param {number} colCount The column count.
  9534. * @param {GC.Spread.Sheets.DataValidation.DefaultDataValidator} value The data validator.
  9535. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  9536. * @example
  9537. * spread.options.highlightInvalidData = true;
  9538. * var dv = GC.Spread.Sheets.DataValidation.createListValidator("1,2,3");
  9539. * dv.showInputMessage(true);
  9540. * dv.inputMessage("Value must be 1,2 or 3");
  9541. * dv.inputTitle("tip");
  9542. * activeSheet.setDataValidator(1,1,1,1,dv,GC.Spread.Sheets.SheetArea.viewport);
  9543. * alert(activeSheet.getDataValidator(1,1).getValidList(activeSheet,1,1));
  9544. */
  9545. setDataValidator(row: number, col: number, rowCount: number, colCount: number, value: GC.Spread.Sheets.DataValidation.DefaultDataValidator, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  9546. /**
  9547. * Sets the default style information for the sheet.
  9548. * @param {GC.Spread.Sheets.Style} style The style to set.
  9549. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  9550. */
  9551. setDefaultStyle(style: GC.Spread.Sheets.Style, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  9552. /**
  9553. * Sets the cell formatter.
  9554. * @param {number} row The row index.
  9555. * @param {number} col The column index.
  9556. * @param {string | GC.Spread.Formatter.FormatterBase} value The formatter string or object.
  9557. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  9558. * @example
  9559. * //This example sets the format object for the active sheet.
  9560. * activeSheet.setValue(2, 3, new Date(2011, 2, 9));
  9561. * activeSheet.setFormatter(2,3,"M",GC.Spread.Sheets.SheetArea.viewport);
  9562. */
  9563. setFormatter(row: number, col: number, value: string | GC.Spread.Formatter.FormatterBase, sheetArea: GC.Spread.Sheets.SheetArea): void;
  9564. /**
  9565. * Sets a formula in a specified cell in the specified sheet area.
  9566. * @param {number} row The row index.
  9567. * @param {number} col The column index.
  9568. * @param {string} value The formula to place in the specified cell.
  9569. * @example
  9570. * //This example sets the formula for the specified cell.
  9571. * activeSheet.setValue(0, 2, 3);
  9572. * activeSheet.setFormula(1,1,"C1+D1",GC.Spread.Sheets.SheetArea.viewport);
  9573. */
  9574. setFormula(row: number, col: number, value: string): void;
  9575. /**
  9576. * Sets the hyperlink data for the specified cell in the specified sheet area.
  9577. * @param {number} row The row index.
  9578. * @param {number} col The column index.
  9579. * @param {Object} value The hyperlink data to set for the specified cell.
  9580. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  9581. * @example
  9582. * //This example uses the setHyperlink method.
  9583. * sheet.setHyperlink(0, 2, {
  9584. * url: 'https://www.grapecity.com/spreadjs',
  9585. * tooltip: 'baidu',
  9586. * linkColor: 'blue',
  9587. * visitedLinkColor: 'red',
  9588. * target: GC.Spread.Sheets.Hyperlink.HyperlinkTargetType.blank,
  9589. * command: 'navigationLeft'
  9590. * }, GC.Spread.Sheets.SheetArea.viewport);
  9591. * sheet.setHyperlink(1, 1, {
  9592. * url: 'https://www.grapecity.com/spreadjs',
  9593. * tooltip: 'baidu',
  9594. * setUnderlineToStyle: true;
  9595. * setForeColorToStyle: true;
  9596. * target: GC.Spread.Sheets.Hyperlink.HyperlinkTargetType.top,
  9597. * command: function() { console.log('Only show this message when click the hyperlink.')}
  9598. * }, GC.Spread.Sheets.SheetArea.viewport);
  9599. */
  9600. setHyperlink(row: number, col: number, value: GC.Spread.Sheets.IHyperlink, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  9601. /**
  9602. * Sets the row count in the specified sheet area.
  9603. * @param {number} rowCount The row count.
  9604. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to <b>viewport</b>.
  9605. * @example
  9606. * //This example sets the row count.
  9607. * sheet.setRowCount(4,1);
  9608. * sheet.setColumnCount(4,2);
  9609. * sheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.colHeader);
  9610. * sheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.rowHeader);
  9611. * sheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.viewport);
  9612. */
  9613. setRowCount(rowCount: number, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  9614. /**
  9615. * Sets the height in pixels or dynamic size for the specified row in the specified sheet area.
  9616. * @param {number} row The row index.
  9617. * @param {number | string} value The height in pixels, or use the string with "*" to represent the dynamic size.
  9618. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to <b>viewport</b>.
  9619. * @example
  9620. * //This example sets the row height.
  9621. * sheet.setValue(0, 0, "value");
  9622. * sheet.addRows(0, 2);
  9623. * sheet.addColumns(0, 2);
  9624. * sheet.setRowHeight(0, 50.0, GC.Spread.Sheets.SheetArea.viewport);
  9625. * sheet.setRowHeight(1, "3*", GC.Spread.Sheets.SheetArea.viewport);
  9626. * sheet.setColumnWidth(0, 150.0, GC.Spread.Sheets.SheetArea.viewport);
  9627. * sheet.getRange(0, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).backColor("Gray");
  9628. * sheet.getRange(-1, 0, -1, 1, GC.Spread.Sheets.SheetArea.viewport).backColor ("Brown");
  9629. */
  9630. setRowHeight(row: number, value: number | string, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  9631. /**
  9632. * Sets whether a forced page break is inserted before the specified row on this sheet when printing.
  9633. * @param {number} row The row index.
  9634. * @param {boolean} value Set to <c>true</c> to force a page break before the specified row on this sheet when printing.
  9635. * @example
  9636. * activeSheet.setRowPageBreak(3, true);
  9637. */
  9638. setRowPageBreak(row: number, value: boolean): void;
  9639. /**
  9640. * Sets whether users can resize the specified row in the specified sheet area.
  9641. * @param {number} row The row index.
  9642. * @param {boolean} value Set to <c>true</c> to let the users resize the specified row.
  9643. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to <b>viewport</b>.
  9644. * @example
  9645. * //This example prevents certain rows and columns from being resized.
  9646. * sheet.setRowResizable(3,false,GC.Spread.Sheets.SheetArea.viewport);
  9647. * sheet.setColumnResizable(3,false,GC.Spread.Sheets.SheetArea.viewport);
  9648. * sheet.getRange(1,-1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).resizable(false);
  9649. * sheet.getRange(-1, 1, -1, 1, GC.Spread.Sheets.SheetArea.viewport).resizable(false);
  9650. */
  9651. setRowResizable(row: number, value: boolean, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  9652. /**
  9653. * Sets whether the control displays the specified row in the specified sheet area.
  9654. * @param {number} row The row index.
  9655. * @param {boolean} value Set to <c>true</c> to display the specified row.
  9656. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not given, it defaults to <b>viewport</b>.
  9657. * @example
  9658. * //This example sets the specified row to be hidden.
  9659. * activeSheet.setRowVisible(1,false,GC.Spread.Sheets.SheetArea.viewport);
  9660. */
  9661. setRowVisible(row: number, value: boolean, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  9662. /**
  9663. * Sets the selection to a cell or a range and sets the active cell to the first cell.
  9664. * @param {number} row The row index of the first cell to add.
  9665. * @param {number} column The column index of the first cell to add.
  9666. * @param {number} rowCount The number of rows to add.
  9667. * @param {number} columnCount The number of columns to add.
  9668. * @example
  9669. * //This example selects a range of cells.
  9670. * sheet.setValue(0,0, 1,3);
  9671. * sheet.setValue(1,0, 50,3);
  9672. * sheet.setValue(2,0, 100,3);
  9673. * sheet.setValue(3,0, 2,3);
  9674. * sheet.setValue(4,0, 60,3);
  9675. * sheet.setValue(5,0, 90,3);
  9676. * sheet.setValue(6,0, 3,3);
  9677. * sheet.setValue(7,0, 40,3);
  9678. * sheet.setValue(8,0, 70,3);
  9679. * sheet.setValue(9,0, 5,3);
  9680. * sheet.setValue(10,0, 35,3);
  9681. * sheet.setSelection(0,0,11,1);
  9682. * sheet.conditionalFormats.add3ScaleRule(1, 10, "red", 0, 50, "blue",2, 100, "yellow", sheet.getSelections());
  9683. */
  9684. setSelection(row: number, column: number, rowCount: number, columnCount: number): void;
  9685. /**
  9686. * Sets the sparkline for a cell.
  9687. * @param {number} row The row index.
  9688. * @param {number} col The column index.
  9689. * @param {GC.Spread.Sheets.Range | string} dataRange The data range.
  9690. * @param {GC.Spread.Sheets.Sparklines.DataOrientation} dataOrientation The data orientation.
  9691. * @param {GC.Spread.Sheets.Sparklines.SparklineType} sparklineType The sparkline type.
  9692. * @param {GC.Spread.Sheets.Sparklines.SparklineSetting} sparklineSetting The sparkline setting.
  9693. * @param {GC.Spread.Sheets.Range | string} dateAxisRange The date axis range.
  9694. * @param {GC.Spread.Sheets.Sparklines.DataOrientation} dateAxisOrientation The date axis range orientation.
  9695. * @returns {GC.Spread.Sheets.Sparklines.Sparkline} The sparkline.
  9696. * @example
  9697. * //This example creates a sparkline for the specified range.
  9698. * var data = new GC.Spread.Sheets.Range(1, 0, 8, 1);
  9699. * var setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
  9700. * setting.options.showMarkers = true;
  9701. * setting.options.lineWeight = 3;
  9702. * setting.options.displayXAxis = true;
  9703. * setting.options.showFirst = true;
  9704. * setting.options.showLast = true;
  9705. * setting.options.showLow = true;
  9706. * setting.options.showHigh = true;
  9707. * setting.options.showNegative = true;
  9708. * setting.options.seriesColor = "Text 2 1";
  9709. * setting.options.firstMarkerColor = "Text 2 3";
  9710. * setting.options.negativeColor = "Accent 2 1";
  9711. * setting.options.markersColor = "Accent 3 1";
  9712. * setting.options.lowMarkerColor = "Accent 4 1";
  9713. * setting.options.highMarkerColor = "Accent 6 1";
  9714. * setting.options.lastMarkerColor = "Accent 6 6";
  9715. * setting.options.axisColor ="Text 1 1";
  9716. * sheet.addSpan(13, 0, 4, 3, null);
  9717. * sheet.setSparkline(13, 0, data, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
  9718. * sheet.setValue(1, 0, 1);
  9719. * sheet.setValue(2, 0, -2);
  9720. * sheet.setValue(3, 0, -1);
  9721. * sheet.setValue(4, 0, 6);
  9722. * sheet.setValue(5, 0, 4);
  9723. * sheet.setValue(6, 0, -4);
  9724. * sheet.setValue(7, 0, 3);
  9725. * sheet.setValue(8, 0, 8);
  9726. */
  9727. setSparkline(row: number, col: number, dataRange: GC.Spread.Sheets.Range | string, dataOrientation: GC.Spread.Sheets.Sparklines.DataOrientation, sparklineType: GC.Spread.Sheets.Sparklines.SparklineType, sparklineSetting: GC.Spread.Sheets.Sparklines.SparklineSetting, dateAxisRange?: GC.Spread.Sheets.Range | string, dateAxisOrientation?: GC.Spread.Sheets.Sparklines.DataOrientation): GC.Spread.Sheets.Sparklines.Sparkline;
  9728. /**
  9729. * Sets the style information for a specified cell in the specified sheet area.
  9730. * @param {number} row The row index.
  9731. * @param {number} column The column index.
  9732. * @param {GC.Spread.Sheets.Style} value The cell style.
  9733. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  9734. * @example
  9735. * //This example uses the setStyle method.
  9736. * var style = new GC.Spread.Sheets.Style();
  9737. * style.backColor = "lightgreen";
  9738. * style.backgroundImage = "./css/images/quarter1.png";
  9739. * activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
  9740. */
  9741. setStyle(row: number, col: number, value: GC.Spread.Sheets.Style, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  9742. /**
  9743. * Sets the specified style name for a specified cell in the specified sheet area.
  9744. * @param {number} row The row index.
  9745. * @param {number} column The column index.
  9746. * @param {string} value The name of the style to set.
  9747. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  9748. * @example
  9749. * var namedStyle = new GC.Spread.Sheets.Style();
  9750. * namedStyle.name = "style1";
  9751. * namedStyle.backColor = "green";
  9752. * activeSheet.addNamedStyle(namedStyle);
  9753. * activeSheet.setStyleName(1, 1, "style1"); // cell(1,1)'s backColor is green.
  9754. * activeSheet.setStyleName(2, 1, "style1");
  9755. */
  9756. setStyleName(row: number, column: number, value: string, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  9757. /**
  9758. * Sets the tag value for the specified cell in the specified sheet area.
  9759. * @param {number} row The row index.
  9760. * @param {number} col The column index.
  9761. * @param {Object} tag The tag value to set for the specified cell.
  9762. * @param {GC.Spread.Sheets.SheetArea} sheetArea The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  9763. * @example
  9764. * activeSheet.setTag(1,1,"test");
  9765. */
  9766. setTag(row: number, col: number, tag: any, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  9767. /**
  9768. * Sets the formatted text in the cell in the specified sheet area.
  9769. * @param {number} row The row index.
  9770. * @param {number} col The column index.
  9771. * @param {string} value The text for the specified cell.
  9772. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  9773. * @example
  9774. * activeSheet.setText(1, 0, "10");
  9775. */
  9776. setText(row: number, col: number, value: string, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  9777. /**
  9778. * Sets the value for the specified cell in the specified sheet area.
  9779. * @param {number} row The row index.
  9780. * @param {number} col The column index.
  9781. * @param {Object} value The value to set for the specified cell. if the value is rich text format, should include a richText field which type is a rich text style array.
  9782. * @param {GC.Spread.Sheets.SheetArea} [sheetArea] The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  9783. * @param {boolean} ignoreRecalc Whether to ignore recalculation.
  9784. * @example
  9785. * //This example uses the setValue method.
  9786. * sheet.setValue(0,2,"ColumnHeader", GC.Spread.Sheets.SheetArea.colHeader);
  9787. * sheet.setValue(2,0,{richText:[{style:{font:'bold 24px Arial'},text:'SpreadJS'}]}, GC.Spread.Sheets.SheetArea.rowHeader);
  9788. * sheet.setValue(1, 1, {richText:[{style:{vertAlign: GC.Spread.Sheets.VertAlign.subscript},text:'SpreadJS'}]}, GC.Spread.Sheets.SheetArea.viewport);
  9789. */
  9790. setValue(row: number, col: number, value: any, sheetArea?: GC.Spread.Sheets.SheetArea, ignoreRecalc?: boolean): void;
  9791. /**
  9792. * Moves the view of a cell to the specified position in the viewport.
  9793. * @param {number} row The row index.
  9794. * @param {number} col The column index.
  9795. * @param {GC.Spread.Sheets.VerticalPosition} verticalPosition The vertical position in which to display the cell.
  9796. * @param {GC.Spread.Sheets.HorizontalPosition} horizontalPosition The horizontal position in which to display the cell.
  9797. * @example
  9798. * //This example uses the showCell method.
  9799. * //Set cell (3,3) as the active cell
  9800. * activeSheet.setActiveCell(3, 3);
  9801. * //Display the active cell at top left
  9802. * activeSheet.showCell(3, 3, GC.Spread.Sheets.VerticalPosition.top, GC.Spread.Sheets.HorizontalPosition.left);
  9803. */
  9804. showCell(row: number, col: number, verticalPosition: GC.Spread.Sheets.VerticalPosition, horizontalPosition: GC.Spread.Sheets.HorizontalPosition): void;
  9805. /**
  9806. * Moves the view of a column to the specified position in the viewport.
  9807. * @param {number} col The column index.
  9808. * @param {GC.Spread.Sheets.HorizontalPosition} horizontalPosition The horizontal position in which to display the column.
  9809. * @example
  9810. * activeSheet.showColumn(9, GC.Spread.Sheets.HorizontalPosition.left);
  9811. */
  9812. showColumn(col: number, horizontalPosition: GC.Spread.Sheets.HorizontalPosition): void;
  9813. /**
  9814. * Gets or sets whether the column outline (range group) is visible.
  9815. * @param {boolean} value Whether to display the column outline.
  9816. * @returns {boolean | GC.Spread.Sheets.Worksheet} If no value is set, returns a value that indicates whether the column outline is displayed on this sheet; otherwise, returns the worksheet.
  9817. * @example
  9818. * //This example uses the showColumnOutline method.
  9819. * activeSheet.showColumnOutline(false);
  9820. */
  9821. showColumnOutline(value?: boolean): any;
  9822. /**
  9823. * Moves the view of a row to the specified position in the viewport.
  9824. * @param {number} row The row index.
  9825. * @param {GC.Spread.Sheets.VerticalPosition} verticalPosition The vertical position in which to display the row.
  9826. * @example
  9827. * activeSheet.showRow(9, GC.Spread.Sheets.VerticalPosition.top);
  9828. */
  9829. showRow(row: number, verticalPosition: GC.Spread.Sheets.VerticalPosition): void;
  9830. /**
  9831. * Gets or sets whether the row outline (range group) is visible.
  9832. * @param {boolean} value Whether to display the row outline.
  9833. * @returns {boolean | GC.Spread.Sheets.Worksheet} If no value is set, returns a value that indicates whether the row outline is displayed on this sheet; otherwise, returns the worksheet.
  9834. * @example
  9835. * //This example uses the showRowOutline method.
  9836. * activeSheet.showRowOutline(false);
  9837. */
  9838. showRowOutline(value?: boolean): any;
  9839. /**
  9840. * Sorts a range of cells in this sheet in the data model.
  9841. * @param {number} row The index of the starting row of the block of cells to sort.
  9842. * @param {number} column The index of the starting column of the block of cells to sort.
  9843. * @param {number} rowCount The number of rows in the block of cells.
  9844. * @param {number} columnCount The number of columns in the block of cells.
  9845. * @param {boolean} byRows Set to <c>true</c> to sort by rows, and <c>false</c> to sort by columns.
  9846. * @param {Object} sortInfo The SortInfo object with sort criteria and information about how to perform the sort. For example, [{index:0,ascending:true,compareFunction: Function}]
  9847. * @param {number} sortInfo.index The index of the column or row on which to sort.
  9848. * @param {boolean} sortInfo.ascending Whether the sort order is ascending.
  9849. * @param {Function} sortInfo.compareFunction Whether the sort order is ascending. function (value1, value2) {return 0;}.
  9850. * @returns {boolean} <c>true</c> if the data is sorted successfully; otherwise, <c>false</c>.
  9851. * @example
  9852. * //This example sorts a range.
  9853. * sheet.setValue(0,0,"112");
  9854. * sheet.setValue(1,0,"10");
  9855. * sheet.setValue(2,0,"223");
  9856. * sheet.setValue(3,0,"20");
  9857. * sheet.setValue(4,0,"334");
  9858. * sheet.setValue(5,0,"30");
  9859. * function pinyinCompare (obj1, obj2) {
  9860. * return obj1.toString().localeCompare(obj2.toString(), 'zh');
  9861. * }
  9862. * sheet.sortRange(0, 0, 6, 1, true, [
  9863. * {index:0, ascending:true, compareFunction: pinyinCompare}
  9864. * ]);
  9865. */
  9866. sortRange(row: number, column: number, rowCount: number, columnCount: number, byRows: boolean, sortInfo: GC.Spread.Sheets.ISortInfo[]): boolean;
  9867. /**
  9868. * Starts to edit the cell.
  9869. * @param {boolean} selectAll Set to <c>true</c> to select all the text in the cell.
  9870. * @param {string} defaultText The default text to display while editing the cell.
  9871. * @example
  9872. * //This example uses the startEdit method.
  9873. * activeSheet.setActiveCell(5,5);
  9874. * activeSheet.startEdit(true, "Test");
  9875. */
  9876. startEdit(selectAll?: boolean, defaultText?: string): void;
  9877. /**
  9878. * Suspends the calculation service.
  9879. * @param {boolean} ignoreDirty Specifies whether to invalidate the dependency cells.
  9880. * @example
  9881. * //This example uses the suspendCalcService method.
  9882. * activeSheet.suspendCalcService(false);
  9883. * activeSheet.setValue(0,0,1);
  9884. * activeSheet.setValue(0,1,2);
  9885. * activeSheet.setValue(0,2,10);
  9886. * activeSheet.getCell(1,1).formula("=SUM(A1:C1)");
  9887. * activeSheet.resumeCalcService(true);
  9888. */
  9889. suspendCalcService(ignoreDirty?: boolean): void;
  9890. /**
  9891. * Suspends recording the dirty data.
  9892. * @example
  9893. * //This example uses the suspendDirty method.
  9894. * var customers = [
  9895. * { ID: 0, Name: 'A', Info1: 'Info0' },
  9896. * { ID: 1, Name: 'B', Info1: 'Info1' },
  9897. * { ID: 2, Name: 'C', Info1: 'Info2' },
  9898. * ];
  9899. * activeSheet.setDataSource(customers);
  9900. * activeSheet.suspendDirty();
  9901. * alert(activeSheet.isDirtySuspended());
  9902. * activeSheet.resumeDirty();
  9903. * alert(activeSheet.isDirtySuspended());
  9904. */
  9905. suspendDirty(): void;
  9906. /**
  9907. * Suspends the event.
  9908. * @example
  9909. * //This example suspends and resumes the event.
  9910. * activeSheet.bind(GC.Spread.Sheets.Events.CellChanged, function (sender, args) {
  9911. * if (args.propertyName === "value") {
  9912. * alert(activeSheet.getValue(args.row, args.col));
  9913. * }
  9914. * });
  9915. * activeSheet.suspendEvent();
  9916. * activeSheet.setValue(0, 0, "111");
  9917. * activeSheet.resumeEvent();
  9918. * activeSheet.setValue(1, 1, "222");
  9919. */
  9920. suspendEvent(): void;
  9921. /**
  9922. * Suspends the paint.
  9923. */
  9924. suspendPaint(): void;
  9925. /**
  9926. * Gets or sets the tag value for the current sheet.
  9927. * @param {Object} value The tag value to set for the current sheet.
  9928. * @returns {Object | GC.Spread.Sheets.Worksheet} If no value is set, returns the tag value of the current sheet; otherwise, returns the worksheet.
  9929. * @example
  9930. * //This example sets the sheet tag.
  9931. * activeSheet.tag("test");
  9932. * alert(activeSheet.tag());
  9933. */
  9934. tag(value?: any): any;
  9935. /**
  9936. * Saves the object state to a JSON string.
  9937. * @param {Object} serializationOption Serialization option that contains the <i>includeBindingSource</i> argument. See the Remarks for more information.
  9938. * @returns {Object} The sheet data.
  9939. * @example
  9940. * //This example uses the toJSON method.
  9941. * activeSheet.getCell(0,0).value(123);
  9942. * var jsonStr = null;
  9943. * //export
  9944. * jsonStr = JSON.stringify(activeSheet.toJSON());
  9945. * //import
  9946. * activeSheet.fromJSON(JSON.parse(jsonStr));
  9947. * alert(jsonStr);
  9948. */
  9949. toJSON(serializationOption?: Object): Object;
  9950. /**
  9951. * Removes the binding of an event to the sheet.
  9952. * @param {string} type The event type.
  9953. * @param {Function} fn Specifies the function for which to remove the binding.
  9954. * @example
  9955. * //This example unbinds the event after setting the first value.
  9956. * activeSheet.bind(GC.Spread.Sheets.Events.CellChanged, function (sender, args) {
  9957. * if (args.propertyName === "value") {
  9958. * alert(activeSheet.getValue(args.row, args.col));
  9959. * }
  9960. * });
  9961. * activeSheet.setValue(0, 0, "111");
  9962. * activeSheet.unbind(GC.Spread.Sheets.Events.CellChanged);
  9963. * activeSheet.setValue(1, 0, "222");
  9964. * activeSheet.setValue(2, 0, "333");
  9965. * activeSheet.setValue(3, 0, "444");
  9966. */
  9967. unbind(type: string, fn?: Function): void;
  9968. /**
  9969. * Removes the binding of all events to the sheet.
  9970. * @example
  9971. * //This example cancels monitoring of all events.
  9972. * activeSheet.bind(GC.Spread.Sheets.Events.CellChanged, function (sender, args) {
  9973. * if (args.propertyName === "value") {
  9974. * alert(activeSheet.getValue(args.row, args.col));
  9975. * }
  9976. * });
  9977. * activeSheet.setValue(0, 0, "111");
  9978. * activeSheet.unbindAll(); //cancel monitoring of all events.
  9979. * activeSheet.setValue(1, 0, "222");
  9980. * activeSheet.setValue(2, 0, "333");
  9981. * activeSheet.setValue(3, 0, "444");
  9982. */
  9983. unbindAll(): void;
  9984. /**
  9985. * Ungroups the sparklines in the specified group.
  9986. * @param {GC.Spread.Sheets.Sparklines.SparklineGroup} group The sparkline group.
  9987. * @example
  9988. * //This example uses the ungroupSparkline method.
  9989. * activeSheet.setValue(0, 0, "Data Range is A2-A9");
  9990. * activeSheet.setValue(1, 0, 1);
  9991. * activeSheet.setValue(2, 0, -2);
  9992. * activeSheet.setValue(3, 0, -1);
  9993. * activeSheet.setValue(4, 0, 6);
  9994. * activeSheet.setValue(5, 0, 4);
  9995. * activeSheet.setValue(6, 0, -4);
  9996. * activeSheet.setValue(7, 0, 3);
  9997. * activeSheet.setValue(8, 0, 8);
  9998. * var data = new GC.Spread.Sheets.Range(1, 0, 8, 1);
  9999. * var setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
  10000. * var s1= activeSheet.setSparkline(11, 0, data, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
  10001. * var s2 =activeSheet.setSparkline(11, 3, data, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.column, setting);
  10002. * var s3= activeSheet.setSparkline(11, 6, data, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.winloss, setting);
  10003. * var group = activeSheet.groupSparkline([s1,s2,s3]);
  10004. * //activeSheet.ungroupSparkline(group);
  10005. */
  10006. ungroupSparkline(group: GC.Spread.Sheets.Sparklines.SparklineGroup): void;
  10007. /**
  10008. * Sets whether the worksheet is displayed.
  10009. * @param {boolean} [value] Whether the worksheet is displayed.
  10010. * @returns {boolean|GC.Spread.Sheets.Worksheet} If you call this function without a parameter, it returns a boolean indicating whether the sheet is visible;
  10011. * otherwise, it returns the current worksheet object.
  10012. * @example
  10013. * activeSheet.visible(false);
  10014. */
  10015. visible(value?: boolean): any;
  10016. /**
  10017. * Gets or sets the zoom factor for the sheet.
  10018. * @param {number} [factor] The zoom factor.
  10019. * @returns {number|GC.Spread.Sheets.Worksheet} If no value is set, returns the zoom factor; otherwise, returns the worksheet.
  10020. * @example
  10021. * //This example zooms the sheet.
  10022. * spread.options.allowUserZoom = false;
  10023. * sheet.zoom(3);
  10024. */
  10025. zoom(factor?: number): any;
  10026. }
  10027. module AutoMerge{
  10028. export interface IRangeInfo{
  10029. range: GC.Spread.Sheets.Range;
  10030. direction: GC.Spread.Sheets.AutoMerge.AutoMergeDirection;
  10031. mode: GC.Spread.Sheets.AutoMerge.AutoMergeMode;
  10032. sheetArea: GC.Spread.Sheets.SheetArea;
  10033. }
  10034. /**
  10035. * Indicates the auto merge direction.
  10036. * @enum {number}
  10037. */
  10038. export enum AutoMergeDirection{
  10039. /**
  10040. * Indicates to cancel the auto merge.
  10041. */
  10042. none= 0,
  10043. /**
  10044. * Indicates to apply the auto merge in column direction.
  10045. */
  10046. column= 1,
  10047. /**
  10048. * Indicates to apply the auto merge in row direction.
  10049. */
  10050. row= 2,
  10051. /**
  10052. * Indicates to apply the auto merge in column direction preferentially then in row direction.
  10053. */
  10054. columnRow= 3,
  10055. /**
  10056. * Indicates to apply the auto merge in row direction preferentially then in column direction.
  10057. */
  10058. rowColumn= 4
  10059. }
  10060. /**
  10061. * Indicates the auto merge mode.
  10062. * @enum {number}
  10063. */
  10064. export enum AutoMergeMode{
  10065. /**
  10066. * Indicates to apply the auto merge when neighboring cells have same value.
  10067. */
  10068. free= 0,
  10069. /**
  10070. * Indicates to apply the auto merge when neighboring cells have same value and the corresponding cells in previous row or column are merged automatically.
  10071. */
  10072. restricted= 1
  10073. }
  10074. }
  10075. module Barcode{
  10076. export class Codabar extends GC.Spread.Sheets.Sparklines.SparklineEx{
  10077. /**
  10078. * Represents the class for the Codabar.
  10079. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  10080. * @class
  10081. */
  10082. constructor();
  10083. }
  10084. export class Code128 extends GC.Spread.Sheets.Sparklines.SparklineEx{
  10085. /**
  10086. * Represents the class for the Code128.
  10087. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  10088. * @class
  10089. */
  10090. constructor();
  10091. }
  10092. export class Code39 extends GC.Spread.Sheets.Sparklines.SparklineEx{
  10093. /**
  10094. * Represents the class for the Code39.
  10095. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  10096. * @class
  10097. */
  10098. constructor();
  10099. }
  10100. export class Code49 extends GC.Spread.Sheets.Sparklines.SparklineEx{
  10101. /**
  10102. * Represents the class for the Code49.
  10103. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  10104. * @class
  10105. */
  10106. constructor();
  10107. }
  10108. export class Code93 extends GC.Spread.Sheets.Sparklines.SparklineEx{
  10109. /**
  10110. * Represents the class for the Code93.
  10111. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  10112. * @class
  10113. */
  10114. constructor();
  10115. }
  10116. export class DataMatrix extends GC.Spread.Sheets.Sparklines.SparklineEx{
  10117. /**
  10118. * Represents the class for the DataMatrix.
  10119. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  10120. * @class
  10121. */
  10122. constructor();
  10123. }
  10124. export class EAN13 extends GC.Spread.Sheets.Sparklines.SparklineEx{
  10125. /**
  10126. * Represents the class for the EAN13.
  10127. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  10128. * @class
  10129. */
  10130. constructor();
  10131. }
  10132. export class EAN8 extends GC.Spread.Sheets.Sparklines.SparklineEx{
  10133. /**
  10134. * Represents the class for the EAN8.
  10135. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  10136. * @class
  10137. */
  10138. constructor();
  10139. }
  10140. export class GS1_128 extends GC.Spread.Sheets.Sparklines.SparklineEx{
  10141. /**
  10142. * Represents the class for the GS1_128.
  10143. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  10144. * @class
  10145. */
  10146. constructor();
  10147. }
  10148. export class PDF417 extends GC.Spread.Sheets.Sparklines.SparklineEx{
  10149. /**
  10150. * Represents the class for the PDF417.
  10151. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  10152. * @class
  10153. */
  10154. constructor();
  10155. }
  10156. export class QRCode extends GC.Spread.Sheets.Sparklines.SparklineEx{
  10157. /**
  10158. * Represents the class for the QRCode.
  10159. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  10160. * @class
  10161. */
  10162. constructor();
  10163. }
  10164. }
  10165. module Bindings{
  10166. export class CellBindingSource{
  10167. /**
  10168. * Represents a source for cell binding.
  10169. * @param {Object} source The data source.
  10170. * @class
  10171. * @example
  10172. * var person = {name: "Wang feng", age: 25, address: {postcode: "710075"}};
  10173. * var source = new GC.Spread.Sheets.Bindings.CellBindingSource(person);
  10174. * activeSheet.setBindingPath(0, 0, "name");
  10175. * activeSheet.setBindingPath(1, 1, "age");
  10176. * activeSheet.setBindingPath(3, 3, "address.postcode");
  10177. * activeSheet.setDataSource(source);
  10178. */
  10179. constructor(source: Object);
  10180. /**
  10181. * Gets the wrapped data source for cell binding.
  10182. * @returns {Object} The original data source.
  10183. * @example
  10184. * //This example gets the name.
  10185. * var person = { name: "Wang feng", age: 25, address: { postcode: "710075" } };
  10186. * var source = new GC.Spread.Sheets.Bindings.CellBindingSource(person);
  10187. * activeSheet.setBindingPath(0, 0, "name");
  10188. * activeSheet.setBindingPath(1, 1, "age");
  10189. * activeSheet.setBindingPath(3, 3, "address.postcode");
  10190. * activeSheet.setDataSource(source);
  10191. * alert(source.getSource().name);
  10192. */
  10193. getSource(): Object;
  10194. /**
  10195. * Gets the value of the source by the binding path.
  10196. * @param {string} path The binding path.
  10197. * @returns {Object} Returns the value of the binding source at the specified path.
  10198. * @example
  10199. * //This example gets the value.
  10200. * var person = {name: "Wang feng", age: 25, address: {postcode: "710075"}};
  10201. * var source = new GC.Spread.Sheets.Bindings.CellBindingSource(person);
  10202. * activeSheet.setBindingPath(0, 0, "name");
  10203. * activeSheet.setBindingPath(1, 1, "age");
  10204. * activeSheet.setBindingPath(3, 3, "address.postcode");
  10205. * activeSheet.setDataSource(source);
  10206. * alert(source.getValue("name"));
  10207. */
  10208. getValue(path: string): Object;
  10209. /**
  10210. * Sets the value of the source by the binding path.
  10211. * @param {string} path The row index.
  10212. * @param {Object} value The value to set.
  10213. * @example
  10214. * //This example sets the name value.
  10215. * var person = {name: "Wang feng", age: 25, address: {postcode: "710075"}};
  10216. * var source = new GC.Spread.Sheets.Bindings.CellBindingSource(person);
  10217. * activeSheet.setBindingPath(0, 0, "name");
  10218. * activeSheet.setBindingPath(1, 1, "age");
  10219. * activeSheet.setBindingPath(3, 3, "address.postcode");
  10220. * activeSheet.setDataSource(source);
  10221. * source.setValue("name", "test");
  10222. * activeSheet.resumePaint();
  10223. * activeSheet.repaint();
  10224. */
  10225. setValue(path: string, value: Object): void;
  10226. }
  10227. }
  10228. module CalcEngine{
  10229. /**
  10230. * Evaluates the specified formula.
  10231. * @param {object} context The evaluation context; in general, you should use the active sheet object.
  10232. * @param {string} formula The formula string.
  10233. * @param {number} [baseRow] The base row index of the formula.
  10234. * @param {number} [baseColumn] The base column index of the formula.
  10235. * @param {boolean} [useR1C1] Whether to use the r1c1 reference style.
  10236. * @example
  10237. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById('ss'), { sheetCount: 1 });
  10238. * sheet = spread.getSheet(0);
  10239. * sheet.setValue(0, 0, 1);
  10240. * sheet.setValue(1, 0, 2);
  10241. * // Using EvaluateFormula() method to evaluate formula without setting formula in sheet's cell
  10242. * var result = GC.Spread.Sheets.CalcEngine.evaluateFormula(sheet, "SUM(A1:A2)", 0, 0);
  10243. * console.log("SUM(A1:A2) = " + result);
  10244. * @returns {object} The evaluated formula result.
  10245. */
  10246. function evaluateFormula(context: Object, formula: string, baseRow?: number, baseColumn?: number, useR1C1?: boolean): any;
  10247. /**
  10248. * Unparse the specified expression tree to formula string.
  10249. * @param {object} context The context; in general, you should use the active sheet object.
  10250. * @param {GC.Spread.CalcEngine.Expression} expression The expression tree.
  10251. * @param {number} [baseRow] The base row index of the formula.
  10252. * @param {number} [baseColumn] The base column index of the formula.
  10253. * @param {boolean} [useR1C1] Whether to use the r1c1 reference style.
  10254. * @returns {string} The formula string.
  10255. * @example
  10256. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById('ss'), { sheetCount: 1 });
  10257. * sheet = spread.getSheet(0);
  10258. * sheet.setValue(0, 0, 1);
  10259. * sheet.setValue(0, 1, 2);
  10260. * sheet.setValue(0, 2, 3);
  10261. * sheet.addCustomName("customName1", "=12", 0, 0);
  10262. * sheet.addCustomName("customName2", "Average(20,45)", 0, 0);
  10263. * sheet.addCustomName("customName3", "=$A$1:$C$1");
  10264. * sheet.setFormula(1, 0, "customName1");
  10265. * sheet.setFormula(1, 1, "customName2");
  10266. * sheet.setFormula(1, 2, "sum(customName3)");
  10267. * var cname = sheet.getCustomName("customName2");
  10268. * if (cname instanceof GC.Spread.Sheets.NameInfo) {
  10269. * // Get CustomName
  10270. * var name = cname.getName();
  10271. * // Get Expression
  10272. * var expression = cname.getExpression();
  10273. * // Get Expression String
  10274. * var expStr = GC.Spread.Sheets.CalcEngine.expressionToFormula(sheet, expression, 0, 0);
  10275. * console.log("Name: " + name + " ; Expression: " + expStr);
  10276. * }
  10277. */
  10278. function expressionToFormula(context: Object, expression: GC.Spread.CalcEngine.Expression, baseRow?: number, baseColumn?: number, useR1C1?: boolean): string;
  10279. /**
  10280. * Parse the specified formula to expression tree.
  10281. * @param {object} context The context; in general, you should use the active sheet object.
  10282. * @param {string} formula The formula string.
  10283. * @param {number} [baseRow] The base row index of the formula.
  10284. * @param {number} [baseColumn] The base column index of the formula.
  10285. * @param {boolean} [useR1C1] Whether to use the r1c1 reference style.
  10286. * @returns {GC.Spread.CalcEngine.Expression} The expression tree.
  10287. * @example
  10288. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById('ss'), { sheetCount: 1 });
  10289. * sheet = spread.getSheet(0);
  10290. * sheet.setValue(0, 0, 1);
  10291. * sheet.setValue(0, 1, 2);
  10292. * sheet.setValue(0, 2, 3);
  10293. * sheet.getCell(4, 4).formula("=SUM(A1:C1)");
  10294. * var formula = sheet.getFormula(4, 4);
  10295. * var expression = GC.Spread.Sheets.CalcEngine.formulaToExpression(sheet, formula, 0, 0);
  10296. * console.log("Function Name is: " + expression.functionName);
  10297. */
  10298. function formulaToExpression(context: Object, formula: string, baseRow?: number, baseColumn?: number, useR1C1?: boolean): GC.Spread.CalcEngine.Expression;
  10299. /**
  10300. * Converts a formula string to the specified cell ranges.
  10301. * @param {GC.Spread.Sheets.Worksheet} sheet The base sheet.
  10302. * @param {string} formula The formula.
  10303. * @param {number} baseRow The base row index of the formula.
  10304. * @param {number} baseCol The base column index of the formula.
  10305. * @returns {Array} The cell ranges that refers to the formula string.
  10306. */
  10307. function formulaToRanges(sheet: GC.Spread.Sheets.Worksheet, formula: string, baseRow?: number, baseCol?: number): Object[];
  10308. /**
  10309. * Attempts to find a value for one cell that produces the desired formula result in another cell.
  10310. * @param {GC.Spread.Sheets.Worksheet} changingSheet The sheet that contains the cell that you want to adjust.
  10311. * @param {number} changingRow The row index of the cell that contains the value that you want to adjust.
  10312. * @param {number} changingColumn The column index of the cell that contains the value that you want to adjust.
  10313. * @param {GC.Spread.Sheets.Worksheet} formulaSheet The sheet that contains the formula that you want to resolve.
  10314. * @param {number} formulaRow The row index of the cell that contains the formula that you want to resolve.
  10315. * @param {number} formulaColumn The column index of the cell that contains the formula that you want to resolve.
  10316. * @param {number} desiredResult The formula result that you want.
  10317. * @example
  10318. * // This sample shows how to use the goal seek.
  10319. * // Loan amount is 10000, term is 18 months and pay 600 each month, evaluate what interest rate you will need to secure in order to meet your loan goal.
  10320. * sheet.setValue(0, 1, 10000); // Loan Amount
  10321. * sheet.setValue(1, 1, 18); // Term in Months
  10322. * sheet.setFormatter(2, 1, "0%"); // Interest Rate
  10323. * sheet.setFormatter(3, 1, "0.00");
  10324. * sheet.setFormula(3, 1, "PMT(B3/12,B2,B1)"); // Payment
  10325. * GC.Spread.Sheets.CalcEngine.goalSeek(sheet, 2, 1, sheet, 3, 1, -600); // result in B3 is 10%
  10326. */
  10327. function goalSeek(changingSheet: GC.Spread.Sheets.Worksheet, changingRow: number, changingColumn: number, formulaSheet: GC.Spread.Sheets.Worksheet, formulaRow: number, formulaColumn: number, desiredResult: number): void;
  10328. /**
  10329. * Converts the specified cell range to a formula string.
  10330. * @param {Array.<GC.Spread.Sheets.Range>} ranges The cell range in the sheet.
  10331. * @param {number} [baseRow] The base row index of the formula.
  10332. * @param {number} [baseCol] The base column index of the formula.
  10333. * @param {GC.Spread.Sheets.CalcEngine.RangeReferenceRelative} [rangeReferenceRelative] Whether the range reference is relative or absolute.
  10334. * @param {boolean} [useR1C1] Whether to use the r1c1 reference style.
  10335. * @returns {string} The formula string that refers to the specified cell range.
  10336. * @example
  10337. * spread = new GC.Spread.Sheets.Workbook(document.getElementById('ss'), { sheetCount: 1 });
  10338. * sheet = spread.getSheet(0);
  10339. * // Setting Value
  10340. * sheet.setValue(0, 0, 1, 3);
  10341. * sheet.setValue(1, 0, 50, 3);
  10342. * sheet.setValue(2, 0, 100, 3);
  10343. * sheet.setValue(3, 0, 2, 3);
  10344. * sheet.setValue(4, 0, 60, 3);
  10345. * sheet.setValue(5, 0, 90, 3);
  10346. * sheet.setValue(6, 0, 3, 3);
  10347. * sheet.setValue(7, 0, 40, 3);
  10348. * sheet.clearSelection();
  10349. * // Adding selections
  10350. * sheet.addSelection(0, 0, 3, 1);
  10351. * sheet.addSelection(5, 0, 2, 1);
  10352. * var ranges = sheet.getSelections();
  10353. * // getting range string
  10354. * var rangesStr = GC.Spread.Sheets.CalcEngine.rangesToFormula(ranges);
  10355. * // creating formula using selected ranges
  10356. * var formula = "Sum(" + rangesStr + ")";
  10357. * // setting formula in Sheet's cell
  10358. * sheet.setFormula(5, 5, formula, GC.Spread.Sheets.SheetArea.viewport);
  10359. */
  10360. function rangesToFormula(ranges: GC.Spread.Sheets.Range[], baseRow?: number, baseCol?: number, rangeReferenceRelative?: GC.Spread.Sheets.CalcEngine.RangeReferenceRelative, useR1C1?: boolean): string;
  10361. /**
  10362. * Converts the specified cell range to a formula string.
  10363. * @param {GC.Spread.Sheets.Range} range The cell range in the sheet.
  10364. * @param {number} [baseRow] The base row index of the formula.
  10365. * @param {number} [baseCol] The base column index of the formula.
  10366. * @param {GC.Spread.Sheets.CalcEngine.RangeReferenceRelative} [rangeReferenceRelative] Whether the range reference is relative or absolute.
  10367. * @param {boolean} [useR1C1] Whether to use the r1c1 reference style.
  10368. * @returns {string} The formula string that refers to the specified cell range.
  10369. * @example
  10370. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById('ss'), { sheetCount: 1 });
  10371. * sheet = spread.getSheet(0);
  10372. * // setting value
  10373. * sheet.setValue(0, 0, 1, 3);
  10374. * sheet.setValue(1, 0, 50, 3);
  10375. * sheet.setValue(2, 0, 100, 3);
  10376. * sheet.setValue(3, 0, 2, 3);
  10377. * sheet.setValue(4, 0, 60, 3);
  10378. * sheet.setValue(5, 0, 90, 3);
  10379. * sheet.clearSelection();
  10380. * // adding selection
  10381. * sheet.addSelection(2, 0, 3, 1);
  10382. * var range = sheet.getSelections();
  10383. * // Getting range string
  10384. * var rangeStr = GC.Spread.Sheets.CalcEngine.rangeToFormula(range[0]);
  10385. * // creating formula using selected range
  10386. * var formula = "Sum(" + rangeStr + ")";
  10387. * // setting formula in Sheet's cell
  10388. * sheet.setFormula(5, 5, formula, GC.Spread.Sheets.SheetArea.viewport);
  10389. */
  10390. function rangeToFormula(range: GC.Spread.Sheets.Range, baseRow?: number, baseCol?: number, rangeReferenceRelative?: GC.Spread.Sheets.CalcEngine.RangeReferenceRelative, useR1C1?: boolean): string;
  10391. /**
  10392. * Specifies whether the range reference is relative or absolute.
  10393. * @enum {number}
  10394. */
  10395. export enum RangeReferenceRelative{
  10396. /**
  10397. * Specifies all reference is absolute
  10398. */
  10399. allAbsolute= 0,
  10400. /**
  10401. * Specifies start row is relative
  10402. */
  10403. startRowRelative= 1,
  10404. /**
  10405. * Specifies start column is relative
  10406. */
  10407. startColRelative= 2,
  10408. /**
  10409. * Specifies end row is relative
  10410. */
  10411. endRowRelative= 4,
  10412. /**
  10413. * Specifies end column is relative
  10414. */
  10415. endColRelative= 8,
  10416. /**
  10417. * Specifies row is relative
  10418. */
  10419. rowRelative= 5,
  10420. /**
  10421. * Specifies column is relative
  10422. */
  10423. colRelative= 10,
  10424. /**
  10425. * Specifies all reference is relative
  10426. */
  10427. allRelative= 15
  10428. }
  10429. }
  10430. module CellState{
  10431. export class CellStateManager{
  10432. /**
  10433. * Represents a cellstae manager that can manage all cell state in a sheet.
  10434. * @class
  10435. * @param {GC.Spread.Sheets.Worksheet} sheet The worksheet.
  10436. */
  10437. constructor(sheet: GC.Spread.Sheets.Worksheet);
  10438. /**
  10439. * @description Add cell state instance for range , which will apply style of cellState when the state of range cell matched.
  10440. * @param range {GC.Spread.Sheets.Range} The scope range which will apply style of cellState.
  10441. * @param state {GC.Spread.Sheets.CellStatesType} Which state will use style.
  10442. * @param style {GC.Spread.Sheets.Style} Which style when the state is matched.
  10443. * @param sheetArea {GC.Spread.Sheets.SheetArea} The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  10444. * @example
  10445. * var style = new GC.Spread.Sheets.Style();
  10446. * style.backColor = 'blue';
  10447. * style.foreColor = 'red';
  10448. * var range = new GC.Spread.Sheets.Range(1,2,3,3);
  10449. * sheet.cellStates.add(range,GC.Spread.Sheets.CellStatesType.hover,style,101);
  10450. */
  10451. add(range: GC.Spread.Sheets.Range, state: GC.Spread.Sheets.CellStatesType, style: GC.Spread.Sheets.Style, sheetArea?: GC.Spread.Sheets.SheetArea): void;
  10452. /**
  10453. * @description Clear all style by range, after clear there are no style will be applied when the cell state is matched.
  10454. * @param range {GC.Spread.Sheets.Range} The scope range for clear.
  10455. * @param sheetArea {GC.Spread.Sheets.SheetArea} The sheet area. If this parameter is not provided, it defaults to <b>viewport</b>.
  10456. * @example
  10457. * var range = new GC.Spread.Sheets.Range(1,2,3,3);
  10458. * sheet.cellStates.clear(range, GC.Spread.Sheets.SheetArea.viewport);
  10459. */
  10460. clear(range: GC.Spread.Sheets.Range, sheetArea: GC.Spread.Sheets.SheetArea): void;
  10461. }
  10462. }
  10463. module CellTypes{
  10464. export interface ICelltypeItemOption{
  10465. text: string;
  10466. value: number | string;
  10467. }
  10468. export interface IItemSpacing{
  10469. horizontal?: number;
  10470. vertical?: number;
  10471. }
  10472. /**
  10473. * Specifies the text alignment for check box cells.
  10474. * @enum {number}
  10475. * @example
  10476. * //This example creates a check box cell.
  10477. * var cellType1 = new GC.Spread.Sheets.CellTypes.CheckBox();
  10478. * cellType1.caption("caption");
  10479. * cellType1.textTrue("true");
  10480. * cellType1.textFalse("false");
  10481. * cellType1.textIndeterminate("indeterminate");
  10482. * cellType1.textAlign(GC.Spread.Sheets.CellTypes.CheckBoxTextAlign.bottom);
  10483. * cellType1.isThreeState(true);
  10484. * activeSheet.getCell(1, 1).cellType(cellType1);
  10485. */
  10486. export enum CheckBoxTextAlign{
  10487. /**
  10488. * Specifies text is on top of the check box.
  10489. */
  10490. top= 0,
  10491. /**
  10492. * Specifies text is below the check box.
  10493. */
  10494. bottom= 1,
  10495. /**
  10496. * Specifies text is to the left of the check box.
  10497. */
  10498. left= 2,
  10499. /**
  10500. * Specifies text is to the right of the check box.
  10501. */
  10502. right= 3
  10503. }
  10504. /**
  10505. * Specifies the extend direction for radio list cells.
  10506. * @enum {number}
  10507. * @example
  10508. * //This example creates a radio button list cell.
  10509. * var cellType2 = new GC.Spread.Sheets.CellTypes.RadioButtonList();
  10510. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  10511. * cellType2.direction(GC.Spread.Sheets.CellTypes.Direction.vertical);
  10512. * activeSheet.getCell(2, 2).cellType(cellType2);
  10513. */
  10514. export enum Direction{
  10515. /**
  10516. * Specifies item extend by horizontal.
  10517. */
  10518. horizontal= 0,
  10519. /**
  10520. * Specifies item extend by vertical.
  10521. */
  10522. vertical= 1
  10523. }
  10524. /**
  10525. * Represents the editor type of text cell type.
  10526. * @enum {number}
  10527. * @example
  10528. * //This example shows how to change the editor of text cell type to textarea.
  10529. * var tempStyle = new GC.Spread.Sheets.Style();
  10530. * tempStyle.cellType = new GC.Spread.Sheets.CellTypes.Text(GC.Spread.Sheets.CellTypes.EditorType.textarea);
  10531. * activeSheet.setDefaultStyle(tempStyle);
  10532. */
  10533. export enum EditorType{
  10534. /**
  10535. * Use textarea element as the editor of text cell type.
  10536. */
  10537. textarea= 0,
  10538. /**
  10539. * Use editorable div element as the editor of text cell type.
  10540. */
  10541. editableDiv= 1
  10542. }
  10543. /**
  10544. * Specifies what is written out to the data model for a selected item from
  10545. * certain cell types that offer a selection of multiple values.
  10546. * @readonly
  10547. * @enum {number}
  10548. * @example
  10549. * //This example uses the EditorValueType enumeration.
  10550. * var cellType2 = new GC.Spread.Sheets.CellTypes.ComboBox();
  10551. * cellType2.items(["a","b","c"]);
  10552. * cellType2.editorValueType(GC.Spread.Sheets.CellTypes.EditorValueType.text);
  10553. * activeSheet.getCell(2, 2).cellType(cellType2);
  10554. */
  10555. export enum EditorValueType{
  10556. /**
  10557. * Writes the text value of the selected item to the model.
  10558. */
  10559. text= 0,
  10560. /**
  10561. * Writes the index of the selected item to the model.
  10562. */
  10563. index= 1,
  10564. /**
  10565. * Writes the corresponding data value of the selected item to the model.
  10566. */
  10567. value= 2
  10568. }
  10569. /**
  10570. * Specifies the hyperlink's target type.
  10571. * @enum {number}
  10572. * @example
  10573. * //This example creates a hyperlink cell.
  10574. * var cellType = new GC.Spread.Sheets.CellTypes.HyperLink();
  10575. * cellType.linkColor("blue");
  10576. * cellType.visitedLinkColor("#FFFF00");
  10577. * cellType.text("GrapeCity");
  10578. * cellType.linkToolTip("Company Web Site");
  10579. * cellType.target(GC.Spread.Sheets.CellTypes.HyperLinkTargetType.self);
  10580. * activeSheet.getCell(0, 2).cellType(cellType).value("http://www.grapecity.com/");
  10581. */
  10582. export enum HyperLinkTargetType{
  10583. /**
  10584. * Opens the hyperlinked document in a new window or tab.
  10585. */
  10586. blank= 0,
  10587. /**
  10588. * Opens the hyperlinked document in the same frame where the user clicked.
  10589. */
  10590. self= 1,
  10591. /**
  10592. * Opens the hyperlinked document in the parent frame.
  10593. */
  10594. parent= 2,
  10595. /**
  10596. * Opens the hyperlinked document in the full body of the window.
  10597. */
  10598. top= 3
  10599. }
  10600. /**
  10601. * Specifies the text selection mode for buttonList cells.
  10602. * @enum {number}
  10603. * @example
  10604. * //This example creates a buttonList cell.
  10605. * var cellType2 = new GC.Spread.Sheets.CellTypes.ButtonList();
  10606. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  10607. * cellType2.selectionMode(GC.Spread.Sheets.CellTypes.SelectionMode.single);
  10608. * activeSheet.getCell(2, 2).cellType(cellType2);
  10609. */
  10610. export enum SelectionMode{
  10611. /**
  10612. * Specifies selection mode is single.
  10613. */
  10614. single= 0,
  10615. /**
  10616. * Specifies selection mode is multiple.
  10617. */
  10618. multiple= 1
  10619. }
  10620. /**
  10621. * Specifies the text alignment for check box cells.
  10622. * @enum {number}
  10623. * @example
  10624. * //This example creates a check box cell.
  10625. * var cellType = new GC.Spread.Sheets.CellTypes.RadioButtonList();
  10626. * cellType.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  10627. * cellType.textAlign(GC.Spread.Sheets.CellTypes.TextAlign.left);
  10628. * activeSheet.getCell(2, 2).cellType(cellType);
  10629. */
  10630. export enum TextAlign{
  10631. /**
  10632. * Specifies text is on the top.
  10633. */
  10634. //top = 0, = 0,
  10635. /**
  10636. * Specifies text is on the bottom.
  10637. */
  10638. //bottom = 1, = 1,
  10639. /**
  10640. * Specifies text is on the left.
  10641. */
  10642. left= 2,
  10643. /**
  10644. * Specifies text is on the right.
  10645. */
  10646. right= 3
  10647. }
  10648. export class Base{
  10649. /**
  10650. * Represents the base class for the other cell type classes.
  10651. * @class
  10652. */
  10653. constructor();
  10654. /**
  10655. * Represents the type name string used for supporting serialization.
  10656. * @type {string}
  10657. */
  10658. typeName: string;
  10659. /**
  10660. * Activates the editor, including setting properties or attributes for the editor and binding events for the editor.
  10661. * @param {Object} editorContext The DOM element that was created by the createEditorElement method.
  10662. * @param {GC.Spread.Sheets.Style} cellStyle The cell's actual style.
  10663. * @param {GC.Spread.Sheets.Rect} cellRect The cell's layout information.
  10664. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10665. */
  10666. activateEditor(editorContext: HTMLElement, cellStyle: GC.Spread.Sheets.Style, cellRect: GC.Spread.Sheets.Rect, context?: any): void;
  10667. /**
  10668. * Creates a DOM element then returns it.
  10669. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10670. * @returns {HTMLElement} Returns a DOM element.
  10671. */
  10672. createEditorElement(context?: any): HTMLElement;
  10673. /**
  10674. * Deactivates the editor, such as unbinding events for editor.
  10675. * @param {Object} editorContext The DOM element that was created by the createEditorElement method.
  10676. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10677. */
  10678. deactivateEditor(editorContext: HTMLElement, context?: any): void;
  10679. /**
  10680. * Focuses the editor DOM element.
  10681. * @param {HTMLElement} editorContext The DOM element that was created by the createEditorElement method.
  10682. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10683. */
  10684. focus(editorContext: HTMLElement, context?: any): void;
  10685. /**
  10686. * Formats a value with the specified format to a string.
  10687. * @param {Object} value The object value to format.
  10688. * @param {GC.Spread.Formatter.GeneralFormatter | string} format The format.
  10689. * @param {Object} formattedData the formatted data.
  10690. * @param {Array} [formattedData.content] - The formatted data array, each item is an object that has two properties type and value, And it may contain these types: 'number', 'text', 'fillingChar', 'placeholder', 'exponent', 'decimalSeparator', 'groupSeparator', 'numberPlaceholder', 'percent', 'permille' and 'currency'. For example: {type: 'number', value: '123'}.
  10691. * @param {string} [formattedData.conditionalForeColor] - The conditional foreground color.
  10692. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10693. * @returns {string} Returns the formatted string.
  10694. */
  10695. format(value: any, format: GC.Spread.Formatter.GeneralFormatter | string, formattedData?: GC.Spread.Sheets.FormattedData, context?: any): string;
  10696. /**
  10697. * Loads the object state from the specified JSON string.
  10698. * @param {Object} settings The cell type data from deserialization.
  10699. */
  10700. fromJSON(settings: any): void;
  10701. /**
  10702. * Gets a cell's height that can be used to handle the row's automatic fit.
  10703. * @param {Object} value The cell's value.
  10704. * @param {string} text The cell's text.
  10705. * @param {GC.Spread.Sheets.Style} cellStyle The cell's actual value.
  10706. * @param {number} zoomFactor The current sheet's zoom factor.
  10707. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10708. * @returns {number} Returns the cell's height that can be used to handle the row's automatic fit.
  10709. */
  10710. getAutoFitHeight(value: any, text: string, cellStyle: GC.Spread.Sheets.Style, zoomFactor: number, context?: any): number;
  10711. /**
  10712. * Gets a cell's width that can be used to handle the column's automatic fit.
  10713. * @param {Object} value The cell's value.
  10714. * @param {string} text The cell's text.
  10715. * @param {GC.Spread.Sheets.Style} cellStyle The cell's actual value.
  10716. * @param {number} zoomFactor The current sheet's zoom factor.
  10717. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10718. * @returns {number} Returns the cell's width that can be used to handle the column's automatic fit.
  10719. */
  10720. getAutoFitWidth(value: any, text: string, cellStyle: GC.Spread.Sheets.Style, zoomFactor: number, context?: any): number;
  10721. /**
  10722. * Gets the editor's value.
  10723. * @param {Object} editorContext The DOM element that was created by the createEditorElement method.
  10724. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10725. * @returns {Object} Returns the editor's value.
  10726. */
  10727. getEditorValue(editorContext: HTMLElement, context?: any): any;
  10728. /**
  10729. * Gets the cell type's hit information.
  10730. * @param {number} x <i>x</i>-coordinate of pointer's current location relative to the canvas.
  10731. * @param {number} y <i>y</i>-coordinate of pointer's current location relative to the canvas.
  10732. * @param {GC.Spread.Sheets.Style} cellStyle The current cell's actual style.
  10733. * @param {GC.Spread.Sheets.Rect} cellRect The current cell's layout information.
  10734. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10735. * @returns {Object} Returns an object that contains the <i>x</i>, <i>y</i>, <i>row</i>, <i>col</i>, <i>cellRect</i>, and <i>sheetArea</i> parameters, and a value to indicate <i>isReservedLocation</i>.
  10736. * <i>isReservedLocation</i> is <c>true</c> if the hit test is in a special area that the cell type needs to handle; otherwise, <c>false</c>.
  10737. */
  10738. getHitInfo(x: number, y: number, cellStyle: GC.Spread.Sheets.Style, cellRect: GC.Spread.Sheets.Rect, context?: any): GC.Spread.Sheets.IHitTestCellTypeHitInfo;
  10739. /**
  10740. * Whether the editing value has changed.
  10741. * @param {Object} oldValue Old editing value.
  10742. * @param {Object} newValue New editing value.
  10743. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10744. * @returns {boolean} <c>true</c> if oldValue equals newValue; otherwise, <c>false</c>.
  10745. */
  10746. isEditingValueChanged(oldValue: any, newValue: any, context?: any): boolean;
  10747. /**
  10748. * Whether this cell type is aware of IME.
  10749. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10750. * @returns {boolean} <c>true</c> if the cell type is aware of IME; otherwise, <c>false</c>.
  10751. */
  10752. isImeAware(context?: any): boolean;
  10753. /**
  10754. * Whether the cell type handles the keyboard event itself.
  10755. * @param {KeyboardEvent} e The KeyboardEvent.
  10756. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10757. * @returns {boolean} Returns <c>true</c> if the cell type handles the keyboard event itself; otherwise, <c>false</c>.
  10758. */
  10759. isReservedKey(e: KeyboardEvent, context?: any): boolean;
  10760. /**
  10761. * Paints a cell on the canvas.
  10762. * @param {CanvasRenderingContext2D} ctx The canvas's two-dimensional context.
  10763. * @param {Object} value The cell's value.
  10764. * @param {number} x <i>x</i>-coordinate relative to the canvas.
  10765. * @param {number} y <i>y</i>-coordinate relative to the canvas.
  10766. * @param {number} w The cell's width.
  10767. * @param {number} h The cell's height.
  10768. * @param {GC.Spread.Sheets.Style} style The cell's actual style.
  10769. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10770. */
  10771. paint(ctx: CanvasRenderingContext2D, value: any, x: number, y: number, w: number, h: number, style: GC.Spread.Sheets.Style, context?: any): void;
  10772. /**
  10773. * Paints the cell content area on the canvas.
  10774. * @param {CanvasRenderingContext2D} ctx The canvas's two-dimensional context.
  10775. * @param {Object} value The cell's value.
  10776. * @param {number} x <i>x</i>-coordinate relative to the canvas.
  10777. * @param {number} y <i>y</i>-coordinate relative to the canvas.
  10778. * @param {number} w The cell content area's width.
  10779. * @param {number} h The cell content area's height.
  10780. * @param {GC.Spread.Sheets.Style} style The cell's actual style.
  10781. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10782. */
  10783. paintContent(ctx: CanvasRenderingContext2D, value: any, x: number, y: number, w: number, h: number, style: GC.Spread.Sheets.Style, context?: any): void;
  10784. /**
  10785. * Parses the text with the specified format string to an object.
  10786. * @param {string} text The parse text string.
  10787. * @param {string} formatStr The parse format string.
  10788. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10789. * @returns {Object} The parsed object.
  10790. */
  10791. parse(text: string, formatStr: string, context?: any): any;
  10792. /**
  10793. * Processes key down in display mode.
  10794. * @param {KeyboardEvent} event The KeyboardEvent.
  10795. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10796. * @returns {boolean} Returns <c>true</c> if the process is successful; otherwise, <c>false</c>.
  10797. */
  10798. processKeyDown(event: KeyboardEvent, context?: any): boolean;
  10799. /**
  10800. * Processes key up in display mode.
  10801. * @param {KeyboardEvent} event The KeyboardEvent.
  10802. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10803. * @returns {boolean} Returns <c>true</c> if the process is successful; otherwise, <c>false</c>.
  10804. */
  10805. processKeyUp(event: KeyboardEvent, context?: any): boolean;
  10806. /**
  10807. * Processes mouse down in display mode.
  10808. * @param {Object} hitInfo The hit test information returned by the getHitInfo method. See the Remarks for more information.
  10809. * @returns {boolean} Returns <c>true</c> if the process is successful; otherwise, <c>false</c>.
  10810. */
  10811. processMouseDown(hitInfo: GC.Spread.Sheets.IHitTestCellTypeHitInfo): boolean;
  10812. /**
  10813. * Processes mouse enter in display mode.
  10814. * @param {Object} hitInfo The hit test information returned by the getHitInfo method. See the Remarks for more information.
  10815. * @returns {boolean} Returns <c>true</c> if the process is successful; otherwise, <c>false</c>.
  10816. */
  10817. processMouseEnter(hitInfo: GC.Spread.Sheets.IHitTestCellTypeHitInfo): boolean;
  10818. /**
  10819. * Processes mouse leave in display mode.
  10820. * @param {Object} hitInfo The hit test information returned by the getHitInfo method. See the Remarks for more information.
  10821. * @returns {boolean} Returns <c>true</c> if the process is successful; otherwise, <c>false</c>.
  10822. */
  10823. processMouseLeave(hitInfo: GC.Spread.Sheets.IHitTestCellTypeHitInfo): boolean;
  10824. /**
  10825. * Processes mouse move in display mode.
  10826. * @param {Object} hitInfo The hit test information returned by the getHitInfo method. See the Remarks for more information.
  10827. * @returns {boolean} Returns <c>true</c> if the process is successful; otherwise, <c>false</c>.
  10828. */
  10829. processMouseMove(hitInfo: GC.Spread.Sheets.IHitTestCellTypeHitInfo): boolean;
  10830. /**
  10831. * Processes mouse up in display mode.
  10832. * @param {Object} hitInfo The hit test information returned by the getHitInfo method. See the Remarks for more information.
  10833. * @returns {boolean} Returns <c>true</c> if the process is successful; otherwise, <c>false</c>.
  10834. */
  10835. processMouseUp(hitInfo: GC.Spread.Sheets.IHitTestCellTypeHitInfo): boolean;
  10836. /**
  10837. * Selects all the text in the editor DOM element.
  10838. * @param {Object} editorContext The DOM element that was created by the createEditorElement method.
  10839. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10840. */
  10841. selectAll(editorContext: HTMLElement, context?: any): void;
  10842. /**
  10843. * Sets the editor's value.
  10844. * @param {Object} editorContext The DOM element that was created by the createEditorElement method.
  10845. * @param {Object} value The value returned from the active cell.
  10846. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10847. */
  10848. setEditorValue(editorContext: HTMLElement, value: any, context?: any): void;
  10849. /**
  10850. * Saves the object state to a JSON string.
  10851. * @returns {Object} The cell type data.
  10852. */
  10853. toJSON(): any;
  10854. /**
  10855. * Updates the editor's size.
  10856. * @param {Object} editorContext The DOM element that was created by the createEditorElement method.
  10857. * @param {GC.Spread.Sheets.Style} cellStyle The cell's actual style.
  10858. * @param {GC.Spread.Sheets.Rect} cellRect The cell's layout information.
  10859. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10860. * @returns {GC.Spread.Sheets.Rect} Returns the new size for cell wrapper element, it should contain two properties 'width' and 'height'.
  10861. */
  10862. updateEditor(editorContext: HTMLElement, cellStyle: GC.Spread.Sheets.Style, cellRect: GC.Spread.Sheets.Rect, context?: any): GC.Spread.Sheets.Rect;
  10863. /**
  10864. * Updates the cell wrapper element size.
  10865. * @param {HTMLElement} editorContext The DOM element that was created by the createEditorElement method.
  10866. * @param {GC.Spread.Sheets.Rect} editorBounds The cell wrapper element's new size.
  10867. * @param {number} editorBounds.x - The cell wrapper element's x position.
  10868. * @param {number} editorBounds.y - The cell wrapper element's y position.
  10869. * @param {number} editorBounds.width - The cell wrapper element's new width value.
  10870. * @param {number} editorBounds.height - The cell wrapper element's new height value.
  10871. * @param {GC.Spread.Sheets.Style} cellStyle The cell's actual style.
  10872. */
  10873. updateEditorContainer(editorContext: HTMLElement, editorBounds: GC.Spread.Sheets.Rect, cellStyle: GC.Spread.Sheets.Style): void;
  10874. /**
  10875. * Updates the editor's ime-mode.
  10876. * @param {Object} editorContext The DOM element that was created by the createEditorElement method.
  10877. * @param {GC.Spread.Sheets.ImeMode} imeMode The ime-mode from cell's actual style.
  10878. * @param {Object} context The context associated with the cell type. See the Remarks for more information.
  10879. */
  10880. updateImeMode(editorContext: HTMLElement, imeMode: GC.Spread.Sheets.ImeMode, context?: any): void;
  10881. }
  10882. export class Button extends Base{
  10883. /**
  10884. * Represents a button cell.
  10885. * @extends GC.Spread.Sheets.CellTypes.Base
  10886. * @class
  10887. * @example
  10888. * //This example creates a button cell.
  10889. * var spread = new GC.Spread.Sheets.Workbook();
  10890. * var sheet = spread.getActiveSheet();
  10891. * var cellType = new GC.Spread.Sheets.CellTypes.Button();
  10892. * cellType.buttonBackColor("#FFFF00");
  10893. * cellType.text("this is a button");
  10894. * sheet.setCellType(1,1,cellType);
  10895. * //Bind event
  10896. * spread.bind(GC.Spread.Sheets.Events.ButtonClicked, function (e, args) {
  10897. * var sheet = args.sheet, row = args.row, col = args.col;
  10898. * var cellType = sheet.getCellType(row, col);
  10899. * if (cellType instanceof GC.Spread.Sheets.CellTypes.Button) {
  10900. * alert("Button Clicked");
  10901. * }
  10902. * });
  10903. */
  10904. constructor();
  10905. /**
  10906. * Gets or sets the button's background color.
  10907. * @param {string} value The button's background color.
  10908. * @returns {string | GC.Spread.Sheets.CellTypes.Button} If no value is set, returns the background color; otherwise, returns the button cell type.
  10909. * @example
  10910. * //This example creates a button cell.
  10911. * var cellType = new GC.Spread.Sheets.CellTypes.Button();
  10912. * cellType.buttonBackColor("#FFFF00");
  10913. * cellType.text("this is a button");
  10914. * activeSheet.getCell(0, 2).cellType(cellType);
  10915. */
  10916. buttonBackColor(value?: string): any;
  10917. /**
  10918. * Gets or sets the button's bottom margin in pixels relative to the cell.
  10919. * @param {number} value The button's bottom margin relative to the cell.
  10920. * @returns {number | GC.Spread.Sheets.CellTypes.Button} If no value is set, returns the bottom margin in pixels; otherwise, returns the button cell type.
  10921. * @example
  10922. * //This example creates a button cell and sets its margins.
  10923. * var cellType = new GC.Spread.Sheets.CellTypes.Button();
  10924. * cellType.buttonBackColor("#FFFF00");
  10925. * cellType.text("this is a button");
  10926. * cellType.marginTop(5).marginRight(8).marginBottom(10).marginLeft(12);
  10927. * activeSheet.getCell(0, 2).cellType(cellType);
  10928. * activeSheet.setColumnWidth(2, 120.0,GC.Spread.Sheets.SheetArea.viewport);
  10929. * activeSheet.setRowHeight(0, 90.0,GC.Spread.Sheets.SheetArea.viewport);
  10930. */
  10931. marginBottom(value?: number): any;
  10932. /**
  10933. * Gets or sets the button's left margin in pixels relative to the cell.
  10934. * @param {number} value The button's left margin relative to the cell.
  10935. * @returns {number | GC.Spread.Sheets.CellTypes.Button} If no value is set, returns the left margin in pixels; otherwise, returns the button cell type.
  10936. * @example
  10937. * //This example creates a button cell and sets its margins.
  10938. * var cellType = new GC.Spread.Sheets.CellTypes.Button();
  10939. * cellType.buttonBackColor("#FFFF00");
  10940. * cellType.text("this is a button");
  10941. * cellType.marginTop(5).marginRight(8).marginBottom(10).marginLeft(12);
  10942. * activeSheet.getCell(0, 2).cellType(cellType);
  10943. * activeSheet.setColumnWidth(2, 120.0,GC.Spread.Sheets.SheetArea.viewport);
  10944. * activeSheet.setRowHeight(0, 90.0,GC.Spread.Sheets.SheetArea.viewport);
  10945. */
  10946. marginLeft(value?: number): any;
  10947. /**
  10948. * Gets or sets the button's right margin in pixels relative to the cell.
  10949. * @param {number} value The button's right margin relative to the cell.
  10950. * @returns {number | GC.Spread.Sheets.CellTypes.Button} If no value is set, returns the right margin in pixels; otherwise, returns the button cell type.
  10951. * @example
  10952. * //This example creates a button cell and sets its margins.
  10953. * var cellType = new GC.Spread.Sheets.CellTypes.Button();
  10954. * cellType.buttonBackColor("#FFFF00");
  10955. * cellType.text("this is a button");
  10956. * cellType.marginTop(5).marginRight(8).marginBottom(10).marginLeft(12);
  10957. * activeSheet.getCell(0, 2).cellType(cellType);
  10958. * activeSheet.setColumnWidth(2, 120.0,GC.Spread.Sheets.SheetArea.viewport);
  10959. * activeSheet.setRowHeight(0, 90.0,GC.Spread.Sheets.SheetArea.viewport);
  10960. */
  10961. marginRight(value?: number): any;
  10962. /**
  10963. * Gets or sets the button's top margin in pixels relative to the cell.
  10964. * @param {number} value The button's top margin relative to the cell.
  10965. * @returns {number | GC.Spread.Sheets.CellTypes.Button} If no value is set, returns the top margin in pixels; otherwise, returns the button cell type.
  10966. * @example
  10967. * //This example creates a button cell and sets its margins.
  10968. * var cellType = new GC.Spread.Sheets.CellTypes.Button();
  10969. * cellType.buttonBackColor("#FFFF00");
  10970. * cellType.text("this is a button");
  10971. * cellType.marginTop(5).marginRight(8).marginBottom(10).marginLeft(12);
  10972. * activeSheet.getCell(0, 2).cellType(cellType);
  10973. * activeSheet.setColumnWidth(2, 120.0,GC.Spread.Sheets.SheetArea.viewport);
  10974. * activeSheet.setRowHeight(0, 90.0,GC.Spread.Sheets.SheetArea.viewport);
  10975. */
  10976. marginTop(value?: number): any;
  10977. /**
  10978. * Gets or sets the button's content.
  10979. * @param {string} value The button's content.
  10980. * @returns {string | GC.Spread.Sheets.CellTypes.Button} If no value is set, returns the content; otherwise, returns the button cell type.
  10981. * @example
  10982. * //This example creates a button cell.
  10983. * var cellType = new GC.Spread.Sheets.CellTypes.Button();
  10984. * cellType.buttonBackColor("#FFFF00");
  10985. * cellType.text("this is a button");
  10986. * activeSheet.getCell(0, 2).cellType(cellType);
  10987. */
  10988. text(value?: string): any;
  10989. }
  10990. export class ButtonList extends Base{
  10991. /**
  10992. * Represents an editable buttonList cell.
  10993. * @extends GC.Spread.Sheets.CellTypes.Base
  10994. * @class
  10995. * @example
  10996. * //This example creates a buttonList cell.
  10997. * var cellType2 = new GC.Spread.Sheets.CellTypes.ButtonList();
  10998. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  10999. * activeSheet.getCell(2, 2).cellType(cellType2);
  11000. */
  11001. constructor();
  11002. /**
  11003. * Gets or sets the buttonList list's orders.
  11004. * @param {GC.Spread.Sheets.CellTypes.Direction} value Whether the order is vertical.
  11005. * @returns {GC.Spread.Sheets.CellTypes.Direction | GC.Spread.Sheets.CellTypes.ButtonList} If no value is set, returns whether the buttonList list's orders is vertical; otherwise, returns the checkbox list cellType.
  11006. * @example
  11007. * //This example creates a buttonList list cell.
  11008. * var cellType2 = new GC.Spread.Sheets.CellTypes.ButtonList();
  11009. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11010. * cellType2.direction(GC.Spread.Sheets.CellTypes.Direction.vertical);
  11011. * activeSheet.getCell(2, 2).cellType(cellType2);
  11012. */
  11013. direction(value?: GC.Spread.Sheets.CellTypes.Direction): any;
  11014. /**
  11015. * Gets or sets the buttonList list's layout is autofit.
  11016. * @param {boolean} value Whether the layout is autofit.
  11017. * @returns {boolean | GC.Spread.Sheets.CellTypes.ButtonList} If no value is set, returns whether the layout is autofit, returns the buttonList list cellType.
  11018. * @example
  11019. * //This example creates a buttonList list cell.
  11020. * var cellType2 = new GC.Spread.Sheets.CellTypes.ButtonList();
  11021. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11022. * cellType2.isFlowLayout(true);
  11023. * activeSheet.getCell(2, 2).cellType(cellType2);
  11024. */
  11025. isFlowLayout(value?: boolean): any;
  11026. /**
  11027. * Gets or sets the items for the buttonList list.
  11028. * @param {Array} items The items for the buttonList list.
  11029. * @returns {Array | GC.Spread.Sheets.CellTypes.ButtonList} If no value is set, returns the items array; otherwise, returns the buttonList list cellType.
  11030. * @example
  11031. * //This example creates a buttonList list cell.
  11032. * var cellType2 = new GC.Spread.Sheets.CellTypes.ButtonList();
  11033. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11034. * activeSheet.getCell(2, 2).cellType(cellType2);
  11035. */
  11036. items(items?: GC.Spread.Sheets.CellTypes.ICelltypeItemOption[] | string[]): any;
  11037. /**
  11038. * Gets or sets the space for two items in the buttonList.
  11039. * @param {object} value the space for two items in the buttonList.
  11040. * @returns {object | GC.Spread.Sheets.CellTypes.ButtonList} If no value is set, returns the space for two items in the buttonList; otherwise, returns the buttonList cellType.
  11041. * @example
  11042. * //This example creates a buttonList cell.
  11043. * var cellType2 = new GC.Spread.Sheets.CellTypes.ButtonList();
  11044. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11045. * cellType2.itemSpacing({
  11046. * horizontal:80,
  11047. * vertical:20
  11048. * });
  11049. */
  11050. itemSpacing(value?: GC.Spread.Sheets.CellTypes.IItemSpacing): any;
  11051. /**
  11052. * Gets or sets the items for the buttonList list's column count.
  11053. * @param {number} value The column count for the buttonList list.
  11054. * @returns {number | GC.Spread.Sheets.CellTypes.ButtonList} If no value is set, returns the column count; otherwise, returns the buttonList list cellType.
  11055. * @example
  11056. * //This example creates a buttonList list cell.
  11057. * var cellType2 = new GC.Spread.Sheets.CellTypes.ButtonList();
  11058. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11059. * cellType2.maxColumnCount(2);
  11060. * activeSheet.getCell(2, 2).cellType(cellType2);
  11061. */
  11062. maxColumnCount(value?: number): any;
  11063. /**
  11064. * Gets or sets the items for the buttonList list's row count.
  11065. * @param {number} value The row count for the buttonList list.
  11066. * @returns {number | GC.Spread.Sheets.CellTypes.ButtonList} If no value is set, returns the row count; otherwise, returns the buttonList list cellType.
  11067. * @example
  11068. * //This example creates buttonList list cell.
  11069. * var cellType2 = new GC.Spread.Sheets.CellTypes.ButtonList();
  11070. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11071. * cellType2.maxRowCount(2);
  11072. * activeSheet.getCell(2, 2).cellType(cellType2);
  11073. */
  11074. maxRowCount(value?: number): any;
  11075. /**
  11076. * Gets or sets the buttonList's padding in pixels relative to the cell.
  11077. * @param {string} value The buttonList's padding relative to the cell.
  11078. * @returns {string | GC.Spread.Sheets.CellTypes.ButtonList} If no value is set, returns the padding in pixels; otherwise, returns the buttonList cell type.
  11079. * @example
  11080. * //This example creates a buttonList cell and sets its padding.
  11081. * var cellType = new GC.Spread.Sheets.CellTypes.ButtonList();
  11082. * cellType.padding("5");
  11083. * activeSheet.getCell(0, 2).cellType(cellType);
  11084. * activeSheet.setColumnWidth(2, 120.0,GC.Spread.Sheets.SheetArea.viewport);
  11085. * activeSheet.setRowHeight(0, 90.0,GC.Spread.Sheets.SheetArea.viewport);
  11086. */
  11087. padding(value?: string): any;
  11088. /**
  11089. * Gets or sets the selected buttonList's background color.
  11090. * @param {string} value The selected buttonList's background color.
  11091. * @returns {string | GC.Spread.Sheets.CellTypes.ButtonList} If no value is set, returns the background color; otherwise, returns the buttonList cell type.
  11092. * @example
  11093. * //This example creates a buttonList cell.
  11094. * var cellType = new GC.Spread.Sheets.CellTypes.ButtonList();
  11095. * cellType.selectedBackColor("#FFFF00");
  11096. * activeSheet.getCell(0, 2).cellType(cellType);
  11097. */
  11098. selectedBackColor(value?: string): any;
  11099. /**
  11100. * Gets or sets the selected buttonList's fore color.
  11101. * @param {string} value The selected buttonList's fore color.
  11102. * @returns {string | GC.Spread.Sheets.CellTypes.ButtonList} If no value is set, returns the fore color; otherwise, returns the buttonList cell type.
  11103. * @example
  11104. * //This example creates a buttonList cell.
  11105. * var cellType = new GC.Spread.Sheets.CellTypes.ButtonList();
  11106. * cellType.selectedForeColor("#FFFF00");
  11107. * activeSheet.getCell(0, 2).cellType(cellType);
  11108. */
  11109. selectedForeColor(value?: string): any;
  11110. /**
  11111. * Gets or sets the buttonList's select mode.
  11112. * @param {GC.Spread.Sheets.CellTypes.SelectionMode} value The selected buttonList's select mode.
  11113. * @returns {GC.Spread.Sheets.CellTypes.SelectionMode | GC.Spread.Sheets.CellTypes.ButtonList} If no value is set, returns the select mode; otherwise, returns the buttonList cell type.
  11114. * @example
  11115. * //This example creates a buttonList cell.
  11116. * var cellType = new GC.Spread.Sheets.CellTypes.ButtonList();
  11117. * cellType.selectionMode(GC.Spread.Sheets.CellTypes.SelectionMode.single);
  11118. * activeSheet.getCell(0, 2).cellType(cellType);
  11119. */
  11120. selectionMode(value?: GC.Spread.Sheets.CellTypes.SelectionMode): any;
  11121. }
  11122. export class CheckBox extends Base{
  11123. /**
  11124. * Represents a check box cell.
  11125. * @extends GC.Spread.Sheets.CellTypes.Base
  11126. * @class
  11127. * @example
  11128. * //This example creates a check box cell.
  11129. * var cellType1 = new GC.Spread.Sheets.CellTypes.CheckBox();
  11130. * cellType1.caption("caption");
  11131. * cellType1.textTrue("true");
  11132. * cellType1.textFalse("false");
  11133. * cellType1.textIndeterminate("indeterminate");
  11134. * cellType1.textAlign(GC.Spread.Sheets.CellTypes.CheckBoxTextAlign.bottom);
  11135. * cellType1.isThreeState(true);
  11136. * activeSheet.getCell(1, 1).cellType(cellType1);
  11137. */
  11138. constructor();
  11139. /**
  11140. * Gets or sets the caption of the cell type.
  11141. * @param {string} value The caption of the cell type.
  11142. * @returns {string | GC.Spread.Sheets.CellTypes.CheckBox} If no value is set, returns the caption; otherwise, returns the check box cell type.
  11143. * @example
  11144. * //This example creates a check box cell.
  11145. * var cellType1 = new GC.Spread.Sheets.CellTypes.CheckBox();
  11146. * cellType1.caption("caption");
  11147. * cellType1.textTrue("true");
  11148. * cellType1.textFalse("false");
  11149. * cellType1.textIndeterminate("indeterminate");
  11150. * cellType1.textAlign(GC.Spread.Sheets.CellTypes.CheckBoxTextAlign.bottom);
  11151. * cellType1.isThreeState(true);
  11152. * activeSheet.getCell(1, 1).cellType(cellType1);
  11153. */
  11154. caption(value?: string): any;
  11155. /**
  11156. * Gets or sets a value that indicates whether the check box supports three states.
  11157. * @param {boolean} value Whether the check box supports three states.
  11158. * @returns {boolean | GC.Spread.Sheets.CellTypes.CheckBox} If no value is set, returns whether the check box supports three states; otherwise, returns the check box cell type.
  11159. * @example
  11160. * //This example creates a check box cell.
  11161. * var cellType1 = new GC.Spread.Sheets.CellTypes.CheckBox();
  11162. * cellType1.caption("caption");
  11163. * cellType1.textTrue("true");
  11164. * cellType1.textFalse("false");
  11165. * cellType1.textIndeterminate("indeterminate");
  11166. * cellType1.textAlign(GC.Spread.Sheets.CellTypes.CheckBoxTextAlign.bottom);
  11167. * cellType1.isThreeState(true);
  11168. * activeSheet.getCell(1, 1).cellType(cellType1);
  11169. */
  11170. isThreeState(value?: boolean): any;
  11171. /**
  11172. * Gets or sets the text alignment relative to the check box.
  11173. * @param {GC.Spread.Sheets.CellTypes.CheckBoxTextAlign} value The text alignment relative to the check box.
  11174. * @returns {GC.Spread.Sheets.CellTypes.CheckBoxTextAlign | GC.Spread.Sheets.CellTypes.CheckBox} If no value is set, returns the text alignment relative to the check box; otherwise, returns the check box cell type.
  11175. * @example
  11176. * //This example creates a check box cell.
  11177. * var cellType1 = new GC.Spread.Sheets.CellTypes.CheckBox();
  11178. * cellType1.caption("caption");
  11179. * cellType1.textTrue("true");
  11180. * cellType1.textFalse("false");
  11181. * cellType1.textIndeterminate("indeterminate");
  11182. * cellType1.textAlign(GC.Spread.Sheets.CellTypes.CheckBoxTextAlign.bottom);
  11183. * cellType1.isThreeState(true);
  11184. * activeSheet.getCell(1, 1).cellType(cellType1);
  11185. */
  11186. textAlign(value?: GC.Spread.Sheets.CellTypes.CheckBoxTextAlign): any;
  11187. /**
  11188. * Gets or sets the text in the cell when the cell's value is <c>false</c>.
  11189. * @param {string} value The text in the cell when the cell's value is <c>false</c>.
  11190. * @returns {string | GC.Spread.Sheets.CellTypes.CheckBox} If no value is set, returns the text in the cell when the cell's value is <c>false</c>. If a value is set, returns the check box cell type.
  11191. * @example
  11192. * //This example creates a check box cell.
  11193. * var cellType1 = new GC.Spread.Sheets.CellTypes.CheckBox();
  11194. * cellType1.caption("caption");
  11195. * cellType1.textTrue("true");
  11196. * cellType1.textFalse("false");
  11197. * cellType1.textIndeterminate("indeterminate");
  11198. * cellType1.textAlign(GC.Spread.Sheets.CellTypes.CheckBoxTextAlign.bottom);
  11199. * cellType1.isThreeState(true);
  11200. * activeSheet.getCell(1, 1).cellType(cellType1);
  11201. */
  11202. textFalse(value?: string): any;
  11203. /**
  11204. * Gets or sets the text in the cell when the cell's value is indeterminate (neither <c>true</c> nor <c>false</c>).
  11205. * @param {string} value The text in the cell when the cell's value is indeterminate.
  11206. * @returns {string | GC.Spread.Sheets.CellTypes.CheckBox} If no value is set, returns the text in the cell when the cell's value is indeterminate. If a value is set, returns the check box cell type.
  11207. * @example
  11208. * //This example creates a check box cell.
  11209. * var cellType1 = new GC.Spread.Sheets.CellTypes.CheckBox();
  11210. * cellType1.caption("caption");
  11211. * cellType1.textTrue("true");
  11212. * cellType1.textFalse("false");
  11213. * cellType1.textIndeterminate("indeterminate");
  11214. * cellType1.textAlign(GC.Spread.Sheets.CellTypes.CheckBoxTextAlign.bottom);
  11215. * cellType1.isThreeState(true);
  11216. * activeSheet.getCell(1, 1).cellType(cellType1);
  11217. */
  11218. textIndeterminate(value?: string): any;
  11219. /**
  11220. * Gets or sets the text in the cell when the cell's value is <c>true</c>.
  11221. * @param {string} value The text when the cell's value is <c>true</c>.
  11222. * @returns {string | GC.Spread.Sheets.CellTypes.CheckBox} If no value is set, returns the text when the cell's value is <c>true</c>. If a value is set, returns the check box cell type.
  11223. * @example
  11224. * //This example creates a check box cell.
  11225. * var cellType1 = new GC.Spread.Sheets.CellTypes.CheckBox();
  11226. * cellType1.caption("caption");
  11227. * cellType1.textTrue("true");
  11228. * cellType1.textFalse("false");
  11229. * cellType1.textIndeterminate("indeterminate");
  11230. * cellType1.textAlign(GC.Spread.Sheets.CellTypes.CheckBoxTextAlign.bottom);
  11231. * cellType1.isThreeState(true);
  11232. * activeSheet.getCell(1, 1).cellType(cellType1);
  11233. */
  11234. textTrue(value?: string): any;
  11235. }
  11236. export class CheckBoxList extends Base{
  11237. /**
  11238. * Represents an editable CheckBoxList cell.
  11239. * @extends GC.Spread.Sheets.CellTypes.Base
  11240. * @class
  11241. * @example
  11242. * //This example creates a CheckBoxList cell.
  11243. * var cellType2 = new GC.Spread.Sheets.CellTypes.CheckBoxList();
  11244. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11245. * activeSheet.getCell(2, 2).cellType(cellType2);
  11246. */
  11247. constructor();
  11248. /**
  11249. * Gets or sets the checkbox list's orders.
  11250. * @param {GC.Spread.Sheets.CellTypes.Direction} value Whether the order is vertical.
  11251. * @returns {GC.Spread.Sheets.CellTypes.Direction | GC.Spread.Sheets.CellTypes.CheckBoxList} If no value is set, returns whether the checkbox list's orders is vertical; otherwise, returns the checkbox list cellType.
  11252. * @example
  11253. * //This example creates a checkbox list cell.
  11254. * var cellType2 = new GC.Spread.Sheets.CellTypes.CheckBoxList();
  11255. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11256. * cellType2.direction(GC.Spread.Sheets.CellTypes.Direction.vertical);
  11257. * activeSheet.getCell(2, 2).cellType(cellType2);
  11258. */
  11259. direction(value?: GC.Spread.Sheets.CellTypes.Direction): any;
  11260. /**
  11261. * Gets or sets the checkbox list's layout is autofit.
  11262. * @param {boolean} value Whether the layout is autofit.
  11263. * @returns {boolean | GC.Spread.Sheets.CellTypes.CheckBoxList} If no value is set, returns whether the layout is autofit, returns the checkbox list cellType.
  11264. * @example
  11265. * //This example creates a checkbox list cell.
  11266. * var cellType2 = new GC.Spread.Sheets.CellTypes.CheckBoxList();
  11267. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11268. * cellType2.isFlowLayout(true);
  11269. * activeSheet.getCell(2, 2).cellType(cellType2);
  11270. */
  11271. isFlowLayout(value?: boolean): any;
  11272. /**
  11273. * Gets or sets the items for the checkbox list.
  11274. * @param {Array} items The items for the checkbox list.
  11275. * @returns {Array | GC.Spread.Sheets.CellTypes.CheckBoxList} If no value is set, returns the items array; otherwise, returns the checkbox list cellType.
  11276. * @example
  11277. * //This example creates a checkbox list cell.
  11278. * var cellType2 = new GC.Spread.Sheets.CellTypes.CheckBoxList();
  11279. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11280. * activeSheet.getCell(2, 2).cellType(cellType2);
  11281. */
  11282. items(items?: GC.Spread.Sheets.CellTypes.ICelltypeItemOption[] | string[]): any;
  11283. /**
  11284. * Gets or sets the space for two items in the checkbox list.
  11285. * @param {object} value the space for two items in the checkbox list.
  11286. * @returns {object | GC.Spread.Sheets.CellTypes.CheckBoxList} If no value is set, returns the space for two items in the checkbox list; otherwise, returns the checkbox list cellType.
  11287. * @example
  11288. * //This example creates a checkbox list cell.
  11289. * var cellType2 = new GC.Spread.Sheets.CellTypes.CheckBoxList();
  11290. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11291. * cellType2.itemSpacing({
  11292. * horizontal:80,
  11293. * vertical:20
  11294. * });
  11295. */
  11296. itemSpacing(value?: GC.Spread.Sheets.CellTypes.IItemSpacing): any;
  11297. /**
  11298. * Gets or sets the items for the checkbox list's column count.
  11299. * @param {number} value The column count for the checkbox list.
  11300. * @returns {number | GC.Spread.Sheets.CellTypes.CheckBoxList} If no value is set, returns the column count; otherwise, returns the checkbox list cellType.
  11301. * @example
  11302. * //This example creates a checkbox list cell.
  11303. * var cellType2 = new GC.Spread.Sheets.CellTypes.CheckBoxList();
  11304. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11305. * cellType2.maxColumnCount(2);
  11306. * activeSheet.getCell(2, 2).cellType(cellType2);
  11307. */
  11308. maxColumnCount(value?: number): any;
  11309. /**
  11310. * Gets or sets the items for the checkbox list's row count.
  11311. * @param {number} value The row count for the checkbox list.
  11312. * @returns {number | GC.Spread.Sheets.CellTypes.CheckBoxList} If no value is set, returns the row count; otherwise, returns the checkbox list cellType.
  11313. * @example
  11314. * //This example creates checkbox list cell.
  11315. * var cellType2 = new GC.Spread.Sheets.CellTypes.CheckBoxList();
  11316. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11317. * cellType2.maxRowCount(2);
  11318. * activeSheet.getCell(2, 2).cellType(cellType2);
  11319. */
  11320. maxRowCount(value?: number): any;
  11321. /**
  11322. * Gets or sets the text of checkbox's position, only support left and right .
  11323. * @param {GC.Spread.Sheets.CellTypes.TextAlign} value the text of checkbox's position.
  11324. * @returns {GC.Spread.Sheets.CellTypes.TextAlign | GC.Spread.Sheets.CellTypes.CheckBoxList} If no value is set, returns the text of checkbox's position, returns the checkbox list cellType.
  11325. * @example
  11326. * //This example creates a checkbox list cell.
  11327. * var cellType2 = new GC.Spread.Sheets.CellTypes.CheckBoxList();
  11328. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11329. * cellType2.textAlign(GC.Spread.Sheets.CellTypes.TextAlign.left);
  11330. * activeSheet.getCell(2, 2).cellType(cellType2);
  11331. */
  11332. textAlign(value?: GC.Spread.Sheets.CellTypes.TextAlign): any;
  11333. }
  11334. export class ColumnHeader extends Base{
  11335. /**
  11336. * Represents the painter of the column header cells.
  11337. * @extends GC.Spread.Sheets.CellTypes.Base
  11338. * @class
  11339. */
  11340. constructor();
  11341. }
  11342. export class ComboBox extends Base{
  11343. /**
  11344. * Represents an editable combo box cell.
  11345. * @extends GC.Spread.Sheets.CellTypes.Base
  11346. * @class
  11347. * @example
  11348. * //This example creates a combo box cell.
  11349. * var cellType2 = new GC.Spread.Sheets.CellTypes.ComboBox();
  11350. * cellType2.items(["a","b","c"]);
  11351. * activeSheet.getCell(2, 2).cellType(cellType2);
  11352. */
  11353. constructor();
  11354. /**
  11355. * Gets or sets whether the combo box is editable.
  11356. * @param {boolean} value Whether the combo box is editable.
  11357. * @returns {boolean | GC.Spread.Sheets.CellTypes.ComboBox} If no value is set, returns whether the combo box is editable; otherwise, returns the combo box cellType.
  11358. * @example
  11359. * //This example sets the editable method.
  11360. * var items2 = ["a", "ab", "abc", "apple", "boy", "cat", "dog"];
  11361. * var eComboBoxCellType = new GC.Spread.Sheets.CellTypes.ComboBox().items(items2).editable(true);
  11362. * activeSheet.getCell(1, 3).cellType(eComboBoxCellType);
  11363. * activeSheet.setColumnWidth(0,120);
  11364. * activeSheet.setColumnWidth(2,120);
  11365. */
  11366. editable(value?: boolean): any;
  11367. /**
  11368. * Gets or sets the value that is written to the underlying data model.
  11369. * @param {GC.Spread.Sheets.CellTypes.EditorValueType} value The type of editor value.
  11370. * @returns {GC.Spread.Sheets.CellTypes.EditorValueType | GC.Spread.Sheets.CellTypes.ComboBox} If no value is set, returns the type of editor value; otherwise, returns the combo box cellType.
  11371. * @example
  11372. * //This example gets the type.
  11373. * var cellType2 = new GC.Spread.Sheets.CellTypes.ComboBox();
  11374. * cellType2.items(["a","b","c"]);
  11375. * activeSheet.getCell(2, 2).cellType(cellType2);
  11376. * alert(cellType2.editorValueType());
  11377. */
  11378. editorValueType(value?: GC.Spread.Sheets.CellTypes.EditorValueType): any;
  11379. /**
  11380. * Gets or sets the height of each item.
  11381. * @param {number} value The height of each item.
  11382. * @returns {number | GC.Spread.Sheets.CellTypes.ComboBox} If no value is set, returns the height of each item; otherwise, returns the combo box cellType.
  11383. * @example
  11384. * //This example sets the item height.
  11385. * var cellType2 = new GC.Spread.Sheets.CellTypes.ComboBox();
  11386. * cellType2.items(["a","b","c"]);
  11387. * cellType2.itemHeight(30);
  11388. * activeSheet.getCell(2, 2).cellType(cellType2);
  11389. */
  11390. itemHeight(value?: number): any;
  11391. /**
  11392. * Gets or sets the items for the drop-down list in the combo box.
  11393. * @param {Array} items The items for the combo box.
  11394. * @returns {Array | GC.Spread.Sheets.CellTypes.ComboBox} If no value is set, returns the items array; otherwise, returns the combo box cellType.
  11395. * @example
  11396. * //This example creates a combo box cell.
  11397. * var cellType2 = new GC.Spread.Sheets.CellTypes.ComboBox();
  11398. * cellType2.items(["a","b","c"]);
  11399. * activeSheet.getCell(2, 2).cellType(cellType2);
  11400. */
  11401. items(items?: any[]): any;
  11402. /**
  11403. * Gets or sets the maximum item count of the drop-down list per page.
  11404. * @param {number} value The maximum item count of the drop-down list per page.
  11405. * @returns {number | GC.Spread.Sheets.CellTypes.ComboBox} If no value is set, returns the maximum item count of the drop-down list per page; otherwise, returns the combo box cellType.
  11406. * @example
  11407. * //This example shows three items in the list at a time.
  11408. * var cellType2 = new GC.Spread.Sheets.CellTypes.ComboBox();
  11409. * cellType2.items(["a", "b", "c", "d", "e", "f", "g", "h"]);
  11410. * cellType2.maxDropDownItems(3);
  11411. * activeSheet.getCell(2, 2).cellType(cellType2);
  11412. * });
  11413. */
  11414. maxDropDownItems(value?: number): any;
  11415. }
  11416. export class Corner extends Base{
  11417. /**
  11418. * Represents the painter of the corner cell.
  11419. * @extends GC.Spread.Sheets.CellTypes.Base
  11420. * @class
  11421. */
  11422. constructor();
  11423. }
  11424. export class HyperLink extends Base{
  11425. /**
  11426. * Represents the hyperlink cell.
  11427. * @extends GC.Spread.Sheets.CellTypes.Base
  11428. * @class
  11429. * @example
  11430. * var cellType = new GC.Spread.Sheets.CellTypes.HyperLink();
  11431. * cellType.linkColor("blue");
  11432. * cellType.visitedLinkColor("#FF2235");
  11433. * cellType.text("GrapeCity");
  11434. * cellType.linkToolTip("Company Web Site");
  11435. * activeSheet.getCell(1, 1).cellType(cellType).value("http://www.grapecity.com/");
  11436. * activeSheet.getCell(1, -1).height(30);
  11437. * @example
  11438. * var cellType = new GC.Spread.Sheets.CellTypes.HyperLink();
  11439. * cellType.linkColor("blue");
  11440. * cellType.visitedLinkColor("#FF2235");
  11441. * cellType.text("GrapeCity");
  11442. * cellType.linkToolTip("Company Web Site");
  11443. * activeSheet.getCell(0, 2).cellType(cellType).value("formula.html");
  11444. */
  11445. constructor();
  11446. /**
  11447. * Gets or sets whether to move to the active cell when clicked.
  11448. * @param {boolean} value Whether to move to the active cell when clicked.
  11449. * @returns {boolean | GC.Spread.Sheets.CellTypes.HyperLink} If no value is set, returns a value that indicates whether to move to the active cell; otherwise, returns the hyperlink cell type.
  11450. * @example
  11451. * //This example uses the activeOnClick method.
  11452. * var h1 = new GC.Spread.Sheets.CellTypes.HyperLink();
  11453. * h1.text("GrapeCity");
  11454. * h1.linkToolTip("link to GrapeCity Web page");
  11455. * h1.linkColor("rgb(0, 100, 200)");
  11456. * h1.visitedLinkColor("rgb(0, 200, 100)");
  11457. * h1.activeOnClick(true);
  11458. * activeSheet.setCellType(1, 1, h1);
  11459. * activeSheet.getCell(1, 1, GC.Spread.Sheets.SheetArea.viewport).value("http://www.grapecity.com/").hAlign(GC.Spread.Sheets.HorizontalAlign.center);
  11460. */
  11461. activeOnClick(value?: boolean): any;
  11462. /**
  11463. * Gets or sets the color of the hyperlink.
  11464. * @param {string} value The hyperlink color.
  11465. * @returns {string | GC.Spread.Sheets.CellTypes.HyperLink} If no value is set, returns the hyperlink color; otherwise, returns the hyperLink cell type.
  11466. * @example
  11467. * //This example creates a hyperlink cell.
  11468. * cellType = new GC.Spread.Sheets.CellTypes.HyperLink();
  11469. * cellType.linkColor("blue");
  11470. * cellType.visitedLinkColor("#FF2235");
  11471. * cellType.text("GrapeCity");
  11472. * cellType.linkToolTip("Company Web Site");
  11473. * activeSheet.getCell(1, 1).cellType(cellType).value("http://www.grapecity.com/");
  11474. * activeSheet.getCell(1, -1).height(30);
  11475. */
  11476. linkColor(value?: string): any;
  11477. /**
  11478. * Gets or sets the tooltip for the hyperlink.
  11479. * @param {string} value The tooltip text.
  11480. * @returns {string | GC.Spread.Sheets.CellTypes.HyperLink} If no value is set, returns the tooltip text; otherwise, returns the hyperLink cell type.
  11481. * @example
  11482. * //This example creates a hyperlink cell.
  11483. * cellType = new GC.Spread.Sheets.CellTypes.HyperLink();
  11484. * cellType.linkColor("blue");
  11485. * cellType.visitedLinkColor("#FF2235");
  11486. * cellType.text("GrapeCity");
  11487. * cellType.linkToolTip("Company Web Site");
  11488. * activeSheet.getCell(1, 1).cellType(cellType).value("http://www.grapecity.com/");
  11489. * activeSheet.getCell(1, -1).height(30);
  11490. */
  11491. linkToolTip(value?: string): any;
  11492. /**
  11493. * Gets or sets the callback of the hyperlink, If execute the function will represent the context for the callback.
  11494. * @param {Function} value The callback of the hyperlink.
  11495. * @returns {Function | GC.Spread.Sheets.CellTypes.HyperLink} If no value is set, return a value that indicates the callback of the hyperlink; otherwise, returns the hyperlink cell type.
  11496. * @example
  11497. * //This example sets the tab color when selecting the hyperlink.
  11498. * var h2 = new GC.Spread.Sheets.CellTypes.HyperLink();
  11499. * h2.text("set sheet tab style");
  11500. * h2.linkToolTip("set sheet tab style");
  11501. * h2.linkColor("blue");
  11502. * h2.visitedLinkColor("#FF2235");
  11503. * activeSheet.getCell(2, 1).cellType(h2).value("set sheet tab style").hAlign(GC.Spread.Sheets.HorizontalAlign.center);
  11504. * h2.activeOnClick(true);
  11505. * h2.onClickAction(function () {
  11506. * var setSheetTabColor = {
  11507. * canUndo: true,
  11508. * execute: function (context, options, isUndo) {
  11509. * activeSheet.name("Hyperlink");
  11510. * activeSheet.options.sheetTabColor = "red";
  11511. * }
  11512. * };
  11513. * var commandManager = spread.commandManager();
  11514. * var commandName = "setSheetTabStyle";
  11515. * commandManager.register(commandName, setSheetTabColor, null, false, false, false, false);
  11516. * commandManager.execute({cmd: commandName})
  11517. * });
  11518. */
  11519. onClickAction(value?: Function): any;
  11520. /**
  11521. * Gets or sets the type for the hyperlink's target.
  11522. * @param {GC.Spread.Sheets.CellTypes.HyperLinkTargetType} value The hyperlink's target type.
  11523. * @returns {GC.Spread.Sheets.CellTypes.HyperLinkTargetType | GC.Spread.Sheets.CellTypes.HyperLink} If no value is set, returns the hyperlink's target type; otherwise, returns the hyperLink cell type.
  11524. * @example
  11525. * //This example creates a hyperlink cell.
  11526. * var cellType = new GC.Spread.Sheets.CellTypes.HyperLink();
  11527. * cellType.linkColor("blue");
  11528. * cellType.visitedLinkColor("#FFFF00");
  11529. * cellType.text("GrapeCity");
  11530. * cellType.linkToolTip("Company Web Site");
  11531. * cellType.target(GC.Spread.Sheets.CellTypes.HyperLinkTargetType.self);
  11532. * activeSheet.getCell(0, 2).cellType(cellType).value("http://www.grapecity.com/");
  11533. */
  11534. target(value?: GC.Spread.Sheets.CellTypes.HyperLinkTargetType): any;
  11535. /**
  11536. * Gets or sets the text string for the hyperlink.
  11537. * @param {string} value The text displayed in the hyperlink.
  11538. * @returns {string | GC.Spread.Sheets.CellTypes.HyperLink} If no value is set, returns the text in the hyperlink; otherwise, returns the hyperLink cell type.
  11539. * @example
  11540. * //This example creates a hyperlink cell.
  11541. * var cellType = new GC.Spread.Sheets.CellTypes.HyperLink();
  11542. * cellType.linkColor("blue");
  11543. * cellType.visitedLinkColor("#FFFF00");
  11544. * cellType.text("GrapeCity");
  11545. * cellType.linkToolTip("Company Web Site");
  11546. * cellType.target(GC.Spread.Sheets.CellTypes.HyperLinkTargetType.self);
  11547. * activeSheet.getCell(0, 2).cellType(cellType).value("http://www.grapecity.com/");
  11548. */
  11549. text(value?: string): any;
  11550. /**
  11551. * Gets or sets the color of visited links.
  11552. * @param {string} value The visited link color.
  11553. * @returns {string | GC.Spread.Sheets.CellTypes.HyperLink} If no value is set, returns the visited link color; otherwise, returns the hyperLink cell type.
  11554. * @example
  11555. * //This example creates a hyperlink cell.
  11556. * var cellType = new GC.Spread.Sheets.CellTypes.HyperLink();
  11557. * cellType.linkColor("blue");
  11558. * cellType.visitedLinkColor("#FFFF00");
  11559. * cellType.text("GrapeCity");
  11560. * cellType.linkToolTip("Company Web Site");
  11561. * cellType.target(GC.Spread.Sheets.CellTypes.HyperLinkTargetType.self);
  11562. * activeSheet.getCell(0, 2).cellType(cellType).value("http://www.grapecity.com/");
  11563. */
  11564. visitedLinkColor(value?: string): any;
  11565. }
  11566. export class RadioButtonList extends Base{
  11567. /**
  11568. * Represents an editable radio button list cell.
  11569. * @extends GC.Spread.Sheets.CellTypes.Base
  11570. * @class
  11571. * @example
  11572. * //This example creates a radio button list cell.
  11573. * var cellType2 = new GC.Spread.Sheets.CellTypes.RadioButtonList();
  11574. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11575. * activeSheet.getCell(2, 2).cellType(cellType2);
  11576. */
  11577. constructor();
  11578. /**
  11579. * Gets or sets the radio button list's orders.
  11580. * @param {GC.Spread.Sheets.CellTypes.Direction} value the order is vertical.
  11581. * @returns {GC.Spread.Sheets.CellTypes.Direction | GC.Spread.Sheets.CellTypes.RadioButtonList} If no value is set, returns whether the radio button list's orders is vertical; otherwise, returns the radio button list cellType.
  11582. * @example
  11583. * //This example creates a radio button list cell.
  11584. * var cellType2 = new GC.Spread.Sheets.CellTypes.RadioButtonList();
  11585. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11586. * cellType2.direction(GC.Spread.Sheets.CellTypes.Direction.vertical);
  11587. * activeSheet.getCell(2, 2).cellType(cellType2);
  11588. */
  11589. direction(value?: GC.Spread.Sheets.CellTypes.Direction): any;
  11590. /**
  11591. * Gets or sets the radio button list's layout is autofit.
  11592. * @param {boolean} value Whether the layout is autofit.
  11593. * @returns {boolean | GC.Spread.Sheets.CellTypes.RadioButtonList} If no value is set, returns whether the layout is autofit, returns the radio button list cellType.
  11594. * @example
  11595. * //This example creates a radio button list cell.
  11596. * var cellType2 = new GC.Spread.Sheets.CellTypes.RadioButtonList();
  11597. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11598. * cellType2.isFlowLayout(true);
  11599. * activeSheet.getCell(2, 2).cellType(cellType2);
  11600. */
  11601. isFlowLayout(value?: boolean): any;
  11602. /**
  11603. * Gets or sets the items for the radio-button list.
  11604. * @param {Array} items The items for the radio button list.
  11605. * @returns {Array | GC.Spread.Sheets.CellTypes.RadioButtonList} If no value is set, returns the items array; otherwise, returns the radio button list cellType.
  11606. * @example
  11607. * //This example creates a radio button list cell.
  11608. * var cellType2 = new GC.Spread.Sheets.CellTypes.RadioButtonList();
  11609. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11610. * activeSheet.getCell(2, 2).cellType(cellType2);
  11611. */
  11612. items(items?: GC.Spread.Sheets.CellTypes.ICelltypeItemOption[] | string[]): any;
  11613. /**
  11614. * Gets or sets the space for two items in the radio button list.
  11615. * @param {object} value the space for two items in the radio button list.
  11616. * @returns {object | GC.Spread.Sheets.CellTypes.RadioButtonList} If no value is set, returns the space for two items in the radio button list; otherwise, returns the radio button list cellType.
  11617. * @example
  11618. * //This example creates a radio button list cell.
  11619. * var cellType2 = new GC.Spread.Sheets.CellTypes.RadioButtonList();
  11620. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11621. * cellType2.itemSpacing({
  11622. * horizontal:80,
  11623. * vertical:20
  11624. * });
  11625. * activeSheet.getCell(2, 2).cellType(cellType2);
  11626. */
  11627. itemSpacing(value?: GC.Spread.Sheets.CellTypes.IItemSpacing): any;
  11628. /**
  11629. * Gets or sets the items for the radio button list's column count.
  11630. * @param {number} value The column count for the radio button list.
  11631. * @returns {number | GC.Spread.Sheets.CellTypes.RadioButtonList} If no value is set, returns the column count; otherwise, returns the radio button list cellType.
  11632. * @example
  11633. * //This example creates a radio button list cell.
  11634. * var cellType2 = new GC.Spread.Sheets.CellTypes.RadioButtonList();
  11635. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11636. * cellType2.maxColumnCount(2);
  11637. * activeSheet.getCell(2, 2).cellType(cellType2);
  11638. */
  11639. maxColumnCount(value?: number): any;
  11640. /**
  11641. * Gets or sets the items for the radio button list's row count.
  11642. * @param {number} value The row count for the radio button list.
  11643. * @returns {number | GC.Spread.Sheets.CellTypes.RadioButtonList} If no value is set, returns the row count; otherwise, returns the radio button list cellType.
  11644. * @example
  11645. * //This example creates radio button list cell.
  11646. * var cellType2 = new GC.Spread.Sheets.CellTypes.RadioButtonList();
  11647. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11648. * cellType2.maxRowCount(2);
  11649. * activeSheet.getCell(2, 2).cellType(cellType2);
  11650. */
  11651. maxRowCount(value?: number): any;
  11652. /**
  11653. * Gets or sets the text of radio button's position, only support left and right .
  11654. * @param {GC.Spread.Sheets.CellTypes.TextAlign} value the text of radio button's position.
  11655. * @returns {GC.Spread.Sheets.CellTypes.TextAlign | GC.Spread.Sheets.CellTypes.RadioButtonList} If no value is set, returns the text of radio button's position, returns the radio button list cellType.
  11656. * @example
  11657. * //This example creates a radio button list cell.
  11658. * var cellType2 = new GC.Spread.Sheets.CellTypes.RadioButtonList();
  11659. * cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
  11660. * cellType2.textAlign(GC.Spread.Sheets.CellTypes.TextAlign.left);
  11661. * activeSheet.getCell(2, 2).cellType(cellType2);
  11662. */
  11663. textAlign(value?: GC.Spread.Sheets.CellTypes.TextAlign): any;
  11664. }
  11665. export class RangeTemplate extends GC.Spread.Sheets.CellTypes.Base{
  11666. /**
  11667. * @description RangeTemplate provide a template from a range of referenced worksheet,it can apply to a cell.It will render the cell same as the tempalte and fill data different.If the param row,col, rowCount, colCount not set , it will use the whole sheet as the range scope.
  11668. * @extends GC.Spread.Sheets.CellTypes.Base
  11669. * @param {GC.Spread.Sheets.Worksheet} sheet the referenced worksheet, the sheet could be an individual sheet outside the workbook.
  11670. * @param {number} [row] the template scope start row.
  11671. * @param {number} [col] the template scope start col.
  11672. * @param {number} [rowCount] the template scope row count.
  11673. * @param {number} [colCount] the template scope col count.
  11674. * @class
  11675. * @example
  11676. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 2 });
  11677. * var sheet = spread.getActiveSheet();
  11678. * var sheet2 = spread.getSheetFromName("Sheet2");
  11679. * var celltype = new GC.Spread.Sheets.CellTypes.RangeTemplate(sheet2, 0, 0, 6, 4);
  11680. * sheet.getRange(0,0,2,2).cellType(celltype);
  11681. */
  11682. constructor(sheet: GC.Spread.Sheets.Worksheet, row?: number, col?: number, rowCount?: number, colCount?: number);
  11683. }
  11684. export class RowHeader extends Base{
  11685. /**
  11686. * Represents the painter of the row header cells.
  11687. * @extends GC.Spread.Sheets.CellTypes.Base
  11688. * @class
  11689. */
  11690. constructor();
  11691. }
  11692. export class Text extends Base{
  11693. /**
  11694. * Represents a text cell type.
  11695. * @extends GC.Spread.Sheets.CellTypes.Base
  11696. * @class
  11697. * @param {GC.Spread.Sheets.CellTypes.EditorType} editorType The editor type of the text cell type.
  11698. */
  11699. constructor();
  11700. }
  11701. }
  11702. module Charts{
  11703. export interface ErrorBarItem{
  11704. type?: number;
  11705. valueType?: number;
  11706. noEndCap?: boolean;
  11707. value?: number;
  11708. custom?: {
  11709. positive: string;
  11710. negative: string;
  11711. };
  11712. style?: {
  11713. color?: string;
  11714. width?: number;
  11715. transparency?: number;
  11716. dashStyle?: GC.Spread.Sheets.Charts.ILineStyle;
  11717. visible?: boolean;
  11718. }
  11719. }
  11720. export interface ErrorBarItems{
  11721. vertical?: GC.Spread.Sheets.Charts.ErrorBarItem;
  11722. horizontal?: GC.Spread.Sheets.Charts.ErrorBarItem;
  11723. }
  11724. export interface IAxes{
  11725. primaryCategory?: IAxis;
  11726. primaryValue?: IAxis;
  11727. secondaryCategory?: IAxis;
  11728. secondaryValue?: IAxis;
  11729. }
  11730. export interface IAxis{
  11731. visible?: boolean;
  11732. tickLabelPosition?: GC.Spread.Sheets.Charts.TickLabelPosition;
  11733. lineStyle?: GC.Spread.Sheets.Charts.IBorder;
  11734. style?: GC.Spread.Sheets.Charts.IAxisStyle;
  11735. majorTickPosition?: GC.Spread.Sheets.Charts.TickMark;
  11736. minorTickPosition?: GC.Spread.Sheets.Charts.TickMark;
  11737. majorUnit?: number;
  11738. minorUnit?: number;
  11739. min?: number | Date;
  11740. max?: number | Date;
  11741. format?: string;
  11742. title?: GC.Spread.Sheets.Charts.IAxisTitle;
  11743. majorGridLine?: GC.Spread.Sheets.Charts.IGridLine;
  11744. minorGridLine?: GC.Spread.Sheets.Charts.IGridLine;
  11745. labelAngle?: number;
  11746. scaling?: GC.Spread.Sheets.Charts.IScaling;
  11747. displayUnit?: GC.Spread.Sheets.Charts.IDisplayUnit;
  11748. }
  11749. export interface IAxisStyle{
  11750. color?: string;
  11751. transparency?: number;
  11752. fontFamily?: string;
  11753. fontSize?: number;
  11754. }
  11755. export interface IAxisTitle{
  11756. text?: string;
  11757. color?: string;
  11758. transparency?: number;
  11759. fontFamily?: string;
  11760. fontSize?: number;
  11761. }
  11762. export interface IBorder{
  11763. color?: string;
  11764. width?: number;
  11765. transparency?: number;
  11766. dashStyle?: GC.Spread.Sheets.Charts.LineType;
  11767. }
  11768. export interface IChartArea{
  11769. backColor?: string;
  11770. backColorTransparency?: number;
  11771. fontFamily?: string;
  11772. fontSize?: number;
  11773. color?: string;
  11774. transparency?: number;
  11775. border?: GC.Spread.Sheets.Charts.IBorder;
  11776. }
  11777. export interface IChartTextStyle{
  11778. color?: string;
  11779. fontFamily?: string;
  11780. fontSize?: number | string;
  11781. transparency?: number;
  11782. }
  11783. export interface IChartTitle{
  11784. text?: string;
  11785. fontFamily?: string;
  11786. fontSize?: number;
  11787. color?: string;
  11788. transparency?:number;
  11789. }
  11790. export interface IDataLabels{
  11791. showValue?: boolean;
  11792. showSeriesName?: boolean;
  11793. showCategoryName?: boolean;
  11794. showPercentage?: boolean;
  11795. position?: GC.Spread.Sheets.Charts.DataLabelPosition;
  11796. format?: string;
  11797. color?: string;
  11798. transparency?: number;
  11799. }
  11800. export interface IDataPointPart{
  11801. fillColor?: string;
  11802. idx?: number;
  11803. transparency?: number;
  11804. }
  11805. export interface IDisplayUnit{
  11806. unit?: number | GC.Spread.Sheets.Charts.DisplayUnit;
  11807. visible?: boolean;
  11808. style?: IChartTextStyle;
  11809. }
  11810. export interface IGridLine{
  11811. color?: string;
  11812. transparency?: number;
  11813. visible?: boolean;
  11814. width?: number;
  11815. }
  11816. export interface IHoverStyle{
  11817. color?:string;
  11818. transparency?:number;
  11819. borderStyle?: GC.Spread.Sheets.Charts.IBorder;
  11820. symbolStyle?: GC.Spread.Sheets.Charts.IHoverSymbolStyle;
  11821. }
  11822. export interface IHoverSymbolStyle{
  11823. color?:string;
  11824. transparency?:number;
  11825. borderStyle?: GC.Spread.Sheets.Charts.IBorder;
  11826. }
  11827. export interface ILegend{
  11828. position?: GC.Spread.Sheets.Charts.LegendPosition;
  11829. visible?: boolean;
  11830. backColor?: string;
  11831. backColorTransparency?: number;
  11832. borderStyle?: GC.Spread.Sheets.Charts.IBorder;
  11833. color?: string;
  11834. fontFamily?: string;
  11835. fontSize?: number;
  11836. }
  11837. export interface ILineStyle{
  11838. color?: string;
  11839. width?: number;
  11840. transparency?: number;
  11841. dashStyle?: GC.Spread.Sheets.Charts.LineType;
  11842. }
  11843. export interface IScaling{
  11844. orientation?: number;
  11845. logBase?: number;
  11846. }
  11847. export interface ISeries{
  11848. chartType?: GC.Spread.Sheets.Charts.ChartType;
  11849. axisGroup?: GC.Spread.Sheets.Charts.AxisGroup;
  11850. backColor?: string;
  11851. backColorTransparency?: number;
  11852. border?: GC.Spread.Sheets.Charts.IBorder;
  11853. startAngle?: number;
  11854. name?: string;
  11855. xValues?: string;
  11856. yValues?: string;
  11857. bubbleSizes?: string;
  11858. datalabels?: any;
  11859. symbol?: GC.Spread.Sheets.Charts.ISymbol;
  11860. errorBars?: GC.Spread.Sheets.Charts.ErrorBarItems;
  11861. trendlines?: GC.Spread.Sheets.Charts.TrendlineItem[];
  11862. }
  11863. export interface ISeriesSymbolBorder{
  11864. color?: string;
  11865. colorTransparency?: number;
  11866. transparency?: number;
  11867. width?: number;
  11868. lineType?: number;
  11869. }
  11870. export interface ISymbol{
  11871. fill: string;
  11872. fillColorTransparency: number;
  11873. size: number;
  11874. shape: GC.Spread.Sheets.Charts.SymbolShape;
  11875. border: GC.Spread.Sheets.Charts.ISeriesSymbolBorder;
  11876. }
  11877. export interface ITrendline{
  11878. type?: GC.Spread.Sheets.Charts.TrendlineType;
  11879. order?: number;
  11880. period?: number;
  11881. intercept?: number;
  11882. forward?: number;
  11883. backward?: number;
  11884. displayEquation?: boolean;
  11885. displayRSquared?: boolean;
  11886. fontFamily?: string;
  11887. fontSize?: number;
  11888. fontColor?: string;
  11889. name?: string;
  11890. style?: GC.Spread.Sheets.Charts.ILineStyle;
  11891. }
  11892. export interface TrendlineItem{
  11893. type?: GC.Spread.Sheets.Charts.TrendlineType;
  11894. display?: string;
  11895. order?: number;
  11896. period?: number;
  11897. label?: string;
  11898. style?: GC.Spread.Sheets.Charts.ILineStyle;
  11899. intercept?: number;
  11900. forward?: number;
  11901. backward?: number;
  11902. displayEquation?: boolean;
  11903. displayRSquared?: boolean;
  11904. name?: string;
  11905. fontFamily?: string;
  11906. fontSize?: number;
  11907. fontColor?: string;
  11908. }
  11909. /**
  11910. * Specifies the type of axis group.
  11911. * @enum {number}
  11912. */
  11913. export enum AxisGroup{
  11914. /**
  11915. * Primary axis group.
  11916. */
  11917. primary= 0,
  11918. /**
  11919. * Secondary axis group.
  11920. */
  11921. secondary= 1
  11922. }
  11923. /**
  11924. * Specifies the chart type.
  11925. * @enum {number}
  11926. */
  11927. export enum ChartType{
  11928. /**
  11929. * Combo
  11930. */
  11931. combo= 0,
  11932. /**
  11933. * Scatter
  11934. */
  11935. xyScatter= 1,
  11936. /**
  11937. * Radar
  11938. */
  11939. radar= 2,
  11940. /**
  11941. * Doughnut
  11942. */
  11943. doughnut= 3,
  11944. /**
  11945. * Area
  11946. */
  11947. area= 8,
  11948. /**
  11949. * Line
  11950. */
  11951. line= 9,
  11952. /**
  11953. * Pie
  11954. */
  11955. pie= 10,
  11956. /**
  11957. * Bubble
  11958. */
  11959. bubble= 11,
  11960. /**
  11961. * Clustered Column
  11962. */
  11963. columnClustered= 12,
  11964. /**
  11965. * Stacked Column
  11966. */
  11967. columnStacked= 13,
  11968. /**
  11969. * 100% Stacked Column
  11970. */
  11971. columnStacked100= 14,
  11972. /**
  11973. * Clustered Bar
  11974. */
  11975. barClustered= 18,
  11976. /**
  11977. * Stacked Bar
  11978. */
  11979. barStacked= 19,
  11980. /**
  11981. * 100% Stacked Bar
  11982. */
  11983. barStacked100= 20,
  11984. /**
  11985. * Stacked Line
  11986. */
  11987. lineStacked= 24,
  11988. /**
  11989. * 100% Stacked Line
  11990. */
  11991. lineStacked100= 25,
  11992. /**
  11993. * Line with Markers
  11994. */
  11995. lineMarkers= 26,
  11996. /**
  11997. * Stacked Line with Markers
  11998. */
  11999. lineMarkersStacked= 27,
  12000. /**
  12001. * 100% Stacked Line with Markers
  12002. */
  12003. lineMarkersStacked100= 28,
  12004. /**
  12005. * Scatter with Smoothed Lines
  12006. */
  12007. xyScatterSmooth= 33,
  12008. /**
  12009. * Scatter with Smoothed Lines and No Data Markers
  12010. */
  12011. xyScatterSmoothNoMarkers= 34,
  12012. /**
  12013. * Scatter with Lines.
  12014. */
  12015. xyScatterLines= 35,
  12016. /**
  12017. * Scatter with Lines and No Data Markers
  12018. */
  12019. xyScatterLinesNoMarkers= 36,
  12020. /**
  12021. * Stacked Area
  12022. */
  12023. areaStacked= 37,
  12024. /**
  12025. * 100% Stacked Area
  12026. */
  12027. areaStacked100= 38,
  12028. /**
  12029. * Radar with data makers
  12030. */
  12031. radarMarkers= 42,
  12032. /**
  12033. * Filled Radar
  12034. */
  12035. radarFilled= 43,
  12036. /**
  12037. * High-Low-Close
  12038. */
  12039. stockHLC= 49,
  12040. /**
  12041. * Open-High-Low-Close
  12042. */
  12043. stockOHLC= 50,
  12044. /**
  12045. * Volume-High-Low-Close
  12046. */
  12047. stockVHLC= 51,
  12048. /**
  12049. * Volume-Open-High-Low-Close
  12050. */
  12051. stockVOHLC= 52,
  12052. /**
  12053. * Box & Whisker
  12054. */
  12055. boxWhisker= 53,
  12056. /**
  12057. * Funnel
  12058. */
  12059. funnel= 54,
  12060. /**
  12061. * Pareto
  12062. */
  12063. paretoLine= 55,
  12064. /**
  12065. * map
  12066. */
  12067. regionMap= 56,
  12068. /**
  12069. * sunburst
  12070. */
  12071. sunburst= 57,
  12072. /**
  12073. * tree map
  12074. */
  12075. treemap= 58,
  12076. /**
  12077. * Waterfull
  12078. */
  12079. waterfall= 59,
  12080. /**
  12081. * Histogram
  12082. */
  12083. clusteredColumn= 60
  12084. }
  12085. /**
  12086. * Specifies where the data label is positioned.
  12087. * @enum {number}
  12088. */
  12089. export enum DataLabelPosition{
  12090. /**
  12091. * Adjust data label position automatically.
  12092. */
  12093. bestFit= 0,
  12094. /**
  12095. * Data label below point.
  12096. */
  12097. below= 1,
  12098. /**
  12099. * Data label centered on data point or inside bar or pie.
  12100. */
  12101. center= 2,
  12102. /**
  12103. * Data label positioned arbitrarily.
  12104. */
  12105. insideBase= 3,
  12106. /**
  12107. * Data label positioned arbitrarily.
  12108. */
  12109. insideEnd= 4,
  12110. /**
  12111. * Data label positioned at bottom of bar or pie.
  12112. */
  12113. left= 5,
  12114. /**
  12115. * Data label positioned at top of bar or pie.
  12116. */
  12117. outsideEnd= 6,
  12118. /**
  12119. * Data label positioned at top of bar or pie.
  12120. */
  12121. right= 7,
  12122. /**
  12123. * Data label above point.
  12124. */
  12125. above= 8
  12126. }
  12127. /**
  12128. * Specifies the way of the chart display blank data.
  12129. * @enum {number}
  12130. */
  12131. export enum DisplayBlanksAs{
  12132. /**
  12133. * Specifies display empty cells as connected
  12134. */
  12135. connected= 0,
  12136. /**
  12137. * Specifies display empty cells as gaps
  12138. */
  12139. gaps= 1,
  12140. /**
  12141. * Specifies display empty cells as zero
  12142. */
  12143. zero= 2
  12144. }
  12145. /**
  12146. * Specifies the built-in type of axis display unit.
  12147. * @enum {number}
  12148. */
  12149. export enum DisplayUnit{
  12150. /**
  12151. * The hundreds of built-in type.
  12152. */
  12153. hundreds = 0,
  12154. /**
  12155. * The thousands of built-in type.
  12156. */
  12157. thousands = 1,
  12158. /**
  12159. * The ten thousands of built-in type.
  12160. */
  12161. tenThousands = 2,
  12162. /**
  12163. * The hundred thousands of built-in type.
  12164. */
  12165. hundredThousands = 3,
  12166. /**
  12167. * The millions of built-in type.
  12168. */
  12169. millions = 4,
  12170. /**
  12171. * The ten millions of built-in type.
  12172. */
  12173. tenMillions = 5,
  12174. /**
  12175. * The hundred millions of built-in type.
  12176. */
  12177. hundredMillions = 6,
  12178. /**
  12179. * The billions of built-in type.
  12180. */
  12181. billions = 7,
  12182. /**
  12183. * The trillions of built-in type.
  12184. */
  12185. trillions = 8
  12186. }
  12187. /**
  12188. * Specifies the type of error bar in series
  12189. * enum {number}
  12190. */
  12191. export enum ErrorBarType{
  12192. /**
  12193. * Specifies each error bar has both minus and plus type at each data point.
  12194. */
  12195. both= 0,
  12196. /**
  12197. * Specifies each error bar has minus type at each data point.
  12198. */
  12199. minus= 1,
  12200. /**
  12201. * Specifies each error bar has plus type at each data point.
  12202. */
  12203. plus= 2
  12204. }
  12205. /**
  12206. * Specifies the value type of error bar in series
  12207. * enum {number}
  12208. */
  12209. export enum ErrorBarValueType{
  12210. /**
  12211. * Specifies error bar has custom value type, each error bars has it own value, each values may be different.
  12212. */
  12213. custom= 0,
  12214. /**
  12215. * Specifies each error bar has fixed value type at each data point.
  12216. */
  12217. fixedValue= 1,
  12218. /**
  12219. * Specifies each error bar has percentage value type at each data point.
  12220. */
  12221. percentage= 2,
  12222. /**
  12223. * Specifies each error bar has calculated standard deviation value type at each data point.
  12224. */
  12225. standardDeviation= 3,
  12226. /**
  12227. * Specifies each error bar has calculated standard error value type at each data point.
  12228. */
  12229. standardError= 4
  12230. }
  12231. /**
  12232. * Specifies the position of the legend on a chart.
  12233. * @enum {number}
  12234. */
  12235. export enum LegendPosition{
  12236. /**
  12237. * Above the chart.
  12238. */
  12239. top= 1,
  12240. /**
  12241. * To the right of the chart.
  12242. */
  12243. right= 2,
  12244. /**
  12245. * To the left of the chart.
  12246. */
  12247. left= 3,
  12248. /**
  12249. * Below the chart.
  12250. */
  12251. bottom= 4,
  12252. /**
  12253. * In the upper right-hand corner of the chart border.
  12254. */
  12255. topRight= 5
  12256. }
  12257. /**
  12258. * Specifies the type of line in series
  12259. * enum {number}
  12260. */
  12261. export enum LineType{
  12262. /**
  12263. * Specifies a solid line type
  12264. */
  12265. solid= 0,
  12266. /**
  12267. * Specifies a dot line type
  12268. */
  12269. dot= 1,
  12270. /**
  12271. * Specifies a dash line type
  12272. */
  12273. dash= 2,
  12274. /**
  12275. * Specifies a large dash line type
  12276. */
  12277. lgDash= 3,
  12278. /**
  12279. * Specifies a dash and a dot line type
  12280. */
  12281. dashDot= 4,
  12282. /**
  12283. * Specifies a large dash and a dot line type
  12284. */
  12285. lgDashDot= 5,
  12286. /**
  12287. * Specifies a large dash and a dot and a dot line type
  12288. */
  12289. lgDashDotDot= 6,
  12290. /**
  12291. * Specifies a small dash line type
  12292. */
  12293. sysDash= 7,
  12294. /**
  12295. * Specifies a small dot line type
  12296. */
  12297. sysDot= 8,
  12298. /**
  12299. * Specifies a small dash and a dot line type
  12300. */
  12301. sysDashDot= 9,
  12302. /**
  12303. * Specifies a small dash and a dot and a dot line type
  12304. */
  12305. sysDashDotDot= 10
  12306. }
  12307. /**
  12308. * Specifies whether the values corresponding to a particular data series are in rows or columns.
  12309. * @enum {number}
  12310. */
  12311. export enum RowCol{
  12312. /**
  12313. * Data series is in a column.
  12314. */
  12315. rows= 0,
  12316. /**
  12317. * Data series is in a row.
  12318. */
  12319. columns= 1
  12320. }
  12321. /**
  12322. * Specifies the shape of symbol in series
  12323. * enum {number}
  12324. */
  12325. export enum SymbolShape{
  12326. /**
  12327. * Specifies a circle shall be drawn at each data point.
  12328. */
  12329. circle= 0,
  12330. /**
  12331. * Specifies a dash shall be drawn at each data point.
  12332. */
  12333. dash= 1,
  12334. /**
  12335. * Specifies a diamond shall be drawn at each data point.
  12336. */
  12337. diamond= 2,
  12338. /**
  12339. * Specifies a dot shall be drawn at each data point.
  12340. */
  12341. dot= 3,
  12342. /**
  12343. * Doesn't draw any symbol at each data point.
  12344. */
  12345. none= 4,
  12346. /**
  12347. * Specifies a picture shall be drawn at each data point.
  12348. */
  12349. picture= 5,
  12350. /**
  12351. * Specifies a plus shall be drawn at each data point.
  12352. */
  12353. plus= 6,
  12354. /**
  12355. * Specifies a square shall be drawn at each data point.
  12356. */
  12357. square= 7,
  12358. /**
  12359. * Specifies a star shall be drawn at each data point.
  12360. */
  12361. star= 8,
  12362. /**
  12363. * Specifies a triangle shall be drawn at each data point.
  12364. */
  12365. triangle= 9,
  12366. /**
  12367. * Specifies an X shall be drawn at each data point.
  12368. */
  12369. x= 10
  12370. }
  12371. /**
  12372. * Specifies the position of tick-mark labels on the specified axis.
  12373. * @enum {number}
  12374. */
  12375. export enum TickLabelPosition{
  12376. /**
  12377. * Next to axis (where axis is not at either side of the chart).
  12378. */
  12379. nextToAxis= 2,
  12380. /**
  12381. * No tick marks.
  12382. */
  12383. none= 3
  12384. }
  12385. /**
  12386. * Specifies the position of major and minor tick marks for an axis.
  12387. * @enum {number}
  12388. */
  12389. export enum TickMark{
  12390. /**
  12391. * Crosses the axis.
  12392. */
  12393. cross= 0,
  12394. /**
  12395. * Inside the axis.
  12396. */
  12397. inside= 1,
  12398. /**
  12399. * No mark.
  12400. */
  12401. none= 2,
  12402. /**
  12403. * Outside the axis.
  12404. */
  12405. outside= 3
  12406. }
  12407. /**
  12408. * Specifies how the trendline that smoothes out fluctuations in the data is calculated.
  12409. * @enum {number}
  12410. */
  12411. export enum TrendlineType{
  12412. /**
  12413. * Uses an equation to calculate the least squares fit through points.
  12414. */
  12415. exponential= 0,
  12416. /**
  12417. * Uses the linear equation y = mx + b to calculate the least squares fit through points.
  12418. */
  12419. linear= 1,
  12420. /**
  12421. * Uses the equation y = c ln x + b to calculate the least squares fit through points.
  12422. */
  12423. logarithmic= 2,
  12424. /**
  12425. * Uses a sequence of averages computed from parts of the data series. The number
  12426. * of points equals the total number of points in the series less the number
  12427. * specified for the period.
  12428. */
  12429. movingAverage= 3,
  12430. /**
  12431. * Uses an equation to calculate the least squares fit through points.
  12432. */
  12433. polynomial= 4,
  12434. /**
  12435. * Uses an equation to calculate the least squares fit through points.
  12436. */
  12437. power= 5
  12438. }
  12439. export class Chart extends GC.Spread.Sheets.FloatingObjects.FloatingObject{
  12440. /**
  12441. * Represents a chart.
  12442. * @extends GC.Spread.Sheets.FloatingObjects.FloatingObject
  12443. * @class
  12444. * @param {GC.Spread.Sheets.Worksheet} sheet The host sheet of the chart.
  12445. * @param {string} name The name of the chart.
  12446. * @param {GC.Spread.Sheets.Charts.ChartType} chartType The type of the chart.
  12447. * @param {number} x The <i>x</i> location of the chart.
  12448. * @param {number} y The <i>y</i> location of the chart.
  12449. * @param {number} width The width of the chart.
  12450. * @param {number} height The height of the chart.
  12451. * @param {string?} dataRange The formula string of data range for the chart.
  12452. * @param {GC.Spread.Sheets.Charts.RowCol?} dataOrientation The orientation of data for series.
  12453. */
  12454. constructor(sheet: GC.Spread.Sheets.Worksheet, name: string, chartType: GC.Spread.Sheets.Charts.ChartType, x: number, y: number, width: number, height: number, dataRange?: string, dataOrientation?: GC.Spread.Sheets.Charts.RowCol);
  12455. /**
  12456. * Gets or sets the chart axes of the chart.
  12457. * @param {Object} value The chart axes of the chart.
  12458. * @param {Object} value.primaryCategory The primary category axis of the chart.
  12459. * @param {Object} value.primaryValue The primary value axis of the chart.
  12460. * @param {Object} value.secondaryCategory The secondary category axis of the chart.
  12461. * @param {Object} value.secondaryValue The secondary value axis of the chart.
  12462. *
  12463. * The primaryCategory, primaryValue, secondaryCategory and secondaryValue have same type.
  12464. * @param {boolean} value.primaryCategory.visible Indicates if the specified axis should be shown.
  12465. * @param {GC.Spread.Sheets.Charts.TickLabelPosition} value.primaryCategory.tickLabelPosition The tick label position.
  12466. * @param {Object} value.primaryCategory.lineStyle The line style of the primary category axis.
  12467. * @param {string} value.primaryCategory.lineStyle.color The line color of the primary category axis.
  12468. * @param {number} value.primaryCategory.lineStyle.transparency The transparency of the chart primary category axis line color.
  12469. * @param {number} value.primaryCategory.lineStyle.width The line width of the primary category axis.
  12470. * @param {Object} value.primaryCategory.style The style of the primary category axis.
  12471. * @param {string} value.primaryCategory.style.color The color of the primary category axis.
  12472. * @param {number} value.primaryCategory.style.transparency The transparency of the chart primary category axis color.
  12473. * @param {string} value.primaryCategory.style.fontFamily The font family of the primary category axis.
  12474. * @param {number} value.primaryCategory.style.fontSize The font size of the primary category axis, its unit is pixel.
  12475. * @param {GC.Spread.Sheets.Charts.TickMark} value.primaryCategory.majorTickPosition The major tick position of the primary category axis.
  12476. * @param {GC.Spread.Sheets.Charts.TickMark} value.primaryCategory.minorTickPosition The minor tick position of the primary category axis.
  12477. * @param {GC.Spread.Sheets.Charts.TimeUnit} value.primaryCategory.baseUnit The base unit scale of the date primary category axis.
  12478. * @param {number} value.primaryCategory.majorUnit The major unit of the primary category axis.
  12479. * @param {GC.Spread.Sheets.Charts.TimeUnit} value.primaryCategory.majorUnitScale The major unit scale of the date primary category axis.
  12480. * @param {number} value.primaryCategory.minorUnit The minor unit of the primary category axis.
  12481. * @param {GC.Spread.Sheets.Charts.TimeUnit} value.primaryCategory.minorUnitScale The minor unit scale of the date primary category axis.
  12482. * @param {number | Date} value.primaryCategory.min The minimum value of the related axis. (for value / date axis only)
  12483. * @param {number | Date} value.primaryCategory.max The maximum value of the related axis. (for value / date axis only)
  12484. * @param {string} value.primaryCategory.format The format of the primary category axis.
  12485. * @param {Object} value.primaryCategory.title The title of the primary category axis.
  12486. * @param {string} value.primaryCategory.title.text The title text of the primary category axis.
  12487. * @param {string} value.primaryCategory.title.color The title color of the primary category axis.
  12488. * @param {number} value.primaryCategory.title.transparency The transparency of the primary category axis color.
  12489. * @param {string} value.primaryCategory.title.fontFamily The title font family of the primary category axis.
  12490. * @param {number} value.primaryCategory.title.fontSize The title font size of the primary category axis, its unit is pixel.
  12491. * @param {Object} value.primaryCategory.majorGridLine The major grid line of the primary category axis.
  12492. * @param {Object} value.primaryCategory.minorGridLine The minor grid line of the primary category axis.
  12493. * @param {number} value.primaryCategory.labelAngle The label angle of the primary category axis.
  12494. * @param {Object} value.primaryCategory.scaling The scaling informations of the primary category axis.
  12495. * @param {number} value.primaryCategory.scaling.logBase The logarithmic scaling base value of the primary category axis.
  12496. * @param {Object} value.primaryCategory.displayUnit The display unit informations of the primary category axis.
  12497. * @param {number | GC.Spread.Sheets.Charts.DisplayUnit} value.primaryCategory.displayUnit.unit The built-in display unit string or custom number display unit of the primary category axis.
  12498. * @param {boolean} value.primaryCategory.displayUnit.visible The display unit label visible of the primary category axis.
  12499. * @param {Object} value.primaryCategory.displayUnit.style The display unit label style of the primary category axis.
  12500. * @param {string} value.primaryCategory.displayUnit.style.color The display unit label text color of the primary category axis.
  12501. * @param {number} value.primaryCategory.displayUnit.style.transparency The display unit label text transparency of the primary category axis color.
  12502. * @param {string} value.primaryCategory.displayUnit.style.fontFamily The display unit label text font family of the primary category axis.
  12503. * @param {number} value.primaryCategory.displayUnit.style.fontSize The display unit label text font size of the primary category axis, its unit is pixel.
  12504. * @returns {Object | GC.Spread.Sheets.Charts.Chart} If no value is set, returns the chart axes of the chart; otherwise, returns the chart.
  12505. *
  12506. * The majorGridLine and minorGridLine have same type.
  12507. * @param {string} value.primaryCategory.majorGridLine.color The color of the major grid line.
  12508. * @param {boolean} value.primaryCategory.majorGridLine.visible The visibility of the major grid line.
  12509. * @param {number} value.primaryCategory.majorGridLine.width The width of the major grid line.
  12510. * @param {number} value.primaryCategory.majorGridLine.transparency The transparency of the major grid line color.
  12511. *
  12512. * @returns {Object | GC.Spread.Sheets.Charts.Chart} If no value is set, returns the chart axes of the chart; otherwise, returns the chart.
  12513. */
  12514. axes(value?: GC.Spread.Sheets.Charts.IAxes): any;
  12515. /**
  12516. * Gets or sets the chart area style of the chart.
  12517. * @param {Object} value The chart area style of the chart.
  12518. * @param {string} value.backColor The background color of the chart area.
  12519. * @param {number} value.backColorTransparency The transparency of the chart area backColor.
  12520. * @param {string} value.fontFamily The font family of the chart area.
  12521. * @param {number} value.fontSize The font size of the chart area, its unit is pixel.
  12522. * @param {string} value.color The color of the chart area.
  12523. * @param {number} value.transparency The transparency of the chart area color.
  12524. * @param {Object} value.border The border of the chart area.
  12525. * @param {string} value.border.color The border color of the chart area.
  12526. * @param {number} value.border.transparency The border transparency of the chart area.
  12527. * @param {number} value.border.width The border width of the chart area.
  12528. * @param {GC.Spread.Sheets.Charts.LineDashStyle} value.border.dashStyle The border dash style of the chart area.
  12529. * @returns {Object | GC.Spread.Sheets.Charts.Chart} If no value is set, returns the chart area style of the chart; otherwise, returns the chart.
  12530. */
  12531. chartArea(value?: GC.Spread.Sheets.Charts.IChartArea): any;
  12532. /**
  12533. * Gets or sets the type of the chart.
  12534. * @param {GC.Spread.Sheets.Charts.ChartType} value The type of the chart.
  12535. * @returns {GC.Spread.Sheets.Charts.ChartType | GC.Spread.Sheets.Charts.Chart} If no value is set, returns the type of the chart; otherwise, returns the chart.
  12536. */
  12537. chartType(value?: GC.Spread.Sheets.Charts.ChartType): any;
  12538. /**
  12539. * Gets or sets the chart data labels style of the chart.
  12540. * @param {Object} value The chart data labels style of the chart.
  12541. * @param {boolean} value.showValue Whether to show value in data labels.
  12542. * @param {boolean} value.showSeriesName Whether to show series name in data labels.
  12543. * @param {boolean} value.showCategoryName Whether to show category name in data labels.
  12544. * @param {boolean} value.showPercentage Whether to show the percent value in data labels.
  12545. * @param {GC.Spread.Sheets.Charts.DataLabelPosition} value.position The position of the chart data labels.
  12546. * @param {string} value.format The format of the chart data labels.
  12547. * @param {string} value.color The color of the chart data labels.
  12548. * @param {number} value.transparency The transparency of the chart data labels color.
  12549. * @returns {Object | GC.Spread.Sheets.Charts.Chart} If no value is set, returns the chart data labels style of the chart; otherwise, returns the chart.
  12550. */
  12551. dataLabels(value?: GC.Spread.Sheets.Charts.IDataLabels): any;
  12552. /**
  12553. * Gets or sets the whole data range of the chart as formula string.
  12554. * @param {string} value The formula string of the data range for the chart.
  12555. * @returns {string | GC.Spread.Sheets.Charts.Chart} If no value is set, returns the formula string of the whole data range for the chart; otherwise, returns the chart.
  12556. */
  12557. dataRange(value?: string): any;
  12558. /**
  12559. * Gets or sets the way that the chart display blank data.
  12560. * @param {GC.Spread.Sheets.Charts.DisplayBlanksAs} value the way that the chart display blank data.
  12561. * @returns {GC.Spread.Sheets.Charts.DisplayBlanksAs | GC.Spread.Sheets.Charts.Chart} If no value is set, returns the way that the chart display blank data, otherwise, returns the chart.
  12562. */
  12563. displayBlanksAs(value?: GC.Spread.Sheets.Charts.DisplayBlanksAs): any;
  12564. /**
  12565. * Gets or sets whether to show #N/A cells as blank cells.
  12566. * @param {boolean} value that whether to show #N/A cells as blank cells.
  12567. * @returns { boolean | GC.Spread.Sheets.Charts.Chart} If no value is set, returns whether to show #N/A cells as blank cells, otherwise, returns the chart.
  12568. */
  12569. displayNaNAsBlank(value?: boolean): boolean | GC.Spread.Sheets.Charts.Chart;
  12570. /**
  12571. * Gets or sets the style when user hover over the dataPoint.
  12572. * @param {Object} value The hover style of the dataPoint been hovered.
  12573. * @param {string} value.color The color of the dataPoint been hovered.
  12574. * @param {number} value.transparency The color transparency of the dataPoint been hovered.
  12575. * @param {Object} value.borderStyle The border of the dataPoint been hovered.
  12576. * @param {string} value.borderStyle.color The border color of the dataPoint been hovered.
  12577. * @param {number} value.borderStyle.width The border width of the dataPoint been hovered.
  12578. * @param {number} value.borderStyle.transparency The border color transparency of the dataPoint been hovered.
  12579. * @param {GC.Spread.Sheets.Charts.LineType} value.borderStyle.dashStyle The border dash style of the dataPoint been hovered.
  12580. * @param {Object} value.symbolStyle The symbol style of the dataPoint been hovered.
  12581. * @param {string} value.symbolStyle.color The symbol's color of the dataPoint been hovered.
  12582. * @param {number} value.symbolStyle.transparency The symbol's transparency of the dataPoint been hovered.
  12583. * @param {Object} value.symbolStyle.borderStyle The symbol's border style of the dataPoint been hovered.
  12584. * @param {number} value.symbolStyle.borderStyle.color The symbol's border color of the dataPoint been hovered.
  12585. * @param {number} value.symbolStyle.borderStyle.width The symbol's border width of the dataPoint been hovered.
  12586. * @param {number} value.symbolStyle.borderStyle.transparency The symbol's border transparency of the dataPoint been hovered.
  12587. * @param {GC.Spread.Sheets.Charts.LineType} value.symbolStyle.borderStyle.dashStyle The symbol's border dash style of the dataPoint been hovered.
  12588. * @returns {Object | GC.Spread.Sheets.Charts.Chart} If no value is set, returns the current hover style of the chart; otherwise, returns the chart.
  12589. */
  12590. hoverStyle(value?: GC.Spread.Sheets.Charts.IHoverStyle): any;
  12591. /**
  12592. * Gets or sets the way that if the chart display hidden rows and columns data.
  12593. * @param {boolean} value the value that if the chart display hidden rows and columns data.
  12594. * @returns {boolean | GC.Spread.Sheets.Charts.Chart} If no value is set, returns the value that if the chart display hidden rows and columns data, otherwise, returns the chart.
  12595. */
  12596. ignoreHidden(value?: boolean): boolean | GC.Spread.Sheets.Charts.Chart;
  12597. /**
  12598. * Gets or sets the legend of the chart.
  12599. * @param {Object} value The legend of the chart.
  12600. * @param {GC.Spread.Sheets.Charts.LegendPosition} value.position The position of the chart legend.
  12601. * @param {boolean} value.visible The visibility of the chart legend.
  12602. * @param {string} value.backColor The backgroundColor of the chart legend.
  12603. * @param {number} value.backColorTransparency The transparency of the chart legend color
  12604. * @param {Object} value.borderStyle The borderStyle of the chart legend.
  12605. * @param {string} value.borderStyle.color The border color of the chart legend.
  12606. * @param {number} value.borderStyle.width The border width of the chart legend.
  12607. * @param {number} value.borderStyle.transparency The transparency of the chart legend border color
  12608. * @param {string} value.color The color of the chart legend text.
  12609. * @param {string} value.fontFamily The font family of the chart legend text.
  12610. * @param {number} value.fontSize The font size of the chart legend text.
  12611. * @returns {Object | GC.Spread.Sheets.Charts.Chart} If no value is set, returns the legend of the chart; otherwise, returns the chart.
  12612. */
  12613. legend(value?: GC.Spread.Sheets.Charts.ILegend): any;
  12614. /**
  12615. * Gets the series collection of the chart.
  12616. * @returns {GC.Spread.Sheets.Charts.SeriesCollection} Returns the series collection of the chart.
  12617. */
  12618. series(): GC.Spread.Sheets.Charts.SeriesCollection;
  12619. /**
  12620. * Switches the data orientation between rows and columns.
  12621. * @returns {boolean} Returns true when data orienetation is changable and successful switched; otherwise, false.
  12622. */
  12623. switchDataOrientation(): boolean;
  12624. /**
  12625. * Gets or sets the title of the chart.
  12626. * @param {Object} value The title of the chart.
  12627. * @param {string} value.text The text of the chart title.
  12628. * @param {string} value.fontFamily The font family of the chart title.
  12629. * @param {number} value.fontSize The font size of the chart title, its unit is pixel.
  12630. * @param {string} value.color The color of the chart title.
  12631. * @param {number} value.transparency The transparency of the chart title color
  12632. * @returns {Object | GC.Spread.Sheets.Charts.Chart} If no value is set, returns the title of the chart; otherwise, returns the chart.
  12633. */
  12634. title(value?: GC.Spread.Sheets.Charts.IChartTitle): any;
  12635. /**
  12636. * Gets or sets whether apply animation to the chart.
  12637. * @param {boolean} value whether apply animation to the chart.
  12638. * @returns {boolean | GC.Spread.Sheets.Charts.Chart} If no value is set, returns whether apply animation to the chart; otherwise, returns the chart.
  12639. */
  12640. useAnimation(value?: boolean): any;
  12641. }
  12642. export class ChartCollection{
  12643. /**
  12644. * Represents a chart manager that managers all charts in a sheet.
  12645. * @class
  12646. * @param {GC.Spread.Sheets.Worksheet} sheet The worksheet.
  12647. */
  12648. constructor();
  12649. /**
  12650. * Adds a chart to the sheet.
  12651. * @param {string} name The name of the chart that will be added to the sheet.
  12652. * @param {GC.Spread.Sheets.Charts.ChartType} chartType The type of the chart.
  12653. * @param {number} x The x location of the chart.
  12654. * @param {number} y The y location of the chart.
  12655. * @param {number} width The width of the chart.
  12656. * @param {number} height The height of the chart.
  12657. * @param {string} dataRange The formula string of data range for the chart.
  12658. * @param {GC.Spread.Sheets.Charts.RowCol} dataOrientation The orientation of data for series.
  12659. * @return {GC.Spread.Sheets.Charts.Chart} The chart that has been added to the sheet.
  12660. * @example
  12661. * //This example shows how to add a chart.
  12662. * var dataRange = "A1:D4";
  12663. * var chart = activeSheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, dataRange);
  12664. */
  12665. add(name: string, chartType: GC.Spread.Sheets.Charts.ChartType, x: number, y: number, width: number, height: number, dataRange?: string, dataOrientation?: GC.Spread.Sheets.Charts.RowCol): GC.Spread.Sheets.Charts.Chart;
  12666. /**
  12667. * Gets all of the charts in the sheet.
  12668. * @return {Array.<GC.Spread.Sheets.Charts.Chart>} The collection of all the charts in the sheet.
  12669. * @example
  12670. * var dataRange = "A1:D4";
  12671. * activeSheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 180, dataRange);
  12672. * var dataRange2 = "A20:D24";
  12673. * activeSheet.charts.add('Chart2', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 220, 600, 180, dataRange2);
  12674. * var charts = activeSheet.charts.all();
  12675. * for (var i = 0; i &lt; charts.length; i++) {
  12676. * alert("Name of chart " + i + " is: " + charts[i].name())
  12677. * }
  12678. */
  12679. all(): GC.Spread.Sheets.Charts.Chart[];
  12680. /**
  12681. * Removes all charts in the sheet.
  12682. */
  12683. clear(): void;
  12684. /**
  12685. * Gets a chart from the sheet by the indicate name.
  12686. * @param {string} name The name of the chart.
  12687. * @return {GC.Spread.Sheets.Charts.Chart} The chart in the sheet with the indicate name.
  12688. * @example
  12689. * var dataRange = "A1:D4";
  12690. * activeSheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, dataRange);
  12691. * //button
  12692. * $("#button1").click(function () {
  12693. * var chart = activeSheet.charts.get("f2");
  12694. * });
  12695. */
  12696. get(name: string): GC.Spread.Sheets.Charts.Chart;
  12697. /**
  12698. * Removes a chart from the sheet by the indicate name.
  12699. * @param {string} name The name of the chart.
  12700. * @example
  12701. * var dataRange = "A1:D4";
  12702. * activeSheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, dataRange);
  12703. * //button
  12704. * $("#button1").click(function () {
  12705. * activeSheet.resumePaint();
  12706. * activeSheet.charts.remove("f2");
  12707. * activeSheet.repaint();
  12708. * });
  12709. */
  12710. remove(name: string): void;
  12711. /**
  12712. * Gets or sets the z-index of chart.
  12713. * @param {string} name The name of the chart.
  12714. * @param {number} zIndex The z-index of the chart.
  12715. * @return {number | *} If the parameter 'zIndex' is null or undefined,it will return the z-index of the chart with the indicate name.
  12716. * @example
  12717. * var dataRange = "A1:D4";
  12718. * activeSheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 180, dataRange);
  12719. * var dataRange2 = "A20:D24";
  12720. * activeSheet.charts.add('Chart2', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 180, 600, 180, dataRange2);
  12721. * activeSheet.charts.zIndex('Chart1', 897);
  12722. * activeSheet.charts.zIndex('Chart2', 890);
  12723. */
  12724. zIndex(name: string, zIndex?: number): any;
  12725. }
  12726. export class DataPoints{
  12727. /**
  12728. * Represents the dataPoint collection that managers all dataPoints in a chart series.
  12729. * @class
  12730. */
  12731. constructor();
  12732. /**
  12733. * Gets all dataPoints or a specified dataPoint from dataPoints collection.
  12734. * @param {number} index The index of the dataPoint.
  12735. * @return {Object | Object[]} The dataPoint of the chart series.
  12736. * @example
  12737. * // This example shows how to get a dataPoint.
  12738. * var dataRange = new GC.Spread.Sheets.Range(0, 0, 16, 4);
  12739. * var chart = activeSheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.sunburst, 250, 20, 600, 400, dataRange);
  12740. * var dataPoints = chart.series().dataPoints();
  12741. * var dataPoint = dataPoints.get(0);
  12742. */
  12743. get(index?: number): any;
  12744. /**
  12745. * Updates the specified dataPoint's property.
  12746. * @param {number} index The index of the dataPoint.
  12747. * @param {Object} dataPoint The data point of the chart.
  12748. * @param {string} dataPoint.fillColor The color of the data point.
  12749. * @param {number} dataPoint.transparency The transparency of the data point color.
  12750. * @example
  12751. * // This example shows how to update the property of a dataPoint
  12752. * var dataRange = new GC.Spread.Sheets.Range(0, 0, 16, 4);
  12753. * var chart = activeSheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.sunburst, 250, 20, 600, 400, dataRange);
  12754. * var dataPoints = chart.series().dataPoints();
  12755. * var dataPoint = {fillColor: 'rgba(255,255,0,0,7)'};
  12756. * dataPoints.set(0, dataPoint);
  12757. */
  12758. set(index: number, dataPoint: GC.Spread.Sheets.Charts.IDataPointPart): void;
  12759. }
  12760. export class SeriesCollection{
  12761. /**
  12762. * Represents the series manager that managers all series in a chart.
  12763. * @class
  12764. */
  12765. constructor();
  12766. /**
  12767. * Adds a new series to series collection.
  12768. * @param {Object} seriesItem The series of the chart.
  12769. * @param {Object} seriesItem.symbol, seriesItem The symbol of the series.
  12770. * @param {string} seriesItem.symbol.fill The symbol fill color of the series.
  12771. * @param {number} seriesItem.symbol.size The symbol size of the series.
  12772. * @param {GC.Spread.Sheets.Charts.SymbolShape} seriesItem.symbol.shape The symbol shape of the series.
  12773. * @param {Object} seriesItem.symbol.border The symbol border of the series.
  12774. * @param {string} seriesItem.symbol.border.color The symbol border color of the series.
  12775. * @param {number} seriesItem.symbol.border.width The symbol border width of the series.
  12776. * @param {GC.Spread.Sheets.Charts.LineType} seriesItem.symbol.border.lineType The symbol border line Type of the series.
  12777. * @param {GC.Spread.Sheets.Charts.ChartType} seriesItem.chartType The chart type of the series.
  12778. * @param {GC.Spread.Sheets.Charts.AxisGroup} seriesItem.axisGroup The axis group of the series.
  12779. * @param {string} seriesItem.backColor The background color of the series.
  12780. * @param {number} seriesItem.backColorTransparency The transparency of the series background color.
  12781. * @param {string} seriesItem.border The border of the series.
  12782. * @param {string} seriesItem.border.color The border color of the series.
  12783. * @param {number} seriesItem.border.transparency The transparency of the series border color.
  12784. * @param {number} seriesItem.border.width The border width of the series.
  12785. * @param {GC.Spread.Sheets.Charts.LineDashStyle} seriesItem.border.lineType The border line type of the series.
  12786. * @param {number} seriesItem.startAngle The first slice angle of the chart whose chart type is pie. The default value is 0, which represents the 12 o'clock position.
  12787. * @param {string} seriesItem.name The name formula of the series.
  12788. * @param {string} seriesItem.xValues The x values formula of the series.
  12789. * @param {string} seriesItem.yValues The y values formula of the series.
  12790. * @param {string} seriesItem.bubbleSizes The bubble sizes formula of the series. This is used for bubble chart.
  12791. * @example
  12792. * // This example shows how to add a new series.
  12793. * var dataRange = "A1:D4";
  12794. * var chart = activeSheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, dataRange);
  12795. * chart.series.add({
  12796. * chartType: GC.Spread.Sheets.Charts.ChartType.columnClustered,
  12797. * axisGroup: GC.Spread.Sheets.Charts.AxisGroup.primary,
  12798. * backColor: {
  12799. * color: "lightblue",
  12800. * width: 2
  12801. * },
  12802. * xValues: "A2:A4",
  12803. * yValues: "B2:B4"
  12804. * });
  12805. */
  12806. add(series: GC.Spread.Sheets.Charts.ISeries | GC.Spread.Sheets.Charts.ISeries[]): void;
  12807. /**
  12808. * Gets the dataPoints of the chart series.
  12809. * @returns {GC.Spread.Sheets.Charts.DataPoints} Returns the dataPoints of the chart series if exist.
  12810. */
  12811. dataPoints(): GC.Spread.Sheets.Charts.DataPoints;
  12812. /**
  12813. * Gets all series or a specified series from series collection.
  12814. * @param {number} index The index of the series.
  12815. * @return {Object | Object[]} The series of the chart.
  12816. * @example
  12817. * // This example shows how to get a series.
  12818. * var dataRange = "A1:D4";
  12819. * var chart = activeSheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, dataRange);
  12820. * var series1 = chart.series().get(0);
  12821. */
  12822. get(index?: number): any;
  12823. /**
  12824. * Removes a specified series from series collection.
  12825. * @param {number} index The index of the series.
  12826. * @example
  12827. * // This example shows how to remove a specified series.
  12828. * var dataRange = "A1:D4";
  12829. * var chart = activeSheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, dataRange);
  12830. * chart.series.remove(0);
  12831. */
  12832. remove(index: number): void;
  12833. /**
  12834. * Updates the specified series's property.
  12835. * @param {number} index The index of the series.
  12836. * @param {Object} seriesItem The series of the chart.
  12837. * @param {Object} seriesItem.symbol, seriesItem The symbol of the series.
  12838. * @param {string} seriesItem.symbol.fill The symbol fill color of the series.
  12839. * @param {number} seriesItem.symbol.fillColorTransparency The transparency of the symbol fill color.
  12840. * @param {number} seriesItem.symbol.size The symbol size of the series.
  12841. * @param {GC.Spread.Sheets.Charts.SymbolShape} seriesItem.symbol.shape The symbol shape of the series.
  12842. * @param {Object} seriesItem.symbol.border The symbol border of the series.
  12843. * @param {string} seriesItem.symbol.border.color The symbol border color of the series.
  12844. * @param {number} seriesItem.symbol.border.colorTransparency The transparency of the symbol border color.
  12845. * @param {number} seriesItem.symbol.border.width The symbol border width of the series.
  12846. * @param {GC.Spread.Sheets.Charts.LineType} seriesItem.symbol.border.lineType The symbol border line Type of the series.
  12847. * @param {Object} seriesItem.errorbars The error bars of the series.
  12848. * @param {Object} seriesItem.errorbars.vertical The vertical error bar of the series, each series may has different direction error bar(s) based on chart type.
  12849. * @param {GC.Spread.Sheets.Charts.ErrorBarType} seriesItem.errorbars.vertical.type The error bar type.
  12850. * @param {GC.Spread.Sheets.Charts.ErrorBarValueType} seriesItem.errorbars.vertical.valuetype The error bar value type.
  12851. * @param {boolean} seriesItem.errorbars.vertical.noEndCap The error bar has end cap or not.
  12852. * @param {number} seriesItem.errorbars.vertical.value The error bar value, just take effect on the FixedValue(1) / Percentage(2) / StandardDeviation(3) value type.
  12853. * @param {Object} seriesItem.errorbars.vertical.custom The error bar custom formulas, it contains positive formula and negative formula, just take effect on the Custom(0) value type.
  12854. * @param {string} seriesItem.errorbars.vertical.custom.positive The error bar custom positive formula.
  12855. * @param {string} seriesItem.errorbars.vertical.custom.negative The error bar custom negative formula.
  12856. * @param {Object} seriesItem.errorbars.vertical.style The error bar styles.
  12857. * @param {string} seriesItem.errorbars.vertical.style.color The error bar color.
  12858. * @param {number} seriesItem.errorbars.vertical.style.transparency The error bar transparency.
  12859. * @param {number} seriesItem.errorbars.vertical.style.width The error bar width.
  12860. * @param {Object} seriesItem.errorbars.horizontal The horizontal error bar of the series, each series may has different direction error bar(s) based on chart type.
  12861. * @param {GC.Spread.Sheets.Charts.ErrorBarType} seriesItem.errorbars.horizontal.type The error bar type.
  12862. * @param {GC.Spread.Sheets.Charts.ErrorBarValueType} seriesItem.errorbars.horizontal.valuetype The error bar value type.
  12863. * @param {boolean} seriesItem.errorbars.horizontal.noEndCap The error bar has end cap or not.
  12864. * @param {number} seriesItem.errorbars.horizontal.value The error bar value, just take effect on the FixedValue(1) / Percentage(2) / StandardDeviation(3) value type.
  12865. * @param {Object} seriesItem.errorbars.horizontal.custom The error bar custom formulas, it contains positive formula and negative formula, just take effect on the Custom(0) value type.
  12866. * @param {string} seriesItem.errorbars.horizontal.custom.positive The error bar custom positive formula.
  12867. * @param {string} seriesItem.errorbars.horizontal.custom.negative The error bar custom negative formula.
  12868. * @param {Object} seriesItem.errorbars.horizontal.style The error bar styles.
  12869. * @param {string} seriesItem.errorbars.horizontal.style.color The error bar color.
  12870. * @param {number} seriesItem.errorbars.horizontal.style.transparency The error bar transparency.
  12871. * @param {number} seriesItem.errorbars.horizontal.style.width The error bar width.
  12872. * @param {GC.Spread.Sheets.Charts.LineDashStyle} seriesItem.errorbars.horizontal.style.dashStyle The error bar dash style.
  12873. * @param {Object[]} seriesItem.trendlines The trendlines of the series.
  12874. * @param {GC.Spread.Sheets.Charts.TrendlineType} seriesItem.trendlines[0].type The type of the trendline.
  12875. * @param {number} seriesItem.trendlines[0].order The order of the polynomial trendline.
  12876. * @param {number} seriesItem.trendlines[0].period The period of the movingAverage trendline.
  12877. * @param {number} seriesItem.trendlines[0].intercept The intercept of the trendline.
  12878. * @param {number} seriesItem.trendlines[0].forward The forward of the trendline.
  12879. * @param {number} seriesItem.trendlines[0].backward The backward of the trendline.
  12880. * @param {boolean} seriesItem.trendlines[0].displayEquation Whether display the equation of the trendline.
  12881. * @param {boolean} seriesItem.trendlines[0].displayRSquared Whether display the R squared of the trendline.
  12882. * @param {string} seriesItem.trendlines[0].fontFamily The fontFamily of the trendline.
  12883. * @param {number} seriesItem.trendlines[0].fontSize The fontSize of the trendline.
  12884. * @param {string} seriesItem.trendlines[0].fontColor The fontColor of the trendline.
  12885. * @param {string} seriesItem.trendlines[0].name The name of the trendline.
  12886. * @param {Object} seriesItem.trendlines[0].style The line style of the trendline.
  12887. * @param {string} seriesItem.trendlines[0].style.color The color of the trendline.
  12888. * @param {number} seriesItem.trendlines[0].style.transparency The transparency of the trendline.
  12889. * @param {number} seriesItem.trendlines[0].style.width The width of the trendline.
  12890. * @param {GC.Spread.Sheets.Charts.LineDashStyle} seriesItem.trendlines[0].style.dashStyle The dash style of the trendline.
  12891. * @param {GC.Spread.Sheets.Charts.ChartType} seriesItem.chartType The chart type of the series.
  12892. * @param {GC.Spread.Sheets.Charts.AxisGroup} seriesItem.axisGroup The axis group of the series.
  12893. * @param {string} seriesItem.backColor The background color of the series.
  12894. * @param {number} seriesItem.backColorTransparency The transparency of the series background color.
  12895. * @param {Object} seriesItem.border The border of the series.
  12896. * @param {string} seriesItem.border.color The border color of the series.
  12897. * @param {GC.Spread.Sheets.Charts.LineDashStyle} seriesItem.border.lineType The border line type of the series.
  12898. * @param {number} seriesItem.border.transparency The transparency of the series border color.
  12899. * @param {number} seriesItem.border.width The border width of the series.
  12900. * @param {number} seriesItem.startAngle The first slice angle of the chart whose chart type is pie. The default value is 0, which represents the 12 o'clock position.
  12901. * @param {string} seriesItem.name The name formula of the series.
  12902. * @param {string} seriesItem.xValues The x values formula of the series.
  12903. * @param {string} seriesItem.yValues The y values formula of the series.
  12904. * @param {string} seriesItem.bubbleSizes The bubble sizes formula of the series. This is used for bubble chart.
  12905. * @param {Array} seriesItem.trendlines The trendlines of the series.
  12906. * @param {string} seriesItem.bubbleSizes The bubble sizes formula of the series. This is used for bubble chart.
  12907. * @example
  12908. * // This example shows how to update the property of a series.
  12909. * var dataRange = "A1:D4";
  12910. * var chart = activeSheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 250, 20, 600, 400, dataRange);
  12911. * var series1 = chart.series().get(0);
  12912. * series1.backColor = "red";
  12913. * chart.series().set(0, series1);
  12914. */
  12915. set(index: number, series: GC.Spread.Sheets.Charts.ISeries): void;
  12916. }
  12917. }
  12918. module Commands{
  12919. /**
  12920. * Represents the command used to automatically resize the column in a sheet.
  12921. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  12922. * @property {function} execute - performs an execute or undo operation.<br />
  12923. * The arguments of the execute method are as follows.<br />
  12924. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  12925. * options {Object} The options of the operation.<br />
  12926. * options.sheetName {string} The sheet name.<br />
  12927. * options.columns {Array} The resize columns; each item is an object which has a col.<br />
  12928. * options.rowHeader {boolean} Whether the resized columns are in the row header area.<br />
  12929. * options.autoFitType {GC.Spread.Sheets.AutoFitType} Whether the auto-fit action includes the header text.<br />
  12930. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  12931. * @example
  12932. * var columns = [ { col: 3 } ];
  12933. * spread.options.allowUndo = true;
  12934. * spread.commandManager().execute({cmd: "autoFitColumn", sheetName: "Sheet1", columns: columns, isRowHeader: false, autoFitType: GC.Spread.Sheets.AutoFitType.cell});
  12935. */
  12936. var autoFitColumn: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, columns: Object[], rowHeader: boolean, autoFitType: GC.Spread.Sheets.AutoFitType}, isUndo: boolean): any};
  12937. /**
  12938. * Represents the command used to automatically resize the row in a sheet.
  12939. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  12940. * @property {function} execute - performs an execute or undo operation.<br />
  12941. * The arguments of the execute method are as follows.<br />
  12942. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  12943. * options {Object} The options of the operation.<br />
  12944. * options.sheetName {string} The sheet name.<br />
  12945. * options.rows {Array} The resize rows; each item is an object which has a row.<br />
  12946. * options.columnHeader {boolean} Whether the resized rows are in the column header area.<br />
  12947. * options.autoFitType {GC.Spread.Sheets.AutoFitType} Whether the auto-fit action includes the header text.<br />
  12948. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  12949. * @example
  12950. * spread.options.allowUndo = true;
  12951. * var rows = [ { row: 3 } ];
  12952. * spread.commandManager().execute({cmd: "autoFitRow", sheetName: "Sheet1", rows: rows, isColHeader: false, autoFitType: GC.Spread.Sheets.AutoFitType.cell});
  12953. */
  12954. var autoFitRow: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, rows: Object[], columnHeader: boolean, autoFitType: GC.Spread.Sheets.AutoFitType}, isUndo: boolean): any};
  12955. /**
  12956. * Represents the command used to stop cell editing and cancel input.
  12957. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  12958. * @property {function} execute - performs an execute or undo operation.<br />
  12959. * The arguments of the execute method are as follows.<br />
  12960. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  12961. * options {Object} The options of the operation.<br />
  12962. * options.sheetName {string} The sheet name.<br />
  12963. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  12964. */
  12965. var cancelInput: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  12966. /**
  12967. * Represents the command used to switch the formula reference between relative, absolute, and mixed when editing formulas.
  12968. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  12969. * @property {function} execute - performs an execute or undo operation.<br />
  12970. * The arguments of the execute method are as follows.<br />
  12971. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  12972. * options {Object} The options of the operation.<br />
  12973. * options.sheetName {string} The sheet name.<br />
  12974. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  12975. */
  12976. var changeFormulaReference: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  12977. /**
  12978. * Represents the command used to clear the cell value.
  12979. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  12980. * @property {function} execute - performs an execute or undo operation.<br />
  12981. * The arguments of the execute method are as follows.<br />
  12982. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  12983. * options {Object} The options of the operation.<br />
  12984. * options.sheetName {string} The sheet name.<br />
  12985. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  12986. * @example
  12987. * // clear selected cells with the tab key
  12988. * spread.commandManager().setShortcutKey('clear', GC.Spread.Commands.Key.tab, false, false, false, false); // Tab key
  12989. */
  12990. var clear: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  12991. /**
  12992. * Represents the command used to clear the active cell value and enters edit mode.
  12993. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  12994. * @property {function} execute - performs an execute or undo operation.<br />
  12995. * The arguments of the execute method are as follows.<br />
  12996. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  12997. * options {Object} The options of the operation.<br />
  12998. * options.sheetName {string} The sheet name.<br />
  12999. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13000. */
  13001. var clearAndEditing: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13002. /**
  13003. * Represents the command used to clear cell values on a worksheet.
  13004. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13005. * @property {function} execute - performs an execute or undo operation.<br />
  13006. * The arguments of the execute method are as follows.<br />
  13007. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13008. * options {Object} The options of the operation.<br />
  13009. * options.sheetName {string} The sheet name.<br />
  13010. * options.ranges {Array} The clear cell value ranges whose item type is GC.Spread.Sheets.Range.<br />
  13011. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13012. * @example
  13013. * spread.options.allowUndo = true;
  13014. * spread.commandManager().execute({cmd: "clearValues", sheetName: "Sheet1", ranges: [new GC.Spread.Sheets.Range(8, 5, 2, 1)]});
  13015. */
  13016. var clearValues: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, ranges:GC.Spread.Sheets.Range[]}, isUndo: boolean): any};
  13017. /**
  13018. * Represents the command used for a Clipboard paste on the worksheet.
  13019. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13020. * @property {function} execute - performs an execute or undo operation.<br />
  13021. * The arguments of the execute method are as follows.<br />
  13022. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13023. * options {Object} The options of the operation.<br />
  13024. * options.sheetName {string} The sheet name.<br />
  13025. * options.fromSheet {GC.Spread.Sheets.Worksheet} The source sheet.<br />
  13026. * options.fromRanges {Array} The source range array which item type is GC.Spread.Sheets.Range.<br />
  13027. * options.pastedRanges {Array} The target range array which item type is GC.Spread.Sheets.Range.<br />
  13028. * options.isCutting {boolean} Whether the operation is cutting or copying.<br />
  13029. * options.clipboardText {string} The text on the clipboard.<br />
  13030. * options.pasteOption {GC.Spread.Sheets.ClipboardPasteOptions} The Clipboard pasting option that indicates which content to paste.<br />
  13031. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13032. * @example
  13033. * //This example uses the clipboardPaste method.
  13034. * activeSheet.setValue(0, 0, 1, GC.Spread.Sheets.SheetArea.viewport);
  13035. * activeSheet.setValue(1, 0, 2, GC.Spread.Sheets.SheetArea.viewport);
  13036. * activeSheet.setFormula(2, 0, "=A1+A2", GC.Spread.Sheets.SheetArea.viewport);
  13037. * activeSheet.setValue(0, 1, 3, GC.Spread.Sheets.SheetArea.viewport);
  13038. * activeSheet.setValue(1, 1, 4, GC.Spread.Sheets.SheetArea.viewport);
  13039. * activeSheet.setFormula(2, 1, "=B1+B2", GC.Spread.Sheets.SheetArea.viewport);
  13040. * var fromRange = [new GC.Spread.Sheets.Range(0, 0, 3, 2)];
  13041. * var toRanges = [new GC.Spread.Sheets.Range(5, 0, 3, 2)];
  13042. * $("#button1").click(function () {
  13043. * //Cut Paste Action
  13044. * spread.commandManager().execute({cmd: "clipboardPaste", sheetName: "Sheet1", fromSheet: activeSheet, fromRanges: fromRange, pastedRanges: toRanges, isCutting: true, clipboardText: "", pasteOption: GC.Spread.Sheets.ClipboardPasteOptions.all});
  13045. * });
  13046. * $("#button2").click(function () {
  13047. * spread.commandManager().execute({cmd: "clipboardPaste", sheetName: "Sheet1", fromSheet: activeSheet, fromRanges: fromRange, pastedRanges: toRanges, isCutting: false, clipboardText: "", pasteOption: GC.Spread.Sheets.ClipboardPasteOptions.all});
  13048. * });
  13049. * //Add button controls to page
  13050. * &lt;input type="button" id="button1" value="button1"/&gt;
  13051. * &lt;input type="button" id="button2" value="button2"/&gt;
  13052. */
  13053. var clipboardPaste: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, fromSheet: GC.Spread.Sheets.Worksheet, fromRanges: GC.Spread.Sheets.Range[], pastedRanges: GC.Spread.Sheets.Range[], isCutting: boolean, clipboardText: string, pasteOption: GC.Spread.Sheets.ClipboardPasteOptions}, isUndo: boolean): any};
  13054. /**
  13055. * Represents the command used to commit the cell editing and sets the array formula to the active range.
  13056. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13057. * @property {function} execute - performs an execute or undo operation.<br />
  13058. * The arguments of the execute method are as follows.<br />
  13059. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13060. * options {Object} The options of the operation.<br />
  13061. * options.sheetName {string} The sheet name.<br />
  13062. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13063. */
  13064. var commitArrayFormula: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13065. /**
  13066. * Represents the command used to stop cell editing and moves the active cell to the next row.
  13067. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13068. * @property {function} execute - performs an execute or undo operation.<br />
  13069. * The arguments of the execute method are as follows.<br />
  13070. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13071. * options {Object} The options of the operation.<br />
  13072. * options.sheetName {string} The sheet name.<br />
  13073. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13074. */
  13075. var commitInputNavigationDown: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13076. /**
  13077. * Represents the command used to stop cell editing and moves the active cell to the previous row.
  13078. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13079. * @property {function} execute - performs an execute or undo operation.<br />
  13080. * The arguments of the execute method are as follows.<br />
  13081. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13082. * options {Object} The options of the operation.<br />
  13083. * options.sheetName {string} The sheet name.<br />
  13084. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13085. */
  13086. var commitInputNavigationUp: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13087. /**
  13088. * Represents the command used to copy the selected item text to the Clipboard.
  13089. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13090. * @property {function} execute - performs an execute or undo operation.<br />
  13091. * The arguments of the execute method are as follows.<br />
  13092. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13093. * options {Object} The options of the operation.<br />
  13094. * options.sheetName {string} The sheet name.<br />
  13095. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13096. */
  13097. var copy: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13098. /**
  13099. * Represents the command used to cut the selected item text to the Clipboard.
  13100. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13101. * @property {function} execute - performs an execute or undo operation.<br />
  13102. * The arguments of the execute method are as follows.<br />
  13103. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13104. * options {Object} The options of the operation.<br />
  13105. ** options.sheetName {string} The sheet name.<br />
  13106. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13107. */
  13108. var cut: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13109. /**
  13110. * Represents the command for deleting the floating objects.
  13111. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13112. * @property {function} execute - performs an execute or undo operation.<br />
  13113. * The arguments of the execute method are as follows.<br />
  13114. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13115. * options {Object} The options of the operation.<br />
  13116. * options.sheetName {string} The sheet name.<br />
  13117. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13118. */
  13119. var deleteFloatingObjects: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}, isUndo: boolean): boolean};
  13120. /**
  13121. * Represents the command used to drag and copy the floating objects on the sheet.
  13122. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13123. * @property {function} execute - performs an execute or undo operation.<br />
  13124. * The arguments of the execute method are as follows.<br />
  13125. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13126. * options {Object} The options of the operation.<br />
  13127. * options.sheetName {string} The sheet name.<br />
  13128. * options.floatingObjects {Array} The names array of floating objects.<br />
  13129. * options.offsetX The horizontal offset.<br />
  13130. * options.offsetY The vertical offset.<br />
  13131. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise <c>false</c>.
  13132. */
  13133. var dragCopyFloatingObjects: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, floatingObjects: string[], offsetX: number, offsetY: number}, isUndo: boolean): boolean};
  13134. /**
  13135. * Represents the command used to drag a range and drop it onto another range on the worksheet.
  13136. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13137. * @property {function} execute - performs an execute or undo operation.<br />
  13138. * The arguments of the execute method are as follows.<br />
  13139. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13140. * commandOptions {Object} The options of the operation.<br />
  13141. * commandOptions.sheetName {string} The sheet name.<br />
  13142. * commandOptions.fromRow {number} The source row index for the drag drop.<br />
  13143. * commandOptions.fromColumn {number} The source column index for the drag drop.<br />
  13144. * commandOptions.toRow {number} The destination row index for the drag drop.<br />
  13145. * commandOptions.toColumn {number} The destination column index for the drag drop.<br />
  13146. * commandOptions.rowCount {number} The row count for the drag drop.<br />
  13147. * commandOptions.columnCount {number} The column count for the drag drop.<br />
  13148. * commandOptions.copy {boolean} If set to <c>true</c> copy; otherwise, cut if <c>false</c>.<br />
  13149. * commandOptions.insert {boolean} If set to <c>true</c> inserts the drag data in the drop row or column.<br />
  13150. * commandOptions.option {GC.Spread.Sheets.CopyToOptions} Indicates the content type to drag and drop.<br />
  13151. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13152. * @example
  13153. * spread.options.allowUndo = true;
  13154. * spread.commandManager().execute({cmd: "dragDrop", sheetName: "Sheet1", fromRow:2, fromColumn:1, toRow:12, toColumn:2, rowCount:2, columnCount:2, copy: true, insert: false, option: GC.Spread.Sheets.CopyToOptions.value});
  13155. */
  13156. var dragDrop: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, fromRow: number, fromColumn: number, toRow: number, toColumn: number, rowCount: number, columnCount: number, copy: boolean, insert: boolean, option: GC.Spread.Sheets.CopyToOptions}, isUndo: boolean): boolean};
  13157. /**
  13158. * Represents the command used to apply a new value to a cell on the worksheet.
  13159. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13160. * @property {function} execute - performs an execute or undo operation.<br />
  13161. * The arguments of the execute method are as follows.<br />
  13162. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13163. * options {Object} The options of the operation.<br />
  13164. * options.sheetName {string} The sheet name.<br />
  13165. * options.row {number} The row index of the cell.<br />
  13166. * options.col {number} The column index of the cell.<br />
  13167. * options.newValue {Object} The new value of the cell.<br />
  13168. * options.autoFormat {boolean} Whether to format the new value automatically.<br />
  13169. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13170. */
  13171. var editCell: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, row: number, col: number, newValue: any, autoFormat: boolean}, isUndo: boolean): any};
  13172. /**
  13173. * Represents the command to expand or collapse a column range group.
  13174. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13175. * @property {function} execute - performs an execute or undo operation.<br />
  13176. * The arguments of the execute method are as follows.<br />
  13177. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13178. * options {Object} The options of the operation.<br />
  13179. * options.sheetName {string} The sheet name.<br />
  13180. * options.index {number} The outline summary index.<br />
  13181. * options.level {number} The outline level.<br />
  13182. * options.collapsed {boolean} Whether to make the outline collapsed or expanded.<br />
  13183. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13184. */
  13185. var expandColumnOutline: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, index: number, level: number, collapsed: boolean}, isUndo: boolean): boolean};
  13186. /**
  13187. * Represents the command used to expand or collapse column range groups on the same level.
  13188. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13189. * @property {function} execute - performs an execute or undo operation.<br />
  13190. * The arguments of the execute method are as follows.<br />
  13191. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13192. * options {Object} The options of the operation.<br />
  13193. * options.sheetName {string} The sheet name.<br />
  13194. * options.level {number} The outline level.<br />
  13195. * isUndo {boolean} <c>true</c> if this an undo operation; otherwise, <c>false</c>.
  13196. */
  13197. var expandColumnOutlineForLevel: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, level: number}, isUndo: boolean): boolean};
  13198. /**
  13199. * Represents the command to expand or collapse a row range group.
  13200. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13201. * @property {function} execute - performs an execute or undo operation.<br />
  13202. * The arguments of the execute method are as follows.<br />
  13203. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13204. * options {Object} The options of the operation.<br />
  13205. * options.sheetName {string} The sheet name.<br />
  13206. * options.index {number} The outline summary index.<br />
  13207. * options.level {number} The outline level.<br />
  13208. * options.collapsed {boolean} Whether to make the outline collapsed or expanded.<br />
  13209. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13210. */
  13211. var expandRowOutline: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, index: number, level: number, collapsed: boolean}, isUndo: boolean): boolean};
  13212. /**
  13213. * Represents the command used to expand or collapse row range groups on the same level.
  13214. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13215. * @property {function} execute - performs an execute or undo operation.<br />
  13216. * The arguments of the execute method are as follows.<br />
  13217. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13218. * options {Object} The options of the operation.<br />
  13219. * options.sheetName {string} The sheet name.<br />
  13220. * options.level {number} The outline level.<br />
  13221. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13222. */
  13223. var expandRowOutlineForLevel: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, level: number}, isUndo: boolean): boolean};
  13224. /**
  13225. * Represents the command used to drag and fill a range on the sheet.
  13226. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13227. * @property {function} execute - performs an execute or undo operation.<br />
  13228. * The arguments of the execute method are as follows.<br />
  13229. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13230. * options {Object} The options of the operation.<br />
  13231. * options.sheetName {string} The sheet name.<br />
  13232. * options.startRange {GC.Spread.Sheets.Range} The start range.<br />
  13233. * options.fillRange {GC.Spread.Sheets.Range} The fill range.<br />
  13234. * options.autoFillType {GC.Spread.Sheets.Fill.AutoFillType} The auto fill type.<br />
  13235. * options.fillDirection {GC.Spread.Sheets.Fill.FillDirection} The fill direction.<br />
  13236. * isUndo {boolean} <c>true</c> if an undo operation; otherwise, <c>false</c>.
  13237. * @example
  13238. * spread.options.allowUndo = true;
  13239. * var srange = new GC.Spread.Sheets.Range(10, 5, 1, 1);
  13240. * var frange = new GC.Spread.Sheets.Range(11, 5, 5, 1);
  13241. * spread.commandManager().execute({cmd: "fill", sheetName: "Sheet1", startRange: srange, fillRange: frange, autoFillType: GC.Spread.Sheets.Fill.AutoFillType.fillSeries, fillDirection: GC.Spread.Sheets.Fill.FillDirection.down });
  13242. */
  13243. var fill: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, startRange: GC.Spread.Sheets.Range, fillRange: GC.Spread.Sheets.Range, autoFillType: GC.Spread.Sheets.Fill.AutoFillType, fillDirection: GC.Spread.Sheets.Fill.FillDirection}, isUndo: boolean): boolean};
  13244. /**
  13245. * Represents the command for moving floating objects.
  13246. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13247. * @property {function} execute - performs an execute or undo operation.<br />
  13248. * The arguments of the execute method are as follows.<br />
  13249. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13250. * options {Object} The options of the operation.<br />
  13251. * options.sheetName {string} The sheet name.<br />
  13252. * options.floatingObjects {Array} The names array of floating objects.<br />
  13253. * options.offsetX The horizontal offset.<br />
  13254. * options.offsetY The vertical offset.
  13255. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13256. */
  13257. var moveFloatingObjects: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, floatingObjects: string[], offsetX: number, offsetY: number}, isUndo: boolean): boolean};
  13258. /**
  13259. * Represents the command used to move the active cell to the next cell.
  13260. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13261. * @property {function} execute - performs an execute or undo operation.<br />
  13262. * The arguments of the execute method are as follows.<br />
  13263. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13264. * options {Object} The options of the operation.<br />
  13265. * options.sheetName {string} The sheet name.<br />
  13266. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13267. * @example
  13268. * //This example maps the moveToNextCell action.
  13269. * spread.focus();
  13270. * spread.commandManager().setShortcutKey('moveToNextCell', GC.Spread.Commands.Key.a, false, false, false, false); // a
  13271. */
  13272. var moveToNextCell: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13273. /**
  13274. * Represents the command used to select the next control if the active cell is the last visible cell; otherwise, move the active cell to the next cell.
  13275. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13276. * @property {function} execute - performs an execute or undo operation.<br />
  13277. * The arguments of the execute method are as follows.<br />
  13278. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13279. * options {Object} The options of the operation.<br />
  13280. * options.sheetName {string} The sheet name.<br />
  13281. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13282. * @example
  13283. * //This example maps the moveToNextCellThenControl action.
  13284. * spread.commandManager().setShortcutKey('moveToNextCellThenControl', GC.Spread.Commands.Key.tab, false, false, false, false); // Tab key
  13285. * spread.commandManager().setShortcutKey('moveToPreviousCellThenControl', GC.Spread.Commands.Key.tab, false, true, false, false); // Shift key and Tab key
  13286. */
  13287. var moveToNextCellThenControl: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13288. /**
  13289. * Represents the command used to move the active cell to the previous cell.
  13290. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13291. * @property {function} execute - performs an execute or undo operation.<br />
  13292. * The arguments of the execute method are as follows.<br />
  13293. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13294. * options {Object} The options of the operation.<br />
  13295. * options.sheetName {string} The sheet name.<br />
  13296. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13297. * @example
  13298. * //This example uses the moveToPreviousCell action.
  13299. * spread.commandManager().setShortcutKey('moveToPreviousCell', GC.Spread.Commands.Key.a, false, false, false, false); // a
  13300. */
  13301. var moveToPreviousCell: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13302. /**
  13303. * Represents the command used to select the previous control if the active cell is the first visible cell; otherwise, move the active cell to the previous cell.
  13304. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13305. * @property {function} execute - performs an execute or undo operation.<br />
  13306. * The arguments of the execute method are as follows.<br />
  13307. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13308. * options {Object} The options of the operation.<br />
  13309. * options.sheetName {string} The sheet name.<br />
  13310. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13311. * @example
  13312. * //This example maps the moveToPreviousCellThenControl action.
  13313. * spread.commandManager().setShortcutKey('moveToNextCellThenControl', GC.Spread.Commands.Key.tab, false, false, false, false); // Tab key
  13314. * spread.commandManager().setShortcutKey('moveToPreviousCellThenControl', GC.Spread.Commands.Key.tab, false, true, false, false); // Shift key and Tab key
  13315. */
  13316. var moveToPreviousCellThenControl: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13317. /**
  13318. * Represents the command used to move the active cell to the last row.
  13319. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13320. * @property {function} execute - performs an execute or undo operation.<br />
  13321. * The arguments of the execute method are as follows.<br />
  13322. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13323. * options {Object} The options of the operation.<br />
  13324. * options.sheetName {string} The sheet name.<br />
  13325. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13326. * @example
  13327. * //This example maps the navigationBottom action to the Tab key.
  13328. * spread.commandManager().setShortcutKey('navigationDown', GC.Spread.Commands.Key.tab, false, false, false, false); // Tab key
  13329. * spread.commandManager().setShortcutKey('navigationBottom', GC.Spread.Commands.Key.tab, false, true, false, false); // Shift key and Tab key
  13330. */
  13331. var navigationBottom: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13332. /**
  13333. * Represents the command used to move the active cell to the next row.
  13334. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13335. * @property {function} execute - performs an execute or undo operation.<br />
  13336. * The arguments of the execute method are as follows.<br />
  13337. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13338. * options {Object} The options of the operation.<br />
  13339. * options.sheetName {string} The sheet name.<br />
  13340. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13341. * @example
  13342. * //This example maps the navigationDown key.
  13343. * spread.commandManager().setShortcutKey('navigationDown', GC.Spread.Commands.Key.tab, false, false, false, false); // Tab key
  13344. * spread.commandManager().setShortcutKey('navigationBottom', GC.Spread.Commands.Key.tab, false, true, false, false); // Shift key and Tab key
  13345. */
  13346. var navigationDown: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13347. /**
  13348. * Represents the command used to move the active cell to the last column.
  13349. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13350. * @property {function} execute - performs an execute or undo operation.<br />
  13351. * The arguments of the execute method are as follows.<br />
  13352. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13353. * options {Object} The options of the operation.<br />
  13354. * options.sheetName {string} The sheet name.<br />
  13355. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13356. * @example
  13357. * //This example uses the navigationEnd method.
  13358. * spread.commandManager().setShortcutKey('navigationEnd', GC.Spread.Commands.Key.tab, false, false, false, false); // Tab key
  13359. */
  13360. var navigationEnd: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13361. /**
  13362. * Represents the command used to move the active cell to the last column without regard to frozen trailing columns.
  13363. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13364. * @property {function} execute - performs an execute or undo operation.<br />
  13365. * The arguments of the execute method are as follows.<br />
  13366. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13367. * options {Object} The options of the operation.<br />
  13368. * options.sheetName {string} The sheet name.<br />
  13369. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13370. * @example
  13371. * //This example uses the navigationEnd2 action.
  13372. * spread.commandManager().setShortcutKey("navigationEnd2", GC.Spread.Commands.Key.a, false, false, false, false);
  13373. */
  13374. var navigationEnd2: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13375. /**
  13376. * Represents the command used to move the active cell to the first cell in the sheet.
  13377. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13378. * @property {function} execute - performs an execute or undo operation.<br />
  13379. * The arguments of the execute method are as follows.<br />
  13380. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13381. * options {Object} The options of the operation.<br />
  13382. * options.sheetName {string} The sheet name.<br />
  13383. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13384. * @example
  13385. * //This example uses the navigationFirst action.
  13386. * spread.commandManager().setShortcutKey("navigationFirst", GC.Spread.Commands.Key.a, false, false, false, false);
  13387. */
  13388. var navigationFirst: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13389. /**
  13390. * Represents the command used to move the active cell to the first column.
  13391. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13392. * @property {function} execute - performs an execute or undo operation.<br />
  13393. * The arguments of the execute method are as follows.<br />
  13394. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13395. * options {Object} The options of the operation.<br />
  13396. * options.sheetName {string} The sheet name.<br />
  13397. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13398. * @example
  13399. * //This example uses the navigationHome action.
  13400. * spread.commandManager().setShortcutKey("navigationHome", GC.Spread.Commands.Key.a, false, false, false, false);
  13401. */
  13402. var navigationHome: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13403. /**
  13404. * Represents the command used to move the active cell to the first column without regard to frozen columns.
  13405. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13406. * @property {function} execute - performs an execute or undo operation.<br />
  13407. * The arguments of the execute method are as follows.<br />
  13408. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13409. * options {Object} The options of the operation.<br />
  13410. ** options.sheetName {string} The sheet name.<br />
  13411. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13412. * @example
  13413. * //This example uses the navigationHome2 action.
  13414. * spread.commandManager().setShortcutKey("navigationHome2", GC.Spread.Commands.Key.a, false, false, false, false);
  13415. */
  13416. var navigationHome2: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13417. /**
  13418. * Represents the command used to move the active cell to the last cell in the sheet.
  13419. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13420. * @property {function} execute - performs an execute or undo operation.<br />
  13421. * The arguments of the execute method are as follows.<br />
  13422. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13423. * options {Object} The options of the operation.<br />
  13424. * options.sheetName {string} The sheet name.<br />
  13425. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13426. * @example
  13427. * //This example uses the navigationLast action.
  13428. * spread.commandManager().setShortcutKey("navigationLast", GC.Spread.Commands.Key.a, false, false, false, false);
  13429. */
  13430. var navigationLast: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13431. /**
  13432. * Represents the command used to move the active cell to the previous column.
  13433. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13434. * @property {function} execute - performs an execute or undo operation.<br />
  13435. * The arguments of the execute method are as follows.<br />
  13436. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13437. * options {Object} The options of the operation.<br />
  13438. * options.sheetName {string} The sheet name.<br />
  13439. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13440. * @example
  13441. * //This example uses the navigationLeft action.
  13442. * spread.commandManager().setShortcutKey("navigationLeft", GC.Spread.Commands.Key.a, false, false, false, false);
  13443. */
  13444. var navigationLeft: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13445. /**
  13446. * Represents the command used to move the active sheet to the next sheet.
  13447. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13448. * @property {function} execute - performs an execute or undo operation.<br />
  13449. * The arguments of the execute method are as follows.<br />
  13450. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13451. * options {Object} The options of the operation.<br />
  13452. * options.sheetName {string} The sheet name.<br />
  13453. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13454. * @example
  13455. * //This example uses the navigationNextSheet action.
  13456. * spread.commandManager().setShortcutKey("navigationNextSheet", GC.Spread.Commands.Key.a, false, false, false, false);
  13457. */
  13458. var navigationNextSheet: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13459. /**
  13460. * Represents the command used to move the active cell down one page of rows.
  13461. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13462. * @property {function} execute - performs an execute or undo operation.<br />
  13463. * The arguments of the execute method are as follows.<br />
  13464. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13465. * options {Object} The options of the operation.<br />
  13466. * options.sheetName {string} The sheet name.<br />
  13467. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13468. * @example
  13469. * //This example uses the navigationPageDown action.
  13470. * spread.commandManager().setShortcutKey("navigationPageDown", GC.Spread.Commands.Key.a, false, false, false, false);
  13471. */
  13472. var navigationPageDown: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13473. /**
  13474. * Represents the command used to move the active cell up one page of rows.
  13475. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13476. * @property {function} execute - performs an execute or undo operation.<br />
  13477. * The arguments of the execute method are as follows.<br />
  13478. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13479. * options {Object} The options of the operation.<br />
  13480. * options.sheetName {string} The sheet name.<br />
  13481. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13482. * @example
  13483. * //This example uses the navigationPageUp action.
  13484. * spread.commandManager().setShortcutKey("navigationPageUp", GC.Spread.Commands.Key.a, false, false, false, false);
  13485. */
  13486. var navigationPageUp: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13487. /**
  13488. * Represents the command used to move the active sheet to the previous sheet.
  13489. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13490. * @property {function} execute - performs an execute or undo operation.<br />
  13491. * The arguments of the execute method are as follows.<br />
  13492. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13493. * options {Object} The options of the operation.<br />
  13494. * options.sheetName {string} The sheet name.<br />
  13495. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13496. * @example
  13497. * //This example uses the navigationPreviousSheet action.
  13498. * spread.commandManager().setShortcutKey("navigationNextSheet", GC.Spread.Commands.Key.a, false, false, false, false);
  13499. * spread.commandManager().setShortcutKey("navigationPreviousSheet", GC.Spread.Commands.Key.c, false, false, false, false);
  13500. */
  13501. var navigationPreviousSheet: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}, isUndo: boolean): any};
  13502. /**
  13503. * Represents the command used to move the active cell to the next column.
  13504. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13505. * @property {function} execute - performs an execute or undo operation.<br />
  13506. * The arguments of the execute method are as follows.<br />
  13507. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13508. * options {Object} The options of the operation.<br />
  13509. * options.sheetName {string} The sheet name.<br />
  13510. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13511. * @example
  13512. * //This example uses the navigationRight action.
  13513. * spread.commandManager().setShortcutKey("navigationRight", GC.Spread.Commands.Key.a, false, false, false, false);
  13514. */
  13515. var navigationRight: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13516. /**
  13517. * Represents the command used to move the active cell to the first row.
  13518. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13519. * @property {function} execute - performs an execute or undo operation.<br />
  13520. * The arguments of the execute method are as follows.<br />
  13521. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13522. * options {Object} The options of the operation.<br />
  13523. * options.sheetName {string} The sheet name.<br />
  13524. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13525. * @example
  13526. * //This example uses the navigationTop action.
  13527. * spread.commandManager().setShortcutKey("navigationTop", GC.Spread.Commands.Key.a, false, false, false, false);
  13528. */
  13529. var navigationTop: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13530. /**
  13531. * Represents the command used to move the active cell to the previous row.
  13532. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13533. * @property {function} execute - performs an execute or undo operation.<br />
  13534. * The arguments of the execute method are as follows.<br />
  13535. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13536. * options {Object} The options of the operation.<br />
  13537. * options.sheetName {string} The sheet name.<br />
  13538. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13539. * @example
  13540. * //This example maps the navigationUp action to a.
  13541. * spread.commandManager().setShortcutKey('navigationUp', GC.Spread.Commands.Key.a, false, false, false, false); // a
  13542. */
  13543. var navigationUp: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13544. /**
  13545. * Represents the command used to open a calculator picker in specified cell.
  13546. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13547. * @property {function} execute - performs an execute or undo operation.<br />
  13548. * The arguments of the execute method are as follows.<br />
  13549. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13550. * options {Object} The options of the operation.<br />
  13551. * options.sheetName {string} The sheet name.<br />
  13552. * options.sheetArea {GC.Spread.Sheets.SheetArea} The sheet area.<br />
  13553. * options.row {number} The rowIndex.<br />
  13554. * options.col {number} The columnIndex.<br />
  13555. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13556. */
  13557. var openCalculator: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, row: number, col: number, sheetArea: GC.Spread.Sheets.SheetArea}, isUndo: boolean): any};
  13558. /**
  13559. * Represents the command used to open a color picker in specified cell.
  13560. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13561. * @property {function} execute - performs an execute or undo operation.<br />
  13562. * The arguments of the execute method are as follows.<br />
  13563. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13564. * options {Object} The options of the operation.<br />
  13565. * options.sheetName {string} The sheet name.<br />
  13566. * options.sheetArea {GC.Spread.Sheets.SheetArea} The sheet area.<br />
  13567. * options.row {number} The rowIndex.<br />
  13568. * options.col {number} The columnIndex.<br />
  13569. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13570. */
  13571. var openColorPicker: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, row: number, col: number, sheetArea: GC.Spread.Sheets.SheetArea}, isUndo: boolean): any};
  13572. /**
  13573. * Represents the command used to open a datetime picker in specified cell.
  13574. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13575. * @property {function} execute - performs an execute or undo operation.<br />
  13576. * The arguments of the execute method are as follows.<br />
  13577. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13578. * options {Object} The options of the operation.<br />
  13579. * options.sheetName {string} The sheet name.<br />
  13580. * options.sheetArea {GC.Spread.Sheets.SheetArea} The sheet area.<br />
  13581. * options.row {number} The rowIndex.<br />
  13582. * options.col {number} The columnIndex.<br />
  13583. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13584. */
  13585. var openDateTimePicker: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, row: number, col: number, sheetArea: GC.Spread.Sheets.SheetArea}, isUndo: boolean): any};
  13586. /**
  13587. * Represents the command used to open a list picker in specified cell.
  13588. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13589. * @property {function} execute - performs an execute or undo operation.<br />
  13590. * The arguments of the execute method are as follows.<br />
  13591. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13592. * options {Object} The options of the operation.<br />
  13593. * options.sheetName {string} The sheet name.<br />
  13594. * options.sheetArea {GC.Spread.Sheets.SheetArea} The sheet area.<br />
  13595. * options.row {number} The rowIndex.<br />
  13596. * options.col {number} The columnIndex.<br />
  13597. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13598. */
  13599. var openList: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, row: number, col: number, sheetArea: GC.Spread.Sheets.SheetArea}, isUndo: boolean): any};
  13600. /**
  13601. * Represents the command used to open a month picker in specified cell.
  13602. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13603. * @property {function} execute - performs an execute or undo operation.<br />
  13604. * The arguments of the execute method are as follows.<br />
  13605. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13606. * options {Object} The options of the operation.<br />
  13607. * options.sheetName {string} The sheet name.<br />
  13608. * options.sheetArea {GC.Spread.Sheets.SheetArea} The sheet area.<br />
  13609. * options.row {number} The rowIndex.<br />
  13610. * options.col {number} The columnIndex.<br />
  13611. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13612. */
  13613. var openMonthPicker: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, row: number, col: number, sheetArea: GC.Spread.Sheets.SheetArea}, isUndo: boolean): any};
  13614. /**
  13615. * Represents the command used to open a slider picker in specified cell.
  13616. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13617. * @property {function} execute - performs an execute or undo operation.<br />
  13618. * The arguments of the execute method are as follows.<br />
  13619. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13620. * options {Object} The options of the operation.<br />
  13621. * options.sheetName {string} The sheet name.<br />
  13622. * options.sheetArea {GC.Spread.Sheets.SheetArea} The sheet area.<br />
  13623. * options.row {number} The rowIndex.<br />
  13624. * options.col {number} The columnIndex.<br />
  13625. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13626. */
  13627. var openSlider: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, row: number, col: number, sheetArea: GC.Spread.Sheets.SheetArea}, isUndo: boolean): any};
  13628. /**
  13629. * Represents the command used to open a time picker in specified cell.
  13630. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13631. * @property {function} execute - performs an execute or undo operation.<br />
  13632. * The arguments of the execute method are as follows.<br />
  13633. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13634. * options {Object} The options of the operation.<br />
  13635. * options.sheetName {string} The sheet name.<br />
  13636. * options.sheetArea {GC.Spread.Sheets.SheetArea} The sheet area.<br />
  13637. * options.row {number} The rowIndex.<br />
  13638. * options.col {number} The columnIndex.<br />
  13639. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13640. */
  13641. var openTimePicker: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, row: number, col: number, sheetArea: GC.Spread.Sheets.SheetArea}, isUndo: boolean): any};
  13642. /**
  13643. * Represents the command used to open the url of the hyperlink cell.
  13644. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13645. * @property {function} execute - performs an execute or undo operation.<br />
  13646. * The arguments of the execute method are as follows.<br />
  13647. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13648. * options {Object} The options of the operation.<br />
  13649. * options.sheetName {string} The sheet name.<br />
  13650. * options.url {string} The url string.<br />
  13651. * options.target {HyperlinkTargetType} The target type, it's default is blank.<br />
  13652. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13653. */
  13654. var openUrl: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: { sheetName: string, url: string, target?: GC.Spread.Sheets.Hyperlink.HyperlinkTargetType }, isUndo: boolean): any};
  13655. /**
  13656. * Represents the command used to open a workflow list picker in specified cell.
  13657. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13658. * @property {function} execute - performs an execute or undo operation.<br />
  13659. * The arguments of the execute method are as follows.<br />
  13660. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13661. * options {Object} The options of the operation.<br />
  13662. * options.sheetName {string} The sheet name.<br />
  13663. * options.sheetArea {GC.Spread.Sheets.SheetArea} The sheet area.<br />
  13664. * options.row {number} The rowIndex.<br />
  13665. * options.col {number} The columnIndex.<br />
  13666. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13667. */
  13668. var openWorkflowList: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, row: number, col: number, sheetArea: GC.Spread.Sheets.SheetArea}, isUndo: boolean): any};
  13669. /**
  13670. * Represents the command for grouping a column outline (range group) on a sheet.
  13671. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13672. * @property {function} execute - performs an execute or undo operation.<br />
  13673. * The arguments of the execute method are as follows.<br />
  13674. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13675. * options {Object} The options of the operation.<br />
  13676. * options.sheetName {string} The sheet name.<br />
  13677. * options.index {number} The outline starting index.<br />
  13678. * options.count {number} The number of rows or columns to group or ungroup in the outline.<br />
  13679. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13680. * @example
  13681. * //This example creates a group.
  13682. * spread.options.allowUndo = true;
  13683. * spread.commandManager().execute({cmd: "outlineColumn", sheetName: "Sheet1", index: 3, count: 5});
  13684. */
  13685. var outlineColumn: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, index: number, count: number}, isUndo: boolean): boolean};
  13686. /**
  13687. * Represents the command for grouping a row outline (range group) on a sheet.
  13688. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13689. * @property {function} execute - performs an execute or undo operation.<br />
  13690. * The arguments of the execute method are as follows.<br />
  13691. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13692. * options {Object} The options of the operation.<br />
  13693. * options.sheetName {string} The sheet name.<br />
  13694. * options.index {number} The outline starting index.<br />
  13695. * options.count {number} The number of rows or columns to group or ungroup in the outline.<br />
  13696. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13697. * @example
  13698. * //This example undoes an action.
  13699. * spread.options.allowUndo = true;
  13700. * spread.commandManager().execute({cmd: "outlineRow", sheetName: "Sheet1", index: 3, count: 5});
  13701. */
  13702. var outlineRow: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, index: number, count: number}, isUndo: boolean): boolean};
  13703. /**
  13704. * Represents the command used to paste the selected items from the Clipboard to the current sheet.
  13705. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13706. * @property {function} execute - performs an execute or undo operation.<br />
  13707. * The arguments of the execute method are as follows.<br />
  13708. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13709. * options {Object} The options of the operation.<br />
  13710. * options.sheetName {string} The sheet name.<br />
  13711. * options.shiftCells {GC.Spread.Sheets.InsertShiftCell} The inserted data needs to be moved in the direction.<br />
  13712. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13713. */
  13714. var paste: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, shiftCells?: GC.Spread.Sheets.InsertShiftCell}): any};
  13715. /**
  13716. * Represents the command for pasting the floating objects on the sheet.
  13717. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13718. * @property {function} execute - performs an execute or undo operation.<br />
  13719. * The arguments of the execute method are as follows.<br />
  13720. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13721. * options {Object} The options of the operation.<br />
  13722. * options.sheetName {string} The sheet name.<br />
  13723. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13724. */
  13725. var pasteFloatingObjects: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}, isUndo: boolean): boolean};
  13726. /**
  13727. * Represents the command used to perform a redo of the most recently undone edit or action.
  13728. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13729. * @property {function} execute - performs an execute or undo operation.<br />
  13730. * The arguments of the execute method are as follows.<br />
  13731. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13732. * options {Object} The options of the operation.<br />
  13733. * options.sheetName {string} The sheet name.<br />
  13734. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13735. * @example
  13736. * //This example uses the undo or redo action.
  13737. * $("#button1").click(function () {
  13738. * if(spread.undoManager().canUndo()){
  13739. * spread.undoManager().undo();
  13740. * }
  13741. * });
  13742. * $("#button2").click(function () {
  13743. * if(spread.undoManager().canRedo()){
  13744. * spread.undoManager().redo();
  13745. * }
  13746. * });
  13747. */
  13748. var redo: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13749. /**
  13750. * Represents the command for ungrouping a column outline (range group) on a sheet.
  13751. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13752. * @property {function} execute - performs an execute or undo operation.<br />
  13753. * The arguments of the execute method are as follows.<br />
  13754. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13755. * options {Object} The options of the operation.<br />
  13756. * options.sheetName {string} The sheet name.<br />
  13757. * options.index {number} The outline starting index.<br />
  13758. * options.count {number} The number of rows or columns to group or ungroup in the outline.<br />
  13759. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13760. */
  13761. var removeColumnOutline: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, index: number, count: number}, isUndo: boolean): boolean};
  13762. /**
  13763. * Represents the command for ungrouping a row outline (range group) on a sheet.
  13764. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13765. * @property {function} execute - performs an execute or undo operation.<br />
  13766. * The arguments of the execute method are as follows.<br />
  13767. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13768. * options {Object} The options of the operation.<br />
  13769. * options.sheetName {string} The sheet name.<br />
  13770. * options.index {number} The outline starting index.<br />
  13771. * options.count {number} The number of rows or columns to group or ungroup in the outline.<br />
  13772. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13773. */
  13774. var removeRowOutline: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, index: number, count: number}, isUndo: boolean): boolean};
  13775. /**
  13776. * Represents the command used to rename a worksheet.
  13777. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13778. * @property {function} execute - performs an execute or undo operation.<br />
  13779. * The arguments of the execute method are as follows.<br />
  13780. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13781. * options {Object} The options of the operation.<br />
  13782. * options.sheetName {string} The sheet name.<br />
  13783. * options.name {string} The sheet's new name.<br />
  13784. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13785. * @example
  13786. * //This example renames a sheet.
  13787. * spread.commandManager().execute({cmd: "renameSheet", sheetName: "Sheet1", name: "SheetName"});
  13788. */
  13789. var renameSheet: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, name: string}, isUndo: boolean): any};
  13790. /**
  13791. * Represents the command used to resize the column on a worksheet.
  13792. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13793. * @property {function} execute - performs an execute or undo operation.<br />
  13794. * The arguments of the execute method are as follows.<br />
  13795. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13796. * options {Object} The options of the operation.<br />
  13797. * options.sheetName {string} The sheet name.<br />
  13798. * options.columns {Array} The resize columns; each item is an object which has firstCol and lastCol.<br />
  13799. * options.size {number} The size of the column that is being resized.<br />
  13800. * options.rowHeader {boolean} Whether the column being resized is in the row header area.<br />
  13801. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13802. */
  13803. var resizeColumn: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, columns: Object[], size: number, rowHeader: boolean}, isUndo: boolean): any};
  13804. /**
  13805. * Represents the command for resizing floating objects.
  13806. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13807. * @property {function} execute - performs an execute or undo operation.<br />
  13808. * The arguments of the execute method are as follows.<br />
  13809. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13810. * options {Object} The options of the operation.<br />
  13811. * options.sheetName {string} The sheet name.<br />
  13812. * options.floatingObjects {Array} The names array of floating objects.<br />
  13813. * options.offsetX The offset left.<br />
  13814. * options.offsetY The offset top.<br />
  13815. * options.offsetWidth The offset width.<br />
  13816. * options.offsetHeight The offset height.
  13817. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13818. */
  13819. var resizeFloatingObjects: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, floatingObjects: string[], offsetX: number, offsetY: number, offsetWidth: number, offsetHeight: number}, isUndo: boolean): boolean};
  13820. /**
  13821. * Represents the command used to resize the row on a worksheet.
  13822. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13823. * @property {function} execute - performs an execute or undo operation.<br />
  13824. * The arguments of the execute method are as follows.<br />
  13825. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13826. * options {Object} The options of the operation.<br />
  13827. * options.sheetName {string} The sheet name.<br />
  13828. * options.rows {Array} The resize rows; each item is an object which has firstRow and lastRow.<br />
  13829. * options.size {number} The size of the row that is being resized.<br />
  13830. * options.columnHeader {boolean} Whether the row being resized is in the column header area.<br />
  13831. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13832. */
  13833. var resizeRow: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, rows: Object[], size: number, columnHeader: boolean}, isUndo: boolean): any};
  13834. /**
  13835. * Represents the command used to extend the selection to the last row.
  13836. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13837. * @property {function} execute - performs an execute or undo operation.<br />
  13838. * The arguments of the execute method are as follows.<br />
  13839. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13840. * options {Object} The options of the operation.<br />
  13841. * options.sheetName {string} The sheet name.<br />
  13842. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13843. * @example
  13844. * //This example uses the selectionBottom action.
  13845. * spread.commandManager().setShortcutKey('selectionBottom', GC.Spread.Commands.Key.a, false, false, false, false);
  13846. */
  13847. var selectionBottom: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13848. /**
  13849. * Represents the command used to extend the selection down one row.
  13850. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13851. * @property {function} execute - performs an execute or undo operation.<br />
  13852. * The arguments of the execute method are as follows.<br />
  13853. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13854. * options {Object} The options of the operation.<br />
  13855. * options.sheetName {string} The sheet name.<br />
  13856. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13857. * @example
  13858. * //This example uses the selectionDown action.
  13859. * spread.commandManager().setShortcutKey('selectionDown', GC.Spread.Commands.Key.a, false, false, false, false);
  13860. */
  13861. var selectionDown: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13862. /**
  13863. * Represents the command used to extend the selection to the last column.
  13864. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13865. * @property {function} execute - performs an execute or undo operation.<br />
  13866. * The arguments of the execute method are as follows.<br />
  13867. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13868. * options {Object} The options of the operation.<br />
  13869. * options.sheetName {string} The sheet name.<br />
  13870. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13871. * @example
  13872. * //This example uses the selectionEnd action.
  13873. * spread.focus();
  13874. * spread.commandManager().setShortcutKey('selectionEnd', GC.Spread.Commands.Key.a, false, false, false, false);
  13875. */
  13876. var selectionEnd: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13877. /**
  13878. * Represents the command used to extend the selection to the first cell.
  13879. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13880. * @property {function} execute - performs an execute or undo operation.<br />
  13881. * The arguments of the execute method are as follows.<br />
  13882. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13883. * options {Object} The options of the operation.<br />
  13884. * options.sheetName {string} The sheet name.<br />
  13885. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13886. * @example
  13887. * //This example uses the selectionFirst action.
  13888. * spread.focus();
  13889. * spread.commandManager().setShortcutKey('selectionFirst', GC.Spread.Commands.Key.a, false, false, false, false);
  13890. */
  13891. var selectionFirst: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13892. /**
  13893. * Represents the command used to extend the selection to the first column.
  13894. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13895. * @property {function} execute - performs an execute or undo operation.<br />
  13896. * The arguments of the execute method are as follows.<br />
  13897. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13898. * options {Object} The options of the operation.<br />
  13899. * options.sheetName {string} The sheet name.<br />
  13900. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13901. * @example
  13902. * //This example uses the selectionHome action.
  13903. * spread.focus();
  13904. * spread.commandManager().setShortcutKey('selectionHome', GC.Spread.Commands.Key.a, false, false, false, false);
  13905. */
  13906. var selectionHome: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13907. /**
  13908. * Represents the command used to extend the selection to the last cell.
  13909. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13910. * @property {function} execute - performs an execute or undo operation.<br />
  13911. * The arguments of the execute method are as follows.<br />
  13912. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13913. * options {Object} The options of the operation.<br />
  13914. * options.sheetName {string} The sheet name.<br />
  13915. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13916. * @example
  13917. * //This example uses the selectionLast action.
  13918. * spread.focus();
  13919. * spread.commandManager().setShortcutKey('selectionLast', GC.Spread.Commands.Key.a, false, false, false, false);
  13920. */
  13921. var selectionLast: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13922. /**
  13923. * Represents the command used to extend the selection one column to the left.
  13924. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13925. * @property {function} execute - performs an execute or undo operation.<br />
  13926. * The arguments of the execute method are as follows.<br />
  13927. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13928. * options {Object} The options of the operation.<br />
  13929. * options.sheetName {string} The sheet name.<br />
  13930. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13931. * @example
  13932. * //This example uses the selectionLeft action.
  13933. * spread.commandManager().setShortcutKey('selectionLeft', GC.Spread.Commands.Key.a, false, false, false, false);
  13934. */
  13935. var selectionLeft: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}, isUndo: boolean): any};
  13936. /**
  13937. * Represents the command used to extend the selection down to include one page of rows.
  13938. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13939. * @property {function} execute - performs an execute or undo operation.<br />
  13940. * The arguments of the execute method are as follows.<br />
  13941. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13942. * options {Object} The options of the operation.<br />
  13943. * options.sheetName {string} The sheet name.<br />
  13944. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13945. * @example
  13946. * //This example uses the selectionPageDown action.
  13947. * spread.commandManager().setShortcutKey('selectionPageDown', GC.Spread.Commands.Key.a, false, false, false, false);
  13948. */
  13949. var selectionPageDown: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13950. /**
  13951. * Represents the command used to extend the selection up to include one page of rows.
  13952. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13953. * @property {function} execute - performs an execute or undo operation.<br />
  13954. * The arguments of the execute method are as follows.<br />
  13955. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13956. * options {Object} The options of the operation.<br />
  13957. * options.sheetName {string} The sheet name.<br />
  13958. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13959. * @example
  13960. * //This example uses the selectionPageUp action.
  13961. * spread.commandManager().setShortcutKey('selectionPageUp', GC.Spread.Commands.Key.a, false, false, false, false);
  13962. */
  13963. var selectionPageUp: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13964. /**
  13965. * Represents the command used to extend the selection one column to the right.
  13966. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13967. * @property {function} execute - performs an execute or undo operation.<br />
  13968. * The arguments of the execute method are as follows.<br />
  13969. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13970. * options {Object} The options of the operation.<br />
  13971. * options.sheetName {string} The sheet name.<br />
  13972. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13973. * @example
  13974. * //This example uses the selectionRight action.
  13975. * spread.commandManager().setShortcutKey("selectionRight", GC.Spread.Commands.Key.a, false, false, false, false);
  13976. */
  13977. var selectionRight: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13978. /**
  13979. * Represents the command used to extend the selection to the first row.
  13980. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13981. * @property {function} execute - performs an execute or undo operation.<br />
  13982. * The arguments of the execute method are as follows.<br />
  13983. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13984. * options {Object} The options of the operation.<br />
  13985. * options.sheetName {string} The sheet name.<br />
  13986. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  13987. * @example
  13988. * //This example uses the selectionTop action.
  13989. * spread.commandManager().setShortcutKey("selectionTop", GC.Spread.Commands.Key.a, false, false, false, false);
  13990. */
  13991. var selectionTop: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  13992. /**
  13993. * Represents the command used to extend the selection up one row.
  13994. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  13995. * @property {function} execute - performs an execute or undo operation.<br />
  13996. * The arguments of the execute method are as follows.<br />
  13997. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  13998. * options {Object} The options of the operation.<br />
  13999. * options.sheetName {string} The sheet name.<br />
  14000. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  14001. * @example
  14002. * //This example uses the selectionUp action.
  14003. * spread.commandManager().setShortcutKey("selectionUp", GC.Spread.Commands.Key.a, false, false, false, false);
  14004. */
  14005. var selectionUp: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  14006. /**
  14007. * Represents the command used to select the next control.
  14008. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  14009. * @property {function} execute - performs an execute or undo operation.<br />
  14010. * The arguments of the execute method are as follows.<br />
  14011. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  14012. * options {Object} The options of the operation.<br />
  14013. * options.sheetName {string} The sheet name.<br />
  14014. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  14015. * @example
  14016. * //This example maps the selectNextControl action to the Tab key.
  14017. * spread.commandManager().setShortcutKey('selectNextControl', GC.Spread.Commands.Key.tab, false, false, false, false); // Tab key
  14018. * spread.commandManager().setShortcutKey('selectPreviousControl', GC.Spread.Commands.Key.tab, false, true, false, false); // Shift key and Tab key
  14019. */
  14020. var selectNextControl: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  14021. /**
  14022. * Represents the command used to select the previous control.
  14023. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  14024. * @property {function} execute - performs an execute or undo operation.<br />
  14025. * The arguments of the execute method are as follows.<br />
  14026. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  14027. * options {Object} The options of the operation.<br />
  14028. ** options.sheetName {string} The sheet name.<br />
  14029. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  14030. * @example
  14031. * //This example maps the selectPreviousControl action to the Shift + Tab key combination.
  14032. * spread.commandManager().setShortcutKey('selectNextControl', GC.Spread.Commands.Key.tab, false, false, false, false); // Tab key
  14033. * spread.commandManager().setShortcutKey('selectPreviousControl', GC.Spread.Commands.Key.tab, false, true, false, false); // Shift key and Tab key
  14034. */
  14035. var selectPreviousControl: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  14036. /**
  14037. * Represents the command used to split resize the column on a worksheet.
  14038. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  14039. * @property {function} execute - performs an execute or undo operation.<br />
  14040. * The arguments of the execute method are as follows.<br />
  14041. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  14042. * options {Object} The options of the operation.<br />
  14043. * options.sheetName {string} The sheet name.<br />
  14044. * options.columns {Array} The resize columns; each item is an object which has firstCol and lastCol.<br />
  14045. * options.size {number} The size of the column that is being resized.<br />
  14046. * options.rowHeader {boolean} Whether the column being resized is in the row header area.<br />
  14047. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  14048. */
  14049. var splitResizeColumn: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: { sheetName: string, columns: Object[], size: number, rowHeader: boolean }, isUndo: boolean): any};
  14050. /**
  14051. * Represents the command used to split resize the row on a worksheet.
  14052. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  14053. * @property {function} execute - performs an execute or undo operation.<br />
  14054. * The arguments of the execute method are as follows.<br />
  14055. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  14056. * options {Object} The options of the operation.<br />
  14057. * options.sheetName {string} The sheet name.<br />
  14058. * options.rows {Array} The resize rows; each item is an object which has firstRow and lastRow.<br />
  14059. * options.size {number} The size of the row that is being resized.<br />
  14060. * options.columnHeader {boolean} Whether the row being resized is in the column header area.<br />
  14061. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  14062. */
  14063. var splitResizeRow: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: { sheetName: string, rows: Object[], size: number, columnHeader: boolean }, isUndo: boolean): any};
  14064. /**
  14065. * Represents the command used to delete columns for table.
  14066. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  14067. * @property {function} execute - performs an execute or undo operation.<br />
  14068. * The arguments of the execute method are as follows.<br />
  14069. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  14070. * options {Object} The options of the operation.<br />
  14071. * options.sheetName {string} The sheet name.<br />
  14072. * options.tableName {string} The table name.<br />
  14073. * options.col {number} The index of the starting column to delete, the col index is based on table index.<br />
  14074. * options.count {number} The number of columns to delete.<br />
  14075. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  14076. */
  14077. var tableDeleteColumns: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, tableName: string, col: number, count: number}, isUndo: boolean): boolean};
  14078. /**
  14079. * Represents the command used to delete rows for table.
  14080. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  14081. * @property {function} execute - performs an execute or undo operation.<br />
  14082. * The arguments of the execute method are as follows.<br />
  14083. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  14084. * options {Object} The options of the operation.<br />
  14085. * options.sheetName {string} The sheet name.<br />
  14086. * options.tableName {string} The table name.<br />
  14087. * options.row {number} The index of the starting row to delete, the row index is based on table index.<br />
  14088. * options.count {number} The number of rows to delete.<br />
  14089. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  14090. */
  14091. var tableDeleteRows: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, tableName: string, row: number, count: number}, isUndo: boolean): boolean};
  14092. /**
  14093. * Represents the command used to insert columns for table.
  14094. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  14095. * @property {function} execute - performs an execute or undo operation.<br />
  14096. * The arguments of the execute method are as follows.<br />
  14097. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  14098. * options {Object} The options of the operation.<br />
  14099. * options.sheetName {string} The sheet name.<br />
  14100. * options.tableName {string} The table name.<br />
  14101. * options.col {number} The index of the starting column to insert, the col index is based on table index.<br />
  14102. * options.count {number} The number of columns to insert.<br />
  14103. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  14104. */
  14105. var tableInsertColumns: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, tableName: string, col: number, count: number}, isUndo: boolean): boolean};
  14106. /**
  14107. * Represents the command used to insert rows for table.
  14108. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  14109. * @property {function} execute - performs an execute or undo operation.<br />
  14110. * The arguments of the execute method are as follows.<br />
  14111. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  14112. * options {Object} The options of the operation.<br />
  14113. * options.sheetName {string} The sheet name.<br />
  14114. * options.tableName {string} The table name.<br />
  14115. * options.row {number} The index of the starting row to insert, the row index is based on table index.<br />
  14116. * options.count {number} The number of rows to insert.<br />
  14117. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  14118. */
  14119. var tableInsertRows: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, tableName: string, row: number, count: number}, isUndo: boolean): boolean};
  14120. /**
  14121. * Represents the command used to resize table.
  14122. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  14123. * @property {function} execute - performs an execute or undo operation.<br />
  14124. * The arguments of the execute method are as follows.<br />
  14125. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  14126. * options {Object} The options of the operation.<br />
  14127. * options.sheetName {string} The sheet name.<br />
  14128. * options.tableName {string} The table name.<br />
  14129. * options.resizeToRange {GC.Spread.Sheets.Range} The resized table range.<br />
  14130. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  14131. */
  14132. var tableResize: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, tableName: string, resizeToRange: GC.Spread.Sheets.Range}, isUndo: boolean): boolean};
  14133. /**
  14134. * Represents the command used to perform an undo of the most recent edit or action.
  14135. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  14136. * @property {function} execute - performs an execute or undo operation.<br />
  14137. * The arguments of the execute method are as follows.<br />
  14138. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  14139. * options {Object} The options of the operation.<br />
  14140. * options.sheetName {string} The sheet name.<br />
  14141. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  14142. * @example
  14143. * //This example uses the undo or redo action.
  14144. * $("#button1").click(function () {
  14145. * if(spread.undoManager().canUndo()){
  14146. * spread.undoManager().undo();
  14147. * }
  14148. * });
  14149. * $("#button2").click(function() {
  14150. * if(spread.undoManager().canRedo()){
  14151. * spread.undoManager().redo();
  14152. * }
  14153. * });
  14154. */
  14155. var undo: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string}): any};
  14156. /**
  14157. * Represents the command used to zoom the sheet.
  14158. * @property {boolean} canUndo - indicates whether the command supports undo and redo operations.
  14159. * @property {function} execute - performs an execute or undo operation.<br />
  14160. * The arguments of the execute method are as follows.<br />
  14161. * context {GC.Spread.Sheets.Workbook} The context of the operation.<br />
  14162. * options {Object} The options of the operation.<br />
  14163. * options.sheetName {string} The sheet name.<br />
  14164. * options.zoomFactor {number} The zoom factor.<br />
  14165. * isUndo {boolean} <c>true</c> if this is an undo operation; otherwise, <c>false</c>.
  14166. */
  14167. var zoom: { canUndo: boolean, execute(context: GC.Spread.Sheets.Workbook, options: {sheetName: string, zoomFactor: number}, isUndo: boolean): any};
  14168. /**
  14169. * Ends a transaction. During the transaction, the changes of the data model will be saved.
  14170. * @param {GC.Spread.Sheets.Workbook} context The context of the operation.
  14171. * @param {Object} options The options of the operation.<br />
  14172. * @param {string|Array<string>} [options.sheetName] The sheet name. If the current transaction need change multiple worksheets, the sheetName could be a string Array.
  14173. */
  14174. function endTransaction(context: GC.Spread.Sheets.Workbook, options: any): void;
  14175. /**
  14176. * Starts a transaction. During the transaction, the changes of the data model will be saved.
  14177. * @param {GC.Spread.Sheets.Workbook} context The context of the operation.
  14178. * @param {Object} options The options of the operation.
  14179. * @param {string|Array<string>} [options.sheetName] The sheet name. If the current transaction need change multiple worksheets, the sheetName could be a string Array.
  14180. */
  14181. function startTransaction(context: GC.Spread.Sheets.Workbook, options: any): void;
  14182. /**
  14183. * Undo the changes made in a transaction.
  14184. * @param {GC.Spread.Sheets.Workbook} context The context of the operation.
  14185. * @param {Object} options The options of the operation.<br />
  14186. * @param {string|Array<string>} [options.sheetName] The sheet name. If the current transaction need change multiple worksheets, the sheetName could be a string Array.
  14187. */
  14188. function undoTransaction(context: GC.Spread.Sheets.Workbook, options: any): void;
  14189. }
  14190. module Comments{
  14191. /**
  14192. * Defines the comment state.
  14193. * @enum {number}
  14194. * @example
  14195. * //This example gets the comment state.
  14196. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14197. * comment.text("new comment!");
  14198. * comment.backColor("yellow");
  14199. * comment.foreColor("green");
  14200. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14201. * activeSheet.getCell(5,5).comment(comment);
  14202. * alert(comment.commentState());
  14203. */
  14204. export enum CommentState{
  14205. /**
  14206. * Specifies that the comment is in an active state.
  14207. */
  14208. active= 1,
  14209. /**
  14210. *Specifies that the comment is in an editing state.
  14211. */
  14212. edit= 2,
  14213. /**
  14214. * Specifies that the comment is in a normal state.
  14215. */
  14216. normal= 3
  14217. }
  14218. /**
  14219. * Defines when the comment is displayed.
  14220. * @enum {number}
  14221. * @example
  14222. * //This example uses the DisplayMode enumeration.
  14223. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14224. * comment.text("new comment!");
  14225. * comment.backColor("yellow");
  14226. * comment.foreColor("green");
  14227. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14228. * activeSheet.getCell(5,5).comment(comment);
  14229. */
  14230. export enum DisplayMode{
  14231. /**
  14232. * Specifies that the comment is always displayed.
  14233. */
  14234. alwaysShown= 1,
  14235. /**
  14236. * Specifies that the comment is displayed only when the pointer hovers over the comment's owner cell.
  14237. */
  14238. hoverShown= 2
  14239. }
  14240. export class Comment{
  14241. /**
  14242. * Represents a comment.
  14243. * @class
  14244. * @param {string} [text] The text of the comment.
  14245. * @example
  14246. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14247. * comment.text("new comment!");
  14248. * comment.backColor("yellow");
  14249. * comment.foreColor("green");
  14250. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14251. * comment.autoSize(true);
  14252. * activeSheet.getCell(5,5).comment(comment);
  14253. */
  14254. constructor(text?: string);
  14255. /**
  14256. * Gets or sets whether the comment automatically sizes based on its content.
  14257. * @param {boolean} value Whether the comment automatically sizes.
  14258. * @returns {boolean | GC.Spread.Sheets.Comments.Comment} If no value is set, returns whether the comment automatically sizes; otherwise, returns the comment.
  14259. * @example
  14260. * //This example uses the autoSize method.
  14261. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14262. * comment.text("new comment!");
  14263. * comment.backColor("yellow");
  14264. * comment.foreColor("green");
  14265. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14266. * comment.autoSize(true);
  14267. * activeSheet.getCell(5,5).comment(comment);
  14268. */
  14269. autoSize(value?: boolean): any;
  14270. /**
  14271. * Gets or sets the background color of the comment.
  14272. * @param {string} value The background color of the comment.
  14273. * @returns {string | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the background color of the comment; otherwise, returns the comment.
  14274. * @example
  14275. * //This example sets the backColor method.
  14276. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14277. * comment.text("new comment!");
  14278. * comment.backColor("yellow");
  14279. * comment.foreColor("green");
  14280. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14281. * activeSheet.getCell(5,5).comment(comment);
  14282. */
  14283. backColor(value?: string): any;
  14284. /**
  14285. * Gets or sets the border color for the comment.
  14286. * @param {string} value The border color for the comment.
  14287. * @returns {string | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the border color for the comment; otherwise, returns the comment.
  14288. * @example
  14289. * //This example sets the borderColor method.
  14290. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14291. * comment.text("new comment!");
  14292. * comment.backColor("yellow");
  14293. * comment.foreColor("green");
  14294. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14295. * comment.borderWidth(2);
  14296. * comment.borderStyle("dotted");
  14297. * comment.borderColor("red");
  14298. * activeSheet.getCell(5,5).comment(comment);
  14299. * activeSheet.suspendPaint();
  14300. * activeSheet.resumePaint();
  14301. */
  14302. borderColor(value?: string): any;
  14303. /**
  14304. * Gets or sets the border style for the comment.
  14305. * @param {string} value The border style for the comment.
  14306. * @returns {string | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the border style for the comment; otherwise, returns the comment.
  14307. * @example
  14308. * //This example sets the borderStyle method.
  14309. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14310. * comment.text("new comment!");
  14311. * comment.backColor("yellow");
  14312. * comment.foreColor("green");
  14313. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14314. * comment.borderWidth(2);
  14315. * comment.borderStyle("dotted");
  14316. * comment.borderColor("red");
  14317. * activeSheet.getCell(5,5).comment(comment);
  14318. * activeSheet.suspendPaint();
  14319. * activeSheet.resumePaint();
  14320. */
  14321. borderStyle(value?: string): any;
  14322. /**
  14323. * Gets or sets the border width for the comment.
  14324. * @param {number} value The border width for the comment.
  14325. * @returns {number | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the border width for the comment; otherwise, returns the comment.
  14326. * @example
  14327. * //This example sets the borderWidth method.
  14328. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14329. * comment.text("new comment!");
  14330. * comment.backColor("yellow");
  14331. * comment.foreColor("green");
  14332. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14333. * comment.borderWidth(2);
  14334. * comment.borderStyle("dotted");
  14335. * comment.borderColor("red");
  14336. * activeSheet.getCell(5,5).comment(comment);
  14337. * activeSheet.suspendPaint();
  14338. * activeSheet.resumePaint();
  14339. */
  14340. borderWidth(value?: number): any;
  14341. /**
  14342. * Gets or sets the state of the comment.
  14343. * @param {GC.Spread.Sheets.Comments.CommentState} value The state of the comment.
  14344. * @returns {GC.Spread.Sheets.Comments.CommentState | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the state of the comment; otherwise, returns the comment.
  14345. * @example
  14346. * //This example gets the comment state.
  14347. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14348. * comment.text("new comment!");
  14349. * comment.backColor("yellow");
  14350. * comment.foreColor("green");
  14351. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14352. * activeSheet.getCell(5,5).comment(comment);
  14353. * alert(comment.commentState());
  14354. */
  14355. commentState(value?: GC.Spread.Sheets.Comments.CommentState): any;
  14356. /**
  14357. * Gets or sets the display mode for the comment.
  14358. * @param {GC.Spread.Sheets.Comments.DisplayMode} value The display mode for the comment.
  14359. * @returns {GC.Spread.Sheets.Comments.DisplayMode | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the display mode for the comment; otherwise, returns the comment.
  14360. * @example
  14361. * //This example sets the displayMode method.
  14362. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14363. * comment.text("new comment!");
  14364. * comment.backColor("yellow");
  14365. * comment.foreColor("green");
  14366. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14367. * activeSheet.getCell(5,5).comment(comment);
  14368. */
  14369. displayMode(value?: GC.Spread.Sheets.Comments.DisplayMode): any;
  14370. /**
  14371. * Gets or sets whether the comment dynamically moves.
  14372. * @param {boolean} value Whether the comment dynamically moves.
  14373. * @returns {boolean | GC.Spread.Sheets.Comments.Comment} If no value is set, returns whether the comment dynamically moves; otherwise, returns the comment.
  14374. * @example
  14375. * //This example uses the dynamicMove method.
  14376. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14377. * comment.text("new comment!");
  14378. * comment.backColor("yellow");
  14379. * comment.foreColor("green");
  14380. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14381. * comment.dynamicMove(true);
  14382. * comment.dynamicSize(true);
  14383. * activeSheet.getCell(5,5).comment(comment);
  14384. */
  14385. dynamicMove(value?: boolean): any;
  14386. /**
  14387. * Gets or sets whether the comment is dynamically sized.
  14388. * @param {boolean} value Whether the comment is dynamically sized.
  14389. * @returns {boolean | GC.Spread.Sheets.Comments.Comment} If no value is set, returns whether the comment is dynamically sized; otherwise, returns the comment.
  14390. * @example
  14391. * //This example uses the dynamicSize method.
  14392. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14393. * comment.text("new comment!");
  14394. * comment.backColor("yellow");
  14395. * comment.foreColor("green");
  14396. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14397. * comment.dynamicMove(true);
  14398. * comment.dynamicSize(true);
  14399. * activeSheet.getCell(5,5).comment(comment);
  14400. */
  14401. dynamicSize(value?: boolean): any;
  14402. /**
  14403. * Gets or sets the font family for the comment.
  14404. * @param {string} value The font family for the comment.
  14405. * @returns {string | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the font family for the comment; otherwise, returns the comment.
  14406. * @example
  14407. * //This example uses the fontFamily method.
  14408. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14409. * comment.text("new comment!");
  14410. * comment.backColor("yellow");
  14411. * comment.foreColor("green");
  14412. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14413. * comment.fontFamily("Comic Sans MS");
  14414. * comment.fontSize("10pt");
  14415. * activeSheet.getCell(5,5).comment(comment);
  14416. */
  14417. fontFamily(value?: string): any;
  14418. /**
  14419. * Gets or sets the font size for the comment. Valid value is numbers followed by "pt" (required), such as "12pt".
  14420. * @param {string} value The font size for the comment.
  14421. * @returns {string | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the font size for the comment; otherwise, returns the comment.
  14422. * @example
  14423. * //This example uses the fontSize method.
  14424. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14425. * comment.text("new comment!");
  14426. * comment.backColor("yellow");
  14427. * comment.foreColor("green");
  14428. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14429. * comment.fontFamily("Comic Sans MS");
  14430. * comment.fontSize("10pt");
  14431. * activeSheet.getCell(5,5).comment(comment);
  14432. */
  14433. fontSize(value?: string): any;
  14434. /**
  14435. * Gets or sets the font style of the comment.
  14436. * @param {string} value The font style of the comment.
  14437. * @returns {string | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the font style of the comment; otherwise, returns the comment.
  14438. * @example
  14439. * //This example uses the fontStyle method.
  14440. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14441. * comment.text("new comment!");
  14442. * comment.backColor("yellow");
  14443. * comment.foreColor("green");
  14444. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14445. * comment.fontFamily("Comic Sans MS");
  14446. * comment.fontStyle("normal");
  14447. * comment.fontWeight("normal");
  14448. * activeSheet.getCell(5,5).comment(comment);
  14449. */
  14450. fontStyle(value?: string): any;
  14451. /**
  14452. * Gets or sets the font weight for the comment.
  14453. * @param {string} value The font weight for the comment.
  14454. * @returns {string | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the font weight for the comment; otherwise, returns the comment.
  14455. * @example
  14456. * //This example uses the fontWeight method.
  14457. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14458. * comment.text("new comment!");
  14459. * comment.backColor("yellow");
  14460. * comment.foreColor("green");
  14461. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14462. * comment.fontFamily("Comic Sans MS");
  14463. * comment.fontStyle("normal");
  14464. * comment.fontWeight("normal");
  14465. * activeSheet.getCell(5,5).comment(comment);
  14466. */
  14467. fontWeight(value?: string): any;
  14468. /**
  14469. * Gets or sets the text color for the comment.
  14470. * @param {string} value The text color for the comment.
  14471. * @returns {string | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the text color for the comment; otherwise, returns the comment.
  14472. * @example
  14473. * //This example sets the foreColor method.
  14474. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14475. * comment.text("new comment!");
  14476. * comment.backColor("yellow");
  14477. * comment.foreColor("green");
  14478. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14479. * activeSheet.getCell(5,5).comment(comment);
  14480. */
  14481. foreColor(value?: string): any;
  14482. /**
  14483. * Gets or sets the height of the comment.
  14484. * @param {number} value The height of the comment.
  14485. * @returns {number | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the height of the comment; otherwise, returns the comment.
  14486. * @example
  14487. * //This example sets the height method.
  14488. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14489. * comment.text("new comment!");
  14490. * comment.backColor("yellow");
  14491. * comment.foreColor("green");
  14492. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14493. * comment.height(50);
  14494. * comment.width(90);
  14495. * activeSheet.getCell(5,5).comment(comment);
  14496. * activeSheet.suspendPaint();
  14497. * activeSheet.resumePaint();
  14498. */
  14499. height(value?: number): any;
  14500. /**
  14501. * Gets or sets the horizontal alignment of the comment.
  14502. * @param {GC.Spread.Sheets.HorizontalAlign} value The horizontal alignment of the comment.
  14503. * @returns {GC.Spread.Sheets.HorizontalAlign | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the horizontal alignment of the comment; otherwise, returns the comment.
  14504. * @example
  14505. * //This example uses the horizontalAlign method.
  14506. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14507. * comment.text("new comment!");
  14508. * comment.backColor("yellow");
  14509. * comment.foreColor("green");
  14510. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14511. * comment.horizontalAlign(GC.Spread.Sheets.HorizontalAlign.center);
  14512. * activeSheet.getCell(5,5).comment(comment);
  14513. */
  14514. horizontalAlign(value?: GC.Spread.Sheets.HorizontalAlign): any;
  14515. /**
  14516. * Gets or sets the location of the comment.
  14517. * @param {GC.Spread.Sheets.Point} value The location of the comment.
  14518. * @returns {GC.Spread.Sheets.Point | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the location of the comment; otherwise, returns the comment.
  14519. * @example
  14520. * //This example uses the location method.
  14521. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14522. * comment.text("new comment!");
  14523. * comment.backColor("yellow");
  14524. * comment.foreColor("green");
  14525. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14526. * comment.location(new GC.Spread.Sheets.Point(10, 10));
  14527. * activeSheet.getCell(5,5).comment(comment);
  14528. */
  14529. location(value?: GC.Spread.Sheets.Point): any;
  14530. /**
  14531. * Gets or sets the locked setting for the comment.
  14532. * @param {boolean} value The locked setting for the comment.
  14533. * @returns {boolean | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the locked setting for the comment; otherwise, returns the comment.
  14534. * @example
  14535. * //This example uses the locked method.
  14536. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14537. * comment.text("new comment!");
  14538. * comment.backColor("yellow");
  14539. * comment.foreColor("green");
  14540. * comment.lockText(false);
  14541. * comment.locked(false);
  14542. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14543. * activeSheet.options.isProtected = true;
  14544. * activeSheet.getCell(5,5).comment(comment);
  14545. */
  14546. locked(value?: boolean): any;
  14547. /**
  14548. * Gets or sets the locked text for the comment.
  14549. * @param {boolean} value The locked text for the comment.
  14550. * @returns {boolean | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the locked text for the comment; otherwise, returns the comment.
  14551. * @example
  14552. * //This example uses the lockText method.
  14553. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14554. * comment.text("new comment!");
  14555. * comment.backColor("yellow");
  14556. * comment.foreColor("green");
  14557. * comment.lockText(false);
  14558. * comment.locked(false);
  14559. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14560. * activeSheet.options.isProtected = true;
  14561. * activeSheet.getCell(5,5).comment(comment);
  14562. */
  14563. lockText(value?: boolean): any;
  14564. /**
  14565. * Gets or sets the opacity of the comment.
  14566. * @param {number} value The opacity of the comment.
  14567. * @returns {number | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the opacity of the comment; otherwise, returns the comment.
  14568. * @example
  14569. * //This example sets the opacity.
  14570. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14571. * comment.text("new comment!");
  14572. * comment.backColor("yellow");
  14573. * comment.foreColor("green");
  14574. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14575. * comment.opacity(10);
  14576. * activeSheet.getCell(5,5).comment(comment);
  14577. */
  14578. opacity(value?: number): any;
  14579. /**
  14580. * Gets or sets the padding for the comment.
  14581. * @param {GC.Spread.Sheets.Comments.Padding} value The padding for the comment.
  14582. * @returns {GC.Spread.Sheets.Comments.Padding | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the padding for the comment; otherwise, returns the comment.
  14583. * @example
  14584. * //This example uses the padding method.
  14585. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14586. * comment.text("new comment!");
  14587. * comment.backColor("yellow");
  14588. * comment.foreColor("green");
  14589. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14590. * comment.padding(new GC.Spread.Sheets.Comments.Padding(2, 2, 2, 2));
  14591. * activeSheet.getCell(5,5).comment(comment);
  14592. */
  14593. padding(value?: GC.Spread.Sheets.Comments.Padding): any;
  14594. /**
  14595. * Gets or sets whether the comment displays a shadow.
  14596. * @param {boolean} value Whether the comment displays a shadow.
  14597. * @returns {boolean | GC.Spread.Sheets.Comments.Comment} If no value is set, returns whether the comment displays a shadow; otherwise, returns the comment.
  14598. * @example
  14599. * //This example uses the showShadow method.
  14600. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14601. * comment.text("new comment!");
  14602. * comment.backColor("yellow");
  14603. * comment.foreColor("green");
  14604. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14605. * comment.borderWidth(2);
  14606. * comment.borderStyle("dotted");
  14607. * comment.borderColor("red");
  14608. * comment.showShadow(true);
  14609. * activeSheet.getCell(5,5).comment(comment);
  14610. * activeSheet.suspendPaint();
  14611. * activeSheet.resumePaint();
  14612. */
  14613. showShadow(value?: boolean): any;
  14614. /**
  14615. * Gets or sets the text of the comment.
  14616. * @param {string} value The text of the comment.
  14617. * @returns {string | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the text of the comment; otherwise, returns the comment.
  14618. * @example
  14619. * //This example sets the text method.
  14620. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14621. * comment.text("new comment!");
  14622. * comment.backColor("yellow");
  14623. * comment.foreColor("green");
  14624. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14625. * activeSheet.getCell(5,5).comment(comment);
  14626. */
  14627. text(value?: string): any;
  14628. /**
  14629. * Gets or sets the text decoration for the comment.
  14630. * @param {GC.Spread.Sheets.TextDecorationType} value The text decoration for the comment.
  14631. * @returns {GC.Spread.Sheets.TextDecorationType | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the text decoration for the comment; otherwise, returns the comment.
  14632. * @example
  14633. * //This example uses the textDecoration method.
  14634. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14635. * comment.text("new comment!");
  14636. * comment.backColor("yellow");
  14637. * comment.foreColor("green");
  14638. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14639. * comment.textDecoration(GC.Spread.Sheets.TextDecorationType.underline);
  14640. * activeSheet.getCell(5,5).comment(comment);
  14641. * activeSheet.suspendPaint();
  14642. * activeSheet.resumePaint();
  14643. */
  14644. textDecoration(value?: GC.Spread.Sheets.TextDecorationType): any;
  14645. /**
  14646. * Gets or sets the width of the comment.
  14647. * @param {number} value The width of the comment.
  14648. * @returns {number | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the width of the comment; otherwise, returns the comment.
  14649. * @example
  14650. * //This example sets the width method.
  14651. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14652. * comment.text("new comment!");
  14653. * comment.backColor("yellow");
  14654. * comment.foreColor("green");
  14655. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14656. * comment.height(50);
  14657. * comment.width(90);
  14658. * activeSheet.getCell(5,5).comment(comment);
  14659. * activeSheet.suspendPaint();
  14660. * activeSheet.resumePaint();
  14661. */
  14662. width(value?: number): any;
  14663. /**
  14664. * Gets or sets the z-index of the comment.
  14665. * @param {number} value The z-index of the comment.
  14666. * @returns {number | GC.Spread.Sheets.Comments.Comment} If no value is set, returns the z-index of the comment; otherwise, returns the comment.
  14667. * @example
  14668. * //This example gets the index.
  14669. * var comment = new GC.Spread.Sheets.Comments.Comment();
  14670. * comment.text("new comment!");
  14671. * comment.backColor("yellow");
  14672. * comment.foreColor("green");
  14673. * comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
  14674. * activeSheet.getCell(5,5).comment(comment);
  14675. * alert(comment.zIndex());
  14676. */
  14677. zIndex(value?: number): any;
  14678. }
  14679. export class CommentManager{
  14680. /**
  14681. * Represents a comment manager that can manage all comments in a sheet.
  14682. * @class
  14683. * @param {GC.Spread.Sheets.Worksheet} sheet The worksheet.
  14684. */
  14685. constructor(sheet: GC.Spread.Sheets.Worksheet);
  14686. /**
  14687. * Adds a comment to the cell for the indicated row and column.
  14688. * @param {number} row The row index of the cell.
  14689. * @param {number} col The column index of the cell.
  14690. * @param {string} text The text of the comment.
  14691. * @returns {GC.Spread.Sheets.Comments.Comment} The comment that has been added to the cell.
  14692. */
  14693. add(row: number, col: number, text: string): GC.Spread.Sheets.Comments.Comment;
  14694. /**
  14695. * Gets all comments in the sheet.
  14696. * @returns {Array.<GC.Spread.Sheets.Comments.Comment>}
  14697. */
  14698. all(): GC.Spread.Sheets.Comments.Comment[];
  14699. /**
  14700. * Clears all of the comments in the indicated range on the sheet. When the range is not specified, it clears all the comments in the sheet.
  14701. * @param {GC.Spread.Sheets.Range} range The range that you want clear all comments from.
  14702. */
  14703. clear(range: GC.Spread.Sheets.Range): void;
  14704. /**
  14705. * Gets the comment in the cell with the indicated row and column.
  14706. * @param {number} row The row index of the cell.
  14707. * @param {number} col The column index of the cell.
  14708. * @returns {GC.Spread.Sheets.Comments.Comment} The comment in the indicated cell.
  14709. */
  14710. get(row: number, col: number): GC.Spread.Sheets.Comments.Comment;
  14711. /**
  14712. *Removes the comment from the cell for the indicated row and column.
  14713. * @param {number} row The row index of the cell.
  14714. * @param {number} col The column index of the cell.
  14715. */
  14716. remove(row: number, col: number): void;
  14717. }
  14718. export class Padding{
  14719. /**
  14720. * Represents the padding information.
  14721. * @class
  14722. * @param {number} top The top padding.
  14723. * @param {number} right The right padding.
  14724. * @param {number} bottom The bottom padding.
  14725. * @param {number} left The left padding.
  14726. */
  14727. constructor(top?: number, right?: number, bottom?: number, left?: number);
  14728. }
  14729. }
  14730. module ConditionalFormatting{
  14731. export interface IIconInfo{
  14732. iconSetType:GC.Spread.Sheets.ConditionalFormatting.IconSetType;
  14733. iconIndex:number;
  14734. }
  14735. /**
  14736. * Specifies the average condition type.
  14737. * @enum {number}
  14738. * @example
  14739. * //This example creates an average rule.
  14740. * activeSheet.setValue(0,0, 1,3);
  14741. * activeSheet.setValue(1,0, 50,3);
  14742. * activeSheet.setValue(2,0, 100,3);
  14743. * activeSheet.setValue(3,0, 2,3);
  14744. * activeSheet.setValue(4,0, 60,3);
  14745. * activeSheet.setValue(5,0, 90,3);
  14746. * activeSheet.setValue(6,0, 3,3);
  14747. * activeSheet.setValue(7,0, 40,3);
  14748. * activeSheet.setValue(8,0, 70,3);
  14749. * activeSheet.setValue(9,0, 5,3);
  14750. * activeSheet.setValue(10,0, 35,3);
  14751. * var style = new GC.Spread.Sheets.Style();
  14752. * style.backColor = "red";
  14753. * style.borderLeft =new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  14754. * style.borderTop = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  14755. * style.borderRight = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  14756. * style.borderBottom = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  14757. * var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  14758. * rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.averageRule);
  14759. * rule.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 3)]);
  14760. * rule.style(style);
  14761. * rule.type(GC.Spread.Sheets.ConditionalFormatting.AverageConditionType.above);
  14762. * activeSheet.conditionalFormats.addRule(rule);
  14763. */
  14764. export enum AverageConditionType{
  14765. /** Specifies the above average condition.
  14766. * @type {number}
  14767. */
  14768. above= 0,
  14769. /** Specifies the below average condition.
  14770. * @type {number}
  14771. */
  14772. below= 1,
  14773. /** Specifies the above average or equal average condition.
  14774. * @type {number}
  14775. */
  14776. equalOrAbove= 2,
  14777. /** Specifies the below average or equal average condition.
  14778. * @type {number}
  14779. */
  14780. equalOrBelow= 3,
  14781. /** Specifies the above standard deviation condition.
  14782. * @type {number}
  14783. */
  14784. above1StdDev= 4,
  14785. /** Specifies the below standard deviation condition.
  14786. * @type {number}
  14787. */
  14788. below1StdDev= 5,
  14789. /** Specifies above the two standard deviation condition.
  14790. * @type {number}
  14791. */
  14792. above2StdDev= 6,
  14793. /** Specifies below the two standard deviation condition.
  14794. * @type {number}
  14795. */
  14796. below2StdDev= 7,
  14797. /** Specifies above the three standard deviation condition.
  14798. * @type {number}
  14799. */
  14800. above3StdDev= 8,
  14801. /** Specifies below the three standard deviation condition.
  14802. * @type {number}
  14803. */
  14804. below3StdDev= 9
  14805. }
  14806. /**
  14807. * Specifies the data bar direction.
  14808. * @enum {number}
  14809. * @example
  14810. * //This example creates a data bar rule.
  14811. * activeSheet.setValue(0,0,1,3);
  14812. * activeSheet.setValue(1,0,15,3);
  14813. * activeSheet.setValue(2,0,25,3);
  14814. * activeSheet.setValue(3,0,-1,3);
  14815. * var dataBarRule = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule();
  14816. * dataBarRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  14817. * dataBarRule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  14818. * dataBarRule.minValue(-1);
  14819. * dataBarRule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  14820. * dataBarRule.maxValue(40);
  14821. * dataBarRule.color("green");
  14822. * dataBarRule.showBorder(true);
  14823. * dataBarRule.borderColor("orange");
  14824. * dataBarRule.dataBarDirection(GC.Spread.Sheets.ConditionalFormatting.BarDirection.leftToRight);
  14825. * dataBarRule.negativeFillColor("yellow");
  14826. * dataBarRule.useNegativeFillColor(true);
  14827. * dataBarRule.negativeBorderColor("red");
  14828. * dataBarRule.useNegativeBorderColor(true);
  14829. * dataBarRule.axisPosition(GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition.automatic);
  14830. * dataBarRule.axisColor("blue");
  14831. * dataBarRule.showBarOnly(false);
  14832. * activeSheet.conditionalFormats.addRule(dataBarRule);
  14833. */
  14834. export enum BarDirection{
  14835. /** Specifies whether to display the data bar from left to right.
  14836. * @type {number}
  14837. */
  14838. leftToRight= 0,
  14839. /** Specifies whether to display the data bar from right to left.
  14840. * @type {number}
  14841. */
  14842. rightToLeft= 1
  14843. }
  14844. /**
  14845. * Specifies the color compare type.
  14846. * @enum {number}
  14847. * @example
  14848. * //This example filters using colors.
  14849. * activeSheet.suspendPaint();
  14850. * var rowFilter = new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(-1, 0, -1, 1));
  14851. * activeSheet.rowFilter(rowFilter);
  14852. * activeSheet.getCell(0, 0).value("A1").backColor("blue");
  14853. * activeSheet.getCell(1, 0).value("A2").backColor("yellow");
  14854. * activeSheet.getCell(2, 0).value("A3").backColor("red");
  14855. * activeSheet.getCell(3, 0).value("A4").backColor("green");
  14856. * activeSheet.getCell(4, 0).value("A5").backColor("yellow");
  14857. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.colorCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.ColorCompareType.backgroundColor, expected: "yellow"});
  14858. * var filter = activeSheet.rowFilter();
  14859. * filter.addFilterItem(0, nCondition);
  14860. * filter.filter(0);
  14861. * activeSheet.resumePaint();
  14862. */
  14863. export enum ColorCompareType{
  14864. /** Indicates whether the cell background color is equal to a specified color.
  14865. * @type {number}
  14866. */
  14867. backgroundColor= 0,
  14868. /** Indicates whether the cell foreground color is equal to a specified color.
  14869. * @type {number}
  14870. */
  14871. foregroundColor= 1
  14872. }
  14873. /**
  14874. * Specifies the comparison operator.
  14875. * @enum {number}
  14876. * @example
  14877. * spread.options.highlightInvalidData = true;
  14878. * var dv = GC.Spread.Sheets.DataValidation.createDateValidator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between, new Date(2012, 11, 31), new Date(2013, 11, 31));
  14879. * dv.showInputMessage(true);
  14880. * dv.inputMessage("Enter a date between 12/31/2012 and 12/31/2013.");
  14881. * dv.inputTitle("Tip");
  14882. * activeSheet.getCell(1, -1).validator(dv);
  14883. */
  14884. export enum ComparisonOperators{
  14885. /** Determines whether a cell value is equal to the parameter value.
  14886. * @type {number}
  14887. */
  14888. equalsTo= 0,
  14889. /** Determines whether a cell value is not equal to the parameter value.
  14890. * @type {number}
  14891. */
  14892. notEqualsTo= 1,
  14893. /** Determines whether a cell value is greater than the parameter value.
  14894. * @type {number}
  14895. */
  14896. greaterThan= 2,
  14897. /** Determines whether a cell value is greater than or equal to the parameter value.
  14898. * @type {number}
  14899. */
  14900. greaterThanOrEqualsTo= 3,
  14901. /** Determines whether a cell value is less than the parameter value.
  14902. * @type {number}
  14903. */
  14904. lessThan= 4,
  14905. /** Determines whether a cell value is less than or equal to the parameter value.
  14906. * @type {number}
  14907. */
  14908. lessThanOrEqualsTo= 5,
  14909. /** Determines whether a cell value is between the two parameter values.
  14910. * @type {number}
  14911. */
  14912. between= 6,
  14913. /** Determines whether a cell value is not between the two parameter values.
  14914. * @type {number}
  14915. */
  14916. notBetween= 7
  14917. }
  14918. /**
  14919. * Specifies the condition type.
  14920. * @enum {number}
  14921. */
  14922. export enum ConditionType{
  14923. /** Specifies the relation condition.
  14924. * @type {number}
  14925. */
  14926. relationCondition= 0,
  14927. /** Specifies the number condition.
  14928. * @type {number}
  14929. */
  14930. numberCondition= 1,
  14931. /** Specifies the text condition.
  14932. * @type {number}
  14933. */
  14934. textCondition= 2,
  14935. /** Specifies the color condition.
  14936. * @type {number}
  14937. */
  14938. colorCondition= 3,
  14939. /** Specifies the formula condition.
  14940. * @type {number}
  14941. */
  14942. formulaCondition= 4,
  14943. /** Specifies the date condition.
  14944. * @type {number}
  14945. */
  14946. dateCondition= 5,
  14947. /** Specifies the dateex condition.
  14948. * @type {number}
  14949. */
  14950. dateExCondition= 6,
  14951. /** Specifies the text length condition.
  14952. * @type {number}
  14953. */
  14954. textLengthCondition= 7,
  14955. /** Specifies the top 10 condition.
  14956. * @type {number}
  14957. */
  14958. top10Condition= 8,
  14959. /** Specifies the unique condition.
  14960. * @type {number}
  14961. */
  14962. uniqueCondition= 9,
  14963. /** Specifies the average condition.
  14964. * @type {number}
  14965. */
  14966. averageCondition= 10,
  14967. /** Specifies the cell value condition.
  14968. * @type {number}
  14969. */
  14970. cellValueCondition= 11,
  14971. /** Specifies the area condition.
  14972. * @type {number}
  14973. */
  14974. areaCondition= 12
  14975. }
  14976. /**
  14977. * Specifies the custom value type.
  14978. * @enum {number}
  14979. * @example
  14980. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.formulaCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.CustomValueType.nonEmpty});
  14981. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  14982. * validator.ignoreBlank(false);
  14983. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  14984. * spread.options.highlightInvalidData = true;
  14985. */
  14986. export enum CustomValueType{
  14987. /** Indicates whether the cell value is empty or null.
  14988. * @type {number}
  14989. */
  14990. empty= 0,
  14991. /** Indicates whether the cell value is not empty or null.
  14992. * @type {number}
  14993. */
  14994. nonEmpty= 1,
  14995. /** Indicates whether the cell value contains a calculation error.
  14996. * @type {number}
  14997. */
  14998. error= 2,
  14999. /** Indicates whether the cell value does not contain a calculation error.
  15000. * @type {number}
  15001. */
  15002. nonError= 3,
  15003. /** Indicates whether the cell value is a formula.
  15004. * @type {number}
  15005. */
  15006. formula= 4
  15007. }
  15008. /**
  15009. * Specifies the position of the data bar's axis.
  15010. * @enum {number}
  15011. * @example
  15012. * //This example creates a data bar rule.
  15013. * activeSheet.setValue(0,0,1,3);
  15014. * activeSheet.setValue(1,0,15,3);
  15015. * activeSheet.setValue(2,0,25,3);
  15016. * activeSheet.setValue(3,0,-1,3);
  15017. * var dataBarRule = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule();
  15018. * dataBarRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  15019. * dataBarRule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  15020. * dataBarRule.minValue(-1);
  15021. * dataBarRule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  15022. * dataBarRule.maxValue(40);
  15023. * dataBarRule.color("green");
  15024. * dataBarRule.showBorder(true);
  15025. * dataBarRule.borderColor("orange");
  15026. * dataBarRule.dataBarDirection(GC.Spread.Sheets.ConditionalFormatting.BarDirection.leftToRight);
  15027. * dataBarRule.negativeFillColor("yellow");
  15028. * dataBarRule.useNegativeFillColor(true);
  15029. * dataBarRule.negativeBorderColor("red");
  15030. * dataBarRule.useNegativeBorderColor(true);
  15031. * dataBarRule.axisPosition(GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition.automatic);
  15032. * dataBarRule.axisColor("blue");
  15033. * dataBarRule.showBarOnly(false);
  15034. * activeSheet.conditionalFormats.addRule(dataBarRule);
  15035. */
  15036. export enum DataBarAxisPosition{
  15037. /** Specifies whether to display at a variable position based on negative values.
  15038. * @type {number}
  15039. */
  15040. automatic= 0,
  15041. /** Specifies whether to display at the cell midpoint.
  15042. * @type {number}
  15043. */
  15044. cellMidPoint= 1,
  15045. /** Specifies whether to display value bars in the same direction as positive values.
  15046. * @type {number}
  15047. */
  15048. none= 2
  15049. }
  15050. /**
  15051. * Specifies the date compare type.
  15052. * @enum {number}
  15053. * @example
  15054. * //This example validates cell data.
  15055. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.dateCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.DateCompareType.before, expected: new Date(2012, 11, 31)});
  15056. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  15057. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  15058. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  15059. * spread.options.highlightInvalidData = true;
  15060. * activeSheet.setValue(0, 0, new Date(2012, 12, 12));
  15061. */
  15062. export enum DateCompareType{
  15063. /** Indicates whether the date time is equal to a certain time.
  15064. * @type {number}
  15065. */
  15066. equalsTo= 0,
  15067. /** Indicates whether the date time is not equal to a certain time.
  15068. * @type {number}
  15069. */
  15070. notEqualsTo= 1,
  15071. /** Indicates whether the date time is before a certain time.
  15072. * @type {number}
  15073. */
  15074. before= 2,
  15075. /** Indicates whether the date time is before or equal to a certain time.
  15076. * @type {number}
  15077. */
  15078. beforeEqualsTo= 3,
  15079. /** Indicates whether the date time is after a certain time.
  15080. * @type {number}
  15081. */
  15082. after= 4,
  15083. /** Indicates whether the date time is after or equal to a certain time.
  15084. * @type {number}
  15085. */
  15086. afterEqualsTo= 5
  15087. }
  15088. /**
  15089. * Specifies the date occurring type.
  15090. * @enum {number}
  15091. * @example
  15092. * //This example creates a rule.
  15093. * var style = new GC.Spread.Sheets.Style();
  15094. * style.backColor = "red";
  15095. * var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule(GC.Spread.Sheets.ConditionalFormatting.RuleType.dateOccurringRule, [new GC.Spread.Sheets.Range(0,0,10,1)], style, null, null, null, null, null, GC.Spread.Sheets.ConditionalFormatting.DateOccurringType.nextWeek);
  15096. * activeSheet.conditionalFormats.addRule(rule);
  15097. * var d = new Date();
  15098. * activeSheet.setValue(0, 0, d);
  15099. * activeSheet.setValue(1, 0, new Date(d.setDate(d.getDate()+1)));
  15100. * activeSheet.setValue(2, 0, new Date(d.setDate(d.getDate()+5)));
  15101. * activeSheet.setValue(3, 0,new Date(d.setDate(d.getDate()+6)));
  15102. * activeSheet.setValue(4, 0,new Date(d.setDate(d.getDate()+7)));
  15103. * activeSheet.setValue(5, 0, new Date(d.setDate(d.getDate()+8)));
  15104. */
  15105. export enum DateOccurringType{
  15106. /** Specifies today.
  15107. * @type {number}
  15108. */
  15109. today= 0,
  15110. /** Specifies yesterday.
  15111. * @type {number}
  15112. */
  15113. yesterday= 1,
  15114. /** Specifies tomorrow.
  15115. * @type {number}
  15116. */
  15117. tomorrow= 2,
  15118. /** Specifies the last seven days.
  15119. * @type {number}
  15120. */
  15121. last7Days= 3,
  15122. /** Specifies this month.
  15123. * @type {number}
  15124. */
  15125. thisMonth= 4,
  15126. /** Specifies last month.
  15127. * @type {number}
  15128. */
  15129. lastMonth= 5,
  15130. /** Specifies next month.
  15131. * @type {number}
  15132. */
  15133. nextMonth= 6,
  15134. /** Specifies this week.
  15135. * @type {number}
  15136. */
  15137. thisWeek= 7,
  15138. /** Specifies last week.
  15139. * @type {number}
  15140. */
  15141. lastWeek= 8,
  15142. /** Specifies next week.
  15143. * @type {number}
  15144. */
  15145. nextWeek= 9,
  15146. /** Specifies next Quarter.
  15147. * @type {number}
  15148. */
  15149. nextQuarter= 10,
  15150. /** Specifies this Quarter.
  15151. * @type {number}
  15152. */
  15153. thisQuarter= 11,
  15154. /** Specifies last Quarter.
  15155. * @type {number}
  15156. */
  15157. lastQuarter= 12,
  15158. /** Specifies next Year.
  15159. * @type {number}
  15160. */
  15161. nextYear= 13,
  15162. /** Specifies this Year.
  15163. * @type {number}
  15164. */
  15165. thisYear= 14,
  15166. /** Specifies last Year.
  15167. * @type {number}
  15168. */
  15169. lastYear= 15
  15170. }
  15171. /**
  15172. * Specifies the general operator.
  15173. * @enum {number}
  15174. * @example
  15175. * //This example validates a cell value.
  15176. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.cellValueCondition);
  15177. * nCondition.compareType(GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators.equalsTo);
  15178. * nCondition.expected(0);
  15179. * //When the option is false, the validation fails and the red alert is displayed.
  15180. * //When the option is true, the blank cell is treated as zero and the validation is successful.
  15181. * nCondition.treatNullValueAsZero(false);
  15182. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  15183. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  15184. * validator.ignoreBlank(false);
  15185. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  15186. * spread.options.highlightInvalidData = true;
  15187. * activeSheet.setValue(0, 0, null);
  15188. * alert(validator.value2());
  15189. */
  15190. export enum GeneralComparisonOperators{
  15191. /** Indicates whether the number is equal to a specified number.
  15192. * @type {number}
  15193. */
  15194. equalsTo= 0,
  15195. /** Indicates whether the number is not equal to a specified number.
  15196. * @type {number}
  15197. */
  15198. notEqualsTo= 1,
  15199. /** Indicates whether the number is greater than a specified number.
  15200. * @type {number}
  15201. */
  15202. greaterThan= 2,
  15203. /** Indicates whether the number is greater than or equal to a specified number.
  15204. * @type {number}
  15205. */
  15206. greaterThanOrEqualsTo= 3,
  15207. /** Indicates whether the number is less than a specified number.
  15208. * @type {number}
  15209. */
  15210. lessThan= 4,
  15211. /** Indicates whether the number is less than or equal to a specified number.
  15212. * @type {number}
  15213. */
  15214. lessThanOrEqualsTo= 5
  15215. }
  15216. /**
  15217. * Specifies the icon set.
  15218. * @enum {number}
  15219. * @example
  15220. * //This example creates a rule.
  15221. * activeSheet.setValue(0,0,1,3);
  15222. * activeSheet.setValue(1,0,15,3);
  15223. * activeSheet.setValue(2,0,25,3);
  15224. * activeSheet.setValue(3,0,-1,3);
  15225. * var iconSetRule = new GC.Spread.Sheets.ConditionalFormatting.IconSetRule();
  15226. * iconSetRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  15227. * iconSetRule.iconSetType(GC.Spread.Sheets.ConditionalFormatting.IconSetType.fourTrafficLights);
  15228. * var iconCriteria = iconSetRule.iconCriteria();
  15229. * iconCriteria[0] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 1);
  15230. * iconCriteria[1] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 10);
  15231. * iconCriteria[2] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 20);
  15232. * iconSetRule.reverseIconOrder(false);
  15233. * iconSetRule.showIconOnly(false);
  15234. * activeSheet.conditionalFormats.addRule(iconSetRule);
  15235. */
  15236. export enum IconSetType{
  15237. /** Specifies three colored arrows.
  15238. * @type {number}
  15239. */
  15240. threeArrowsColored= 0,
  15241. /** Specifies three gray arrows.
  15242. * @type {number}
  15243. */
  15244. threeArrowsGray= 1,
  15245. /** Specifies three trangles.
  15246. * @type {number}
  15247. */
  15248. threeTriangles= 2,
  15249. /** Specifies three stars.
  15250. * @type {number}
  15251. */
  15252. threeStars= 3,
  15253. /** Specifies three flags.
  15254. * @type {number}
  15255. */
  15256. threeFlags= 4,
  15257. /** Specifies three traffic lights (unrimmed).
  15258. * @type {number}
  15259. */
  15260. threeTrafficLightsUnrimmed= 5,
  15261. /** Specifies three traffic lights (rimmed).
  15262. * @type {number}
  15263. */
  15264. threeTrafficLightsRimmed= 6,
  15265. /** Specifies three signs.
  15266. * @type {number}
  15267. */
  15268. threeSigns= 7,
  15269. /** Specifies three symbols (circled).
  15270. * @type {number}
  15271. */
  15272. threeSymbolsCircled= 8,
  15273. /** Specifies three symbols (uncircled).
  15274. * @type {number}
  15275. */
  15276. threeSymbolsUncircled= 9,
  15277. /** Specifies four colored arrows.
  15278. * @type {number}
  15279. */
  15280. fourArrowsColored= 10,
  15281. /** Specifies four gray arrows.
  15282. * @type {number}
  15283. */
  15284. fourArrowsGray= 11,
  15285. /** Specifies four red to black icons.
  15286. * @type {number}
  15287. */
  15288. fourRedToBlack= 12,
  15289. /** Specifies four ratings.
  15290. * @type {number}
  15291. */
  15292. fourRatings= 13,
  15293. /** Specifies four traffic lights.
  15294. * @type {number}
  15295. */
  15296. fourTrafficLights= 14,
  15297. /** Specifies five colored arrows.
  15298. * @type {number}
  15299. */
  15300. fiveArrowsColored= 15,
  15301. /** Specifies five gray arrows.
  15302. * @type {number}
  15303. */
  15304. fiveArrowsGray= 16,
  15305. /** Specifies five ratings.
  15306. * @type {number}
  15307. */
  15308. fiveRatings= 17,
  15309. /** Specifies five quarters.
  15310. * @type {number}
  15311. */
  15312. fiveQuarters= 18,
  15313. /** Specifies five boxes.
  15314. * @type {number}
  15315. */
  15316. fiveBoxes= 19,
  15317. /** Specifies no cell icon.
  15318. * @type {number}
  15319. */
  15320. noIcons= 20
  15321. }
  15322. /**
  15323. * Specifies the icon value type.
  15324. * @enum {number}
  15325. * @example
  15326. * //This example creates a rule.
  15327. * activeSheet.setValue(0,0,1,3);
  15328. * activeSheet.setValue(1,0,15,3);
  15329. * activeSheet.setValue(2,0,25,3);
  15330. * activeSheet.setValue(3,0,-1,3);
  15331. * var iconSetRule = new GC.Spread.Sheets.ConditionalFormatting.IconSetRule();
  15332. * iconSetRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  15333. * iconSetRule.iconSetType(GC.Spread.Sheets.ConditionalFormatting.IconSetType.fourTrafficLights);
  15334. * var iconCriteria = iconSetRule.iconCriteria();
  15335. * iconCriteria[0] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 1);
  15336. * iconCriteria[1] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 10);
  15337. * iconCriteria[2] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 20);
  15338. * iconSetRule.reverseIconOrder(false);
  15339. * iconSetRule.showIconOnly(false);
  15340. * activeSheet.conditionalFormats.addRule(iconSetRule);
  15341. */
  15342. export enum IconValueType{
  15343. /** Indicates whether to return a specified number directly.
  15344. * @type {number}
  15345. */
  15346. number= 1,
  15347. /** Indicates whether to return the percentage of a cell value in a specified cell range.
  15348. * @type {number}
  15349. */
  15350. percent= 4,
  15351. /** Indicates whether to return the result of a formula calculation.
  15352. * @type {number}
  15353. */
  15354. formula= 7,
  15355. /** Indicates whether to return the percentile of a cell value in a specified cell range.
  15356. * @type {number}
  15357. */
  15358. percentile= 5
  15359. }
  15360. /**
  15361. * Specifies the relation operator.
  15362. * @enum {number}
  15363. * @example
  15364. * //This example validates data.
  15365. * var condition1 = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.dateCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.DateCompareType.afterEqualsTo, expected: new Date(2012, 11, 31)});
  15366. * var condition2 = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.dateCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.DateCompareType.beforeEqualsTo, expected: new Date(2013, 11, 31)});
  15367. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.relationCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.LogicalOperators.and, item1: condition1, item2: condition2});
  15368. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  15369. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  15370. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  15371. * spread.options.highlightInvalidData = true;
  15372. * activeSheet.setValue(0, 0, new Date(2012, 11, 25));
  15373. */
  15374. export enum LogicalOperators{
  15375. /** Specifies the Or relation.
  15376. * @type {number}
  15377. */
  15378. or= 0,
  15379. /** Specifies the And relation.
  15380. * @type {number}
  15381. */
  15382. and= 1
  15383. }
  15384. /**
  15385. * Specifies the quarter type.
  15386. * @enum {number}
  15387. */
  15388. export enum QuarterType{
  15389. /** Indicates the first quarter of a year.
  15390. * @type {number}
  15391. */
  15392. quarter1= 0,
  15393. /** Indicates the second quarter of a year.
  15394. * @type {number}
  15395. */
  15396. quarter2= 1,
  15397. /** Indicates the third quarter of a year.
  15398. * @type {number}
  15399. */
  15400. quarter3= 2,
  15401. /** Indicates the fourth quarter of a year.
  15402. * @type {number}
  15403. */
  15404. quarter4= 3
  15405. }
  15406. /**
  15407. * Specifies the rule type.
  15408. * @enum {number}
  15409. */
  15410. export enum RuleType{
  15411. /** Specifies the base rule of the condition.
  15412. * @type {number}
  15413. */
  15414. conditionRuleBase= 0,
  15415. /** Specifies the cell value rule.
  15416. * @type {number}
  15417. */
  15418. cellValueRule= 1,
  15419. /** Specifies the specific text rule.
  15420. * @type {number}
  15421. */
  15422. specificTextRule= 2,
  15423. /** Specifies the formula rule.
  15424. * @type {number}
  15425. */
  15426. formulaRule= 3,
  15427. /** Specifies the date occurring rule.
  15428. * @type {number}
  15429. */
  15430. dateOccurringRule= 4,
  15431. /** Specifies the top 10 rule.
  15432. * @type {number}
  15433. */
  15434. top10Rule= 5,
  15435. /** Specifies the unique rule.
  15436. * @type {number}
  15437. */
  15438. uniqueRule= 6,
  15439. /** Specifies the duplicate rule.
  15440. * @type {number}
  15441. */
  15442. duplicateRule= 7,
  15443. /** Specifies the average rule.
  15444. * @type {number}
  15445. */
  15446. averageRule= 8,
  15447. /** Specifies the two scale rule.
  15448. * @type {number}
  15449. */
  15450. twoScaleRule= 10,
  15451. /** Specifies the three scale rule.
  15452. * @type {number}
  15453. */
  15454. threeScaleRule= 11,
  15455. /** Specifies the data bar rule.
  15456. * @type {number}
  15457. */
  15458. dataBarRule= 12,
  15459. /** Specifies the icon set rule.
  15460. * @type {number}
  15461. */
  15462. iconSetRule= 13
  15463. }
  15464. /**
  15465. * Specifies the scale value type.
  15466. * @enum {number}
  15467. * @example
  15468. * //This example creates a data bar rule.
  15469. * activeSheet.setValue(0,0,1,3);
  15470. * activeSheet.setValue(1,0,15,3);
  15471. * activeSheet.setValue(2,0,25,3);
  15472. * activeSheet.setValue(3,0,-1,3);
  15473. * var dataBarRule = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule();
  15474. * dataBarRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  15475. * dataBarRule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  15476. * dataBarRule.minValue(-1);
  15477. * dataBarRule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  15478. * dataBarRule.maxValue(40);
  15479. * dataBarRule.color("green");
  15480. * dataBarRule.showBorder(true);
  15481. * dataBarRule.borderColor("orange");
  15482. * dataBarRule.dataBarDirection(GC.Spread.Sheets.ConditionalFormatting.BarDirection.leftToRight);
  15483. * dataBarRule.negativeFillColor("yellow");
  15484. * dataBarRule.useNegativeFillColor(true);
  15485. * dataBarRule.negativeBorderColor("red");
  15486. * dataBarRule.useNegativeBorderColor(true);
  15487. * dataBarRule.axisPosition(GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition.automatic);
  15488. * dataBarRule.axisColor("blue");
  15489. * dataBarRule.showBarOnly(false);
  15490. * activeSheet.conditionalFormats.addRule(dataBarRule);
  15491. */
  15492. export enum ScaleValueType{
  15493. /** Indicates whether to return a specified number directly.
  15494. * @type {number}
  15495. */
  15496. number= 0,
  15497. /** Indicates whether to return the lowest value in a specified cell range.
  15498. * @type {number}
  15499. */
  15500. lowestValue= 1,
  15501. /** Indicates whether to return the highest value in a specified cell range.
  15502. * @type {number}
  15503. */
  15504. highestValue= 2,
  15505. /** Indicates whether to return the percentage of a cell value in a specified cell range.
  15506. * @type {number}
  15507. */
  15508. percent= 3,
  15509. /** Indicates whether to return the percentile of a cell value in a specified cell range.
  15510. * @type {number}
  15511. */
  15512. percentile= 4,
  15513. /** Indicates whether to return the automatic minimum value in a specified range.
  15514. * @type {number}
  15515. */
  15516. automin= 5,
  15517. /** Indicates whether to return the result of a formula calculation.
  15518. * @type {number}
  15519. */
  15520. formula= 6,
  15521. /** Indicates whether to return the automatic maximum value in a specified range.
  15522. * @type {number}
  15523. */
  15524. automax= 7
  15525. }
  15526. /**
  15527. * Specifies the text compare type.
  15528. * @enum {number}
  15529. * @example
  15530. * //This example uses the TextCompareType enumeration.
  15531. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.textCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.TextCompareType.contains, expected: "test"});
  15532. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  15533. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  15534. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  15535. * spread.options.highlightInvalidData = true;
  15536. * activeSheet.setValue(0, 0, "testing");
  15537. * //Type text in 0,0 that does not contain "test" to see invalid symbol
  15538. */
  15539. export enum TextCompareType{
  15540. /** Indicates whether the string is equal to a specified string.
  15541. * @type {number}
  15542. */
  15543. equalsTo= 0,
  15544. /** Indicates whether the string is not equal to a specified string.
  15545. * @type {number}
  15546. */
  15547. notEqualsTo= 1,
  15548. /** Indicates whether the string starts with a specified string.
  15549. * @type {number}
  15550. */
  15551. beginsWith= 2,
  15552. /** Indicates whether the string does not start with a specified string.
  15553. * @type {number}
  15554. */
  15555. doesNotBeginWith= 3,
  15556. /** Indicates whether the string ends with a specified string.
  15557. * @type {number}
  15558. */
  15559. endsWith= 4,
  15560. /** Indicates whether the string does not end with a specified string.
  15561. * @type {number}
  15562. */
  15563. doesNotEndWith= 5,
  15564. /** Indicates whether the string contains a specified string.
  15565. * @type {number}
  15566. */
  15567. contains= 6,
  15568. /** Indicates whether the string does not contain a specified string.
  15569. * @type {number}
  15570. */
  15571. doesNotContain= 7
  15572. }
  15573. /**
  15574. * Specifies the text comparison operator.
  15575. * @enum {number}
  15576. * @example
  15577. * //This example creates a rule.
  15578. * var style = new GC.Spread.Sheets.Style();
  15579. * style.backColor = "red";
  15580. * var ranges=[new GC.Spread.Sheets.Range(0,0,10,1)];
  15581. * activeSheet.conditionalFormats.addSpecificTextRule(GC.Spread.Sheets.ConditionalFormatting.TextComparisonOperators.contains, "test", style, ranges);
  15582. * activeSheet.setValue(0, 0, "testing");
  15583. * activeSheet.setValue(1, 0, "test");
  15584. * activeSheet.setValue(2, 0, "a");
  15585. * activeSheet.setValue(3, 0, "t");
  15586. */
  15587. export enum TextComparisonOperators{
  15588. /** Determines whether a cell value contains the parameter value.
  15589. * @type {number}
  15590. */
  15591. contains= 0,
  15592. /** Determines whether a cell value does not contain the parameter value.
  15593. * @type {number}
  15594. */
  15595. doesNotContain= 1,
  15596. /** Determines whether a cell value begins with the parameter value.
  15597. * @type {number}
  15598. */
  15599. beginsWith= 2,
  15600. /** Determines whether a cell value ends with the parameter value.
  15601. * @type {number}
  15602. */
  15603. endsWith= 3
  15604. }
  15605. /**
  15606. * Specifies the top 10 condition type.
  15607. * @enum {number}
  15608. * @example
  15609. * //This example uses the Top10ConditionType enumeration.
  15610. * var style = new GC.Spread.Sheets.Style();
  15611. * style.backColor = "red";
  15612. * var ranges=[new GC.Spread.Sheets.Range(0,0,10,1)];
  15613. * activeSheet.conditionalFormats.addTop10Rule(GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType.top, 2, style, ranges);
  15614. * activeSheet.setValue(0, 0, 1);
  15615. * activeSheet.setValue(1, 0, 50);
  15616. * activeSheet.setValue(2, 0, 11);
  15617. * activeSheet.setValue(3, 0, 5);
  15618. */
  15619. export enum Top10ConditionType{
  15620. /** Specifies the top condition.
  15621. * @type {number}
  15622. */
  15623. top= 0,
  15624. /** Specifies the bottom condition.
  15625. * @type {number}
  15626. */
  15627. bottom= 1
  15628. }
  15629. export class Condition{
  15630. /**
  15631. * Represents a conditional item using the parameter object.
  15632. * @param {GC.Spread.Sheets.ConditionalFormatting.ConditionType} conditionType
  15633. * @param {Object} args
  15634. * @constructor
  15635. * @example
  15636. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.averageCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.AverageConditionType.above});
  15637. * nCondition.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 3)]);
  15638. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  15639. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  15640. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  15641. * spread.options.highlightInvalidData = true;
  15642. * activeSheet.setValue(0, 0, 5);
  15643. * activeSheet.setValue(1, 0, 15);
  15644. */
  15645. constructor(conditionType: GC.Spread.Sheets.ConditionalFormatting.ConditionType, args: Object);
  15646. /**
  15647. * Gets or sets the rule compare type.
  15648. * @param {GC.Spread.Sheets.ConditionalFormatting.LogicalOperators | GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators | GC.Spread.Sheets.ConditionalFormatting.TextCompareType | GC.Spread.Sheets.ConditionalFormatting.ColorCompareType | GC.Spread.Sheets.ConditionalFormatting.DateCompareType} value The rule compare type.
  15649. * @returns {GC.Spread.Sheets.ConditionalFormatting.LogicalOperators | GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators | GC.Spread.Sheets.ConditionalFormatting.TextCompareType | GC.Spread.Sheets.ConditionalFormatting.ColorCompareType | GC.Spread.Sheets.ConditionalFormatting.DateCompareType | GC.Spread.Sheets.ConditionalFormatting.Condition} If no value is set, returns the rule compare type; otherwise, returns the condition.
  15650. * @example
  15651. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.textCondition);
  15652. * nCondition.compareType(GC.Spread.Sheets.ConditionalFormatting.TextCompareType.contains);
  15653. * nCondition.expected("test");
  15654. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  15655. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  15656. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  15657. * spread.options.highlightInvalidData = true;
  15658. * activeSheet.setValue(0, 0, "testing");
  15659. */
  15660. compareType(value?: GC.Spread.Sheets.ConditionalFormatting.LogicalOperators | GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators | GC.Spread.Sheets.ConditionalFormatting.TextCompareType | GC.Spread.Sheets.ConditionalFormatting.ColorCompareType | GC.Spread.Sheets.ConditionalFormatting.DateCompareType): any;
  15661. /**
  15662. * Evaluates the condition using the specified evaluator.
  15663. * @param {Object} evaluator The evaluator that can evaluate an expression or a function.
  15664. * @param {number} baseRow The base row index for evaluation.
  15665. * @param {number} baseColumn The base column index for evaluation.
  15666. * @param {Object} actualObj The actual value of object1 for evaluation.
  15667. * @returns {boolean} <c>true</c> if the result is successful; otherwise, <c>false</c>.
  15668. */
  15669. evaluate(evaluator: Object, baseRow: number, baseColumn: number, actualObj: Object): boolean;
  15670. /**
  15671. * Gets or sets the expected value.
  15672. * @param {Object} value The expected value.
  15673. * @returns {object | GC.Spread.Sheets.ConditionalFormatting.Condition} If no value is set, returns the expected value; otherwise, returns the condition.
  15674. * @example
  15675. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.dateCondition);
  15676. * nCondition.compareType(GC.Spread.Sheets.ConditionalFormatting.DateCompareType.before);
  15677. * nCondition.expected(new Date(2012, 11, 31));
  15678. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  15679. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  15680. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  15681. * spread.options.highlightInvalidData = true;
  15682. * activeSheet.setValue(0, 0, new Date(2012, 12, 12));
  15683. */
  15684. expected(value?: any): any;
  15685. /**
  15686. * Gets or sets the expected formula.
  15687. * @param {string | number} formulaOrBaseRow The expected formula or base row.
  15688. * @param {number} baseColumn The base column.
  15689. * @returns {string | GC.Spread.Sheets.ConditionalFormatting.Condition} If no value is set or baseRow and baseColumn is set, returns the expected formula; otherwise, returns the condition.
  15690. * @example
  15691. * var textLengthCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.textLengthCondition);
  15692. * textLengthCondition.compareType(GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators.greaterThan);
  15693. * textLengthCondition.formula("$C$1"); // formula used to calculate a number.
  15694. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(textLengthCondition);
  15695. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  15696. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  15697. * spread.options.highlightInvalidData = true;
  15698. * activeSheet.setValue(0, 0, "abcf");
  15699. * //Set value 3 to $C$1, after this code, the value in Cell(0,0) is valid.
  15700. * activeSheet.setValue(0, 2, 3);
  15701. * //Set value 5 to $C$1, after this code, the value in Cel(0,0) is invalid.
  15702. * // activeSheet.setValue(0, 2, 5);
  15703. */
  15704. formula(formulaOrBaseRow?: string | number, baseColumn ?: number): any;
  15705. /**
  15706. * Creates a date extend condition object from the specified day.
  15707. * @static
  15708. * @param {number} day The day.
  15709. * @returns {GC.Spread.Sheets.ConditionalFormatting.Condition} A date extend condition object.
  15710. */
  15711. static fromDay(day: number): GC.Spread.Sheets.ConditionalFormatting.Condition;
  15712. /**
  15713. * Creates the area condition from formula data.
  15714. * @static
  15715. * @param {string} formula The formula that specifies a range that contains data items.
  15716. * @returns {GC.Spread.Sheets.ConditionalFormatting.Condition} The area condition.
  15717. */
  15718. static fromFormula(formula: string): GC.Spread.Sheets.ConditionalFormatting.Condition;
  15719. /**
  15720. * Creates a date extend condition object from the specified month.
  15721. * @static
  15722. * @param {number} month The month. The first month is 0.
  15723. * @returns {GC.Spread.Sheets.ConditionalFormatting.Condition} A date extend condition object.
  15724. */
  15725. static fromMonth(month: number): GC.Spread.Sheets.ConditionalFormatting.Condition;
  15726. /**
  15727. * Creates a date extend condition object from the specified quarter.
  15728. * @static
  15729. * @param {GC.Spread.Sheets.ConditionalFormatting.QuarterType} quarter The quarter.
  15730. * @returns {GC.Spread.Sheets.ConditionalFormatting.Condition} A date extend condition object.
  15731. */
  15732. static fromQuarter(quarter: GC.Spread.Sheets.ConditionalFormatting.QuarterType): GC.Spread.Sheets.ConditionalFormatting.Condition;
  15733. /**
  15734. * Creates the area condition from source data.
  15735. * @static
  15736. * @param {string} expected The expected source that separates each data item with a comma (",").
  15737. * @returns {GC.Spread.Sheets.ConditionalFormatting.Condition} The area condition.
  15738. */
  15739. static fromSource(expected: string): GC.Spread.Sheets.ConditionalFormatting.Condition;
  15740. /**
  15741. * Creates a date extend condition object from the specified week.
  15742. * @static
  15743. * @param {number} week The week.
  15744. * @returns {GC.Spread.Sheets.ConditionalFormatting.Condition} A date extend condition object.
  15745. */
  15746. static fromWeek(week: number): GC.Spread.Sheets.ConditionalFormatting.Condition;
  15747. /**
  15748. * Creates a date extend condition object from the specified year.
  15749. * @static
  15750. * @param {number} year The year.
  15751. * @returns {GC.Spread.Sheets.ConditionalFormatting.Condition} A date extend condition object.
  15752. */
  15753. static fromYear(year: number): GC.Spread.Sheets.ConditionalFormatting.Condition;
  15754. /**
  15755. * Gets the expected value.
  15756. * @constructor
  15757. * @param {Object} evaluator The evaluator that can evaluate an expression or a function.
  15758. * @param {number} baseRow The base row index for evaluation.
  15759. * @param {number} baseColumn The base column index for evaluation.
  15760. * @returns {Object} The expected value.
  15761. */
  15762. getExpected(evaluator: Object, baseRow: number, baseColumn: number): Object;
  15763. /**
  15764. * Returns the list of valid data items.
  15765. * @param {Object} evaluator The evaluator that can evaluate an expression or a function.
  15766. * @param {number} baseRow The base row index for evaluation.
  15767. * @param {number} baseColumn The base column index for evaluation.
  15768. * @returns {Array} The list of valid data items.
  15769. */
  15770. getValidList(evaluator: Object, baseRow: number, baseColumn: number): any[];
  15771. /**
  15772. * Gets or sets whether to ignore the blank cell.
  15773. * @param {boolean} value Whether to ignore the blank cell.
  15774. * @returns {boolean | GC.Spread.Sheets.ConditionalFormatting.Condition} If no value is set, returns whether to ignore the blank cell; otherwise, returns the condition.
  15775. * @example
  15776. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.textCondition);
  15777. * nCondition.compareType(GC.Spread.Sheets.ConditionalFormatting.TextCompareType.contains);
  15778. * nCondition.expected("te?t");
  15779. * nCondition.ignoreBlank(true);
  15780. * nCondition.ignoreCase(true);
  15781. * nCondition.useWildCards(true);
  15782. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  15783. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  15784. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  15785. * spread.options.highlightInvalidData = true;
  15786. * activeSheet.setValue(0, 0, "testing");
  15787. */
  15788. ignoreBlank(value?: boolean): any;
  15789. /**
  15790. * Gets or sets whether to ignore case when performing the comparison.
  15791. * @param {boolean} value Whether to ignore case when performing the comparison.
  15792. * @returns {boolean | GC.Spread.Sheets.ConditionalFormatting.Condition} If no value is set, returns whether to ignore case when performing the comparison; otherwise, returns the condition.
  15793. * @example
  15794. * //This example creates a text condition.
  15795. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.textCondition);
  15796. * nCondition.compareType(GC.Spread.Sheets.ConditionalFormatting.TextCompareType.contains);
  15797. * nCondition.expected("te?t");
  15798. * nCondition.ignoreBlank(true);
  15799. * nCondition.ignoreCase(true);
  15800. * nCondition.useWildCards(true);
  15801. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  15802. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  15803. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  15804. * spread.options.highlightInvalidData = true;
  15805. * activeSheet.setValue(0, 0, "testing");
  15806. */
  15807. ignoreCase(value?: boolean): any;
  15808. /**
  15809. * Gets or sets the first condition.
  15810. * @param {GC.Spread.Sheets.ConditionalFormatting.Condition} value The first condition.
  15811. * @returns {GC.Spread.Sheets.ConditionalFormatting.Condition} If no value is set, returns the first condition; otherwise, returns the relation condition.
  15812. * @example
  15813. * //This example validates a date.
  15814. * var condition1 = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.dateCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.DateCompareType.afterEqualsTo, expected: new Date(2012, 11, 31)});
  15815. * var condition2 = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.dateCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.DateCompareType.beforeEqualsTo, expected: new Date(2013, 11, 31)});
  15816. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.relationCondition);
  15817. * nCondition.compareType(GC.Spread.Sheets.ConditionalFormatting.LogicalOperators.and);
  15818. * nCondition.item1(condition1);
  15819. * nCondition.item2(condition2);
  15820. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  15821. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  15822. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  15823. * spread.options.highlightInvalidData = true;
  15824. * activeSheet.setValue(0, 0, new Date(2012, 11, 25));
  15825. */
  15826. item1(value?: GC.Spread.Sheets.ConditionalFormatting.Condition): GC.Spread.Sheets.ConditionalFormatting.Condition;
  15827. /**
  15828. * Gets or sets the second condition.
  15829. * @param {GC.Spread.Sheets.ConditionalFormatting.Condition} value The second condition.
  15830. * @returns {GC.Spread.Sheets.ConditionalFormatting.Condition} If no value is set, returns the second condition; otherwise, returns the relation condition.
  15831. * @example
  15832. * //This example validates a date.
  15833. * var condition1 = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.dateCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.DateCompareType.afterEqualsTo, expected: new Date(2012, 11, 31)});
  15834. * var condition2 = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.dateCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.DateCompareType.beforeEqualsTo, expected: new Date(2013, 11, 31)});
  15835. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.relationCondition);
  15836. * nCondition.compareType(GC.Spread.Sheets.ConditionalFormatting.LogicalOperators.and);
  15837. * nCondition.item1(condition1);
  15838. * nCondition.item2(condition2);
  15839. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  15840. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  15841. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  15842. * spread.options.highlightInvalidData = true;
  15843. * activeSheet.setValue(0, 0, new Date(2012, 11, 25));
  15844. */
  15845. item2(value?: GC.Spread.Sheets.ConditionalFormatting.Condition): GC.Spread.Sheets.ConditionalFormatting.Condition;
  15846. /**
  15847. * Gets or sets the condition ranges.
  15848. * @param {Array.<GC.Spread.Sheets.Range>} value The condition ranges.
  15849. * @returns {Array.<GC.Spread.Sheets.Range> | GC.Spread.Sheets.ConditionalFormatting.Condition} If no value is set, returns the condition ranges; otherwise, returns the condition.
  15850. * @example
  15851. * //This example creates a unique condition.
  15852. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.uniqueCondition);
  15853. * nCondition.expected(true);
  15854. * nCondition.ranges([new GC.Spread.Sheets.Range(0, 0, 5, 1)]);
  15855. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  15856. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  15857. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  15858. * spread.options.highlightInvalidData = true;
  15859. * activeSheet.setValue(0, 0, 5);
  15860. */
  15861. ranges(value?: GC.Spread.Sheets.Range[]): any;
  15862. /**
  15863. * Resets this instance.
  15864. * @example
  15865. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.numberCondition);
  15866. * nCondition.compareType(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan);
  15867. * nCondition.expected(5);
  15868. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  15869. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  15870. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  15871. * spread.options.highlightInvalidData = true;
  15872. * activeSheet.setValue(0, 0, 5);
  15873. * //Create a button
  15874. * $("#button1").click(function () {
  15875. * activeSheet.suspendPaint();
  15876. * nCondition.reset();
  15877. * activeSheet.resumePaint();
  15878. * });
  15879. */
  15880. reset(): void;
  15881. /**
  15882. * Gets or sets whether to treat the null value in a cell as zero.
  15883. * @param {boolean} value Whether to treat the null value in a cell as zero.
  15884. * @returns {boolean | GC.Spread.Sheets.ConditionalFormatting.Condition} If no value is set, returns whether to treat the null value in a cell as zero; otherwise, returns the condition.
  15885. * @example
  15886. * //This example sets the treatNullValueAsZero method.
  15887. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.cellValueCondition);
  15888. * nCondition.compareType(GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators.equalsTo);
  15889. * nCondition.expected(0);
  15890. * //When the option is false, the validation fails and the red alert is displayed.
  15891. * //When the option is true, the blank cell is treated as zero and the validation is successful.
  15892. * nCondition.treatNullValueAsZero(false);
  15893. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  15894. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  15895. * validator.ignoreBlank(false);
  15896. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  15897. * spread.options.highlightInvalidData = true;
  15898. * activeSheet.setValue(0, 0, null);
  15899. */
  15900. treatNullValueAsZero(value?: boolean): any;
  15901. /**
  15902. * Gets or sets whether to compare strings using wildcards.
  15903. * @param {boolean} value Whether to compare strings using wildcards.
  15904. * @returns {boolean | GC.Spread.Sheets.ConditionalFormatting.Condition} If no value is set, returns whether to compare strings using wildcards; otherwise, returns the condition.
  15905. * @example
  15906. * //This example allows wildcards.
  15907. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.textCondition);
  15908. * nCondition.compareType(GC.Spread.Sheets.ConditionalFormatting.TextCompareType.contains);
  15909. * nCondition.expected("te?t");
  15910. * nCondition.ignoreBlank(true);
  15911. * nCondition.ignoreCase(true);
  15912. * nCondition.useWildCards(true);
  15913. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  15914. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  15915. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  15916. * spread.options.highlightInvalidData = true;
  15917. * activeSheet.setValue(0, 0, "testing");
  15918. */
  15919. useWildCards(value?: boolean): any;
  15920. }
  15921. export class ConditionalFormats{
  15922. /**
  15923. * Represents a format condition class.
  15924. * @class
  15925. * @param {GC.Spread.Sheets.Worksheet} worksheet The sheet.
  15926. */
  15927. constructor(worksheet: GC.Spread.Sheets.Worksheet);
  15928. /**
  15929. * Adds the two scale rule to the rule collection.
  15930. * @param {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType} minType The minimum scale type.
  15931. * @param {number} minValue The minimum scale value.
  15932. * @param {string} minColor The minimum scale color.
  15933. * @param {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType} maxType The maximum scale type.
  15934. * @param {number} maxValue The maximum scale value.
  15935. * @param {string} maxColor The maximum scale color.
  15936. * @param {Array.<GC.Spread.Sheets.Range>} ranges The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.
  15937. * @returns {GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} The two scale rule added to the rule collection.
  15938. * @example
  15939. * //This example uses the add2ScaleRule method.
  15940. * activeSheet.conditionalFormats.add2ScaleRule(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number,10,"Red",GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number,100,"Yellow", [new GC.Spread.Sheets.Range(0,0,10,3)]);
  15941. * activeSheet.setValue(0,0, 1,3);
  15942. * activeSheet.setValue(1,0, 50,3);
  15943. * activeSheet.setValue(2,0, 100,3);
  15944. */
  15945. add2ScaleRule(minType: GC.Spread.Sheets.ConditionalFormatting.ScaleValueType, minValue: number, minColor: string, maxType: GC.Spread.Sheets.ConditionalFormatting.ScaleValueType, maxValue: number, maxColor: string, ranges: GC.Spread.Sheets.Range[]): GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase;
  15946. /**
  15947. * Adds the three scale rule to the rule collection.
  15948. * @param {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType} minType The minimum scale type.
  15949. * @param {number} minValue The minimum scale value.
  15950. * @param {string} minColor The minimum scale color.
  15951. * @param {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType} midType The midpoint scale type.
  15952. * @param {number} midValue The midpoint scale value.
  15953. * @param {string} midColor The midpoint scale color.
  15954. * @param {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType} maxType The maximum scale type.
  15955. * @param {number} maxValue The maximum scale value.
  15956. * @param {string} maxColor The maximum scale color.
  15957. * @param {Array.<GC.Spread.Sheets.Range>} ranges The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.
  15958. * @returns {GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} The three scale rule added to the rule collection.
  15959. * @example
  15960. * //This example uses the add3ScaleRule method.
  15961. * activeSheet.setValue(0,0, 1,3);
  15962. * activeSheet.setValue(1,0, 50,3);
  15963. * activeSheet.setValue(2,0, 100,3);
  15964. * activeSheet.conditionalFormats.add3ScaleRule(1, 10, "red", 0, 50, "blue",2, 100, "yellow", [new GC.Spread.Sheets.Range(0, 0, 10, 3)]);
  15965. */
  15966. add3ScaleRule(minType: GC.Spread.Sheets.ConditionalFormatting.ScaleValueType, minValue: number, minColor: string, midType: GC.Spread.Sheets.ConditionalFormatting.ScaleValueType, midValue: number, midColor: string, maxType: GC.Spread.Sheets.ConditionalFormatting.ScaleValueType, maxValue: number, maxColor: string, ranges: GC.Spread.Sheets.Range[]): GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase;
  15967. /**
  15968. * Adds an average rule to the rule collection.
  15969. * @param {GC.Spread.Sheets.ConditionalFormatting.AverageConditionType} type The average condition type.
  15970. * @param {GC.Spread.Sheets.Style} style The style that is applied to the cell when the condition is met.
  15971. * @param {Array.<GC.Spread.Sheets.Range>} ranges The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.
  15972. * @returns {GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} The average rule added to the rule collection.
  15973. * @example
  15974. * //This example uses the addAverageRule method.
  15975. * activeSheet.setValue(0,0, 1,3);
  15976. * activeSheet.setValue(1,0, 50,3);
  15977. * activeSheet.setValue(2,0, 100,3);
  15978. * activeSheet.setValue(3,0, 2,3);
  15979. * activeSheet.setValue(4,0, 60,3);
  15980. * activeSheet.setValue(5,0, 90,3);
  15981. * activeSheet.setValue(6,0, 3,3);
  15982. * activeSheet.setValue(7,0, 40,3);
  15983. * activeSheet.setValue(8,0, 70,3);
  15984. * activeSheet.setValue(9,0, 5,3);
  15985. * activeSheet.setValue(10,0, 35,3);
  15986. * var style = new GC.Spread.Sheets.Style();
  15987. * style.backColor = "red";
  15988. * style.borderLeft =new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  15989. * style.borderTop = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  15990. * style.borderRight = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  15991. * style.borderBottom = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  15992. * activeSheet.conditionalFormats.addAverageRule(GC.Spread.Sheets.ConditionalFormatting.AverageConditionType.above,style,[new GC.Spread.Sheets.Range(0, 0, 10, 3)]);
  15993. */
  15994. addAverageRule(type: GC.Spread.Sheets.ConditionalFormatting.AverageConditionType, style: GC.Spread.Sheets.Style, ranges: GC.Spread.Sheets.Range[]): GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase;
  15995. /**
  15996. * Adds the cell value rule to the rule collection.
  15997. * @param {GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators} comparisionOperator The comparison operator.
  15998. * @param {Object} value1 The first value.
  15999. * @param {Object} value2 The second value.
  16000. * @param {GC.Spread.Sheets.Style} style The style that is applied to the cell when the condition is met.
  16001. * @param {Array.<GC.Spread.Sheets.Range>} ranges The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.
  16002. * @returns {GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} The cell value rule added to the rule collection.
  16003. * @example
  16004. * //This example uses the addCellValueRule method.
  16005. * var style = new GC.Spread.Sheets.Style();
  16006. * style.backColor = "red";
  16007. * var ranges=[new GC.Spread.Sheets.Range(0,0,5,1)];
  16008. * activeSheet.conditionalFormats.addCellValueRule(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between, 2, 100, style, ranges);
  16009. * activeSheet.setValue(0,0,1,3);
  16010. * activeSheet.setValue(1,0,45,3);
  16011. */
  16012. addCellValueRule(comparisionOperator: GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators, value1: Object, value2: Object, style: GC.Spread.Sheets.Style, ranges: GC.Spread.Sheets.Range[]): GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase;
  16013. /**
  16014. * Adds a data bar rule to the rule collection.
  16015. * @param {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType} minType The minimum scale type.
  16016. * @param {number} minValue The minimum scale value.
  16017. * @param {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType} maxType The maximum scale type.
  16018. * @param {number} maxValue The maximum scale value.
  16019. * @param {string} color The color data bar to show on the view.
  16020. * @param {Array.<GC.Spread.Sheets.Range>} ranges The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.
  16021. * @returns {GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} The data bar rule added to the rule collection.
  16022. * @example
  16023. * //This example uses the addDataBarRule method.
  16024. * activeSheet.setValue(0,0,1,3);
  16025. * activeSheet.setValue(1,0,15,3);
  16026. * activeSheet.setValue(2,0,25,3);
  16027. * activeSheet.setValue(3,0,-1,3);
  16028. * activeSheet.conditionalFormats.addDataBarRule(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number, -1, GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number, 40, "orange", [new GC.Spread.Sheets.Range(0,0,4,1)]);
  16029. */
  16030. addDataBarRule(minType: GC.Spread.Sheets.ConditionalFormatting.ScaleValueType, minValue: number, maxType: GC.Spread.Sheets.ConditionalFormatting.ScaleValueType, maxValue: number, color: string, ranges: GC.Spread.Sheets.Range[]): GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase;
  16031. /**
  16032. * Adds the date occurring rule to the rule collection.
  16033. * @param {GC.Spread.Sheets.ConditionalFormatting.DateOccurringType} type The data occurring type.
  16034. * @param {GC.Spread.Sheets.Style} style The style that is applied to the cell when the condition is met.
  16035. * @param {Array.<GC.Spread.Sheets.Range>} ranges The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.
  16036. * @returns {GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} The date occurring rule added to the rule collection.
  16037. * @example
  16038. * //This example uses the addDateOccurringRule method.
  16039. * var style = new GC.Spread.Sheets.Style();
  16040. * style.backColor = "red";
  16041. * var d = new Date();
  16042. * activeSheet.setValue(0, 0, d);
  16043. * activeSheet.setValue(1, 0, new Date(d.setDate(d.getDate()+1)));
  16044. * activeSheet.setValue(2, 0, new Date(d.setDate(d.getDate()+5)));
  16045. * activeSheet.setValue(3, 0,new Date(d.setDate(d.getDate()+6)));
  16046. * activeSheet.setValue(4, 0,new Date(d.setDate(d.getDate()+7)));
  16047. * activeSheet.setValue(5, 0, new Date(d.setDate(d.getDate()+8)));
  16048. * activeSheet.conditionalFormats.addDateOccurringRule(GC.Spread.Sheets.ConditionalFormatting.DateOccurringType.nextWeek, style, [new GC.Spread.Sheets.Range(0,0,10,1)]);
  16049. */
  16050. addDateOccurringRule(type: GC.Spread.Sheets.ConditionalFormatting.DateOccurringType, style: GC.Spread.Sheets.Style, ranges: GC.Spread.Sheets.Range[]): GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase;
  16051. /**
  16052. * Adds a duplicate rule to the rule collection.
  16053. * @param {GC.Spread.Sheets.Style} style The style that is applied to the cell when the condition is met.
  16054. * @param {Array.<GC.Spread.Sheets.Range>} ranges The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.
  16055. * @returns {GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} The duplicate rule added to the rule collection.
  16056. * @example
  16057. * //This example uses the addDuplicateRule method.
  16058. * var style = new GC.Spread.Sheets.Style();
  16059. * style.backColor = "yellow";
  16060. * var ranges=[new GC.Spread.Sheets.Range(0,0,10,1)];
  16061. * activeSheet.conditionalFormats.addDuplicateRule(style, ranges);
  16062. * activeSheet.setValue(0, 0, 50);
  16063. * activeSheet.setValue(1, 0, 50);
  16064. * activeSheet.setValue(2, 0, 11);
  16065. * activeSheet.setValue(3, 0, 5);
  16066. */
  16067. addDuplicateRule(style: GC.Spread.Sheets.Style, ranges: GC.Spread.Sheets.Range[]): GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase;
  16068. /**
  16069. * Adds the formula rule to the rule collection.
  16070. * @param {string} formula The condition formula.
  16071. * @param {GC.Spread.Sheets.Style} style The style that is applied to the cell when the condition is met.
  16072. * @param {Array.<GC.Spread.Sheets.Range>} ranges The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.
  16073. * @returns {GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} The formula rule added to the rule collection.
  16074. * @example
  16075. * //This example uses the addFormulaRule method.
  16076. * var style = new GC.Spread.Sheets.Style();
  16077. * style.backColor = "red";
  16078. * var ranges = [new GC.Spread.Sheets.Range(0, 0, 2, 1)];
  16079. * activeSheet.conditionalFormats.addFormulaRule("=A1=B1+C1", style, ranges);
  16080. * activeSheet.setValue(0, 0, 2,3);
  16081. * activeSheet.setValue(0, 1, 1,3);
  16082. * activeSheet.setValue(0, 2,1,3);
  16083. * activeSheet.setValue(1, 0, 1,3);
  16084. */
  16085. addFormulaRule(formula: string, style: GC.Spread.Sheets.Style, ranges: GC.Spread.Sheets.Range[]): GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase;
  16086. /**
  16087. * Adds an icon set rule to the rule collection.
  16088. * @param {GC.Spread.Sheets.ConditionalFormatting.IconSetType} iconSetType The type of icon set.
  16089. * @param {Array.<GC.Spread.Sheets.Range>} ranges The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.
  16090. * @returns {GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} The icon set rule added to the rule collection.
  16091. * @example
  16092. * //This example uses the addIconSetRule method.
  16093. * activeSheet.setValue(0,0,1,3);
  16094. * activeSheet.setValue(1,0,15,3);
  16095. * activeSheet.setValue(2,0,25,3);
  16096. * activeSheet.setValue(3,0,-1,3);
  16097. * activeSheet.conditionalFormats.addIconSetRule(GC.Spread.Sheets.ConditionalFormatting.IconSetType.fourTrafficLights, [new GC.Spread.Sheets.Range(0,0,4,1)]);
  16098. */
  16099. addIconSetRule(iconSetTye: GC.Spread.Sheets.ConditionalFormatting.IconSetType, ranges: GC.Spread.Sheets.Range[]): GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase;
  16100. /**
  16101. * Adds the rule.
  16102. * @param {GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} rule The rule to add.
  16103. * @returns {GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase}
  16104. * @example
  16105. * //This example uses the addRule method.
  16106. * var scale = new GC.Spread.Sheets.ConditionalFormatting.ScaleRule();
  16107. * scale.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.threeScaleRule);
  16108. * scale.midColor("red");
  16109. * scale.midType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16110. * scale.midValue(50);
  16111. * scale.maxColor("blue");
  16112. * scale.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16113. * scale.maxValue(100);
  16114. * scale.minColor("yellow");
  16115. * scale.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16116. * scale.minValue(10);
  16117. * scale.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 3)]);
  16118. * activeSheet.conditionalFormats.addRule(scale);
  16119. * activeSheet.setValue(0,0, 1,3);
  16120. * activeSheet.setValue(1,0, 50,3);
  16121. * activeSheet.setValue(2,0, 100,3);
  16122. */
  16123. addRule(rule: GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase): GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase;
  16124. /**
  16125. * Adds the text rule to the rule collection.
  16126. * @param {GC.Spread.Sheets.ConditionalFormatting.TextComparisonOperators} comparisonOperator The comparison operator.
  16127. * @param {string} text The text for comparison.
  16128. * @param {GC.Spread.Sheets.Style} style The style that is applied to the cell when the condition is met.
  16129. * @param {Array.<GC.Spread.Sheets.Range>} ranges The cell ranges where the rule is applied to items whose item type is GC.Spread.Sheets.Range.
  16130. * @returns {GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} The text rule added to the rule collection.
  16131. * @example
  16132. * //This example uses the addSpecificTextRule method.
  16133. * var style = new GC.Spread.Sheets.Style();
  16134. * style.backColor = "red";
  16135. * var ranges=[new GC.Spread.Sheets.Range(0,0,10,1)];
  16136. * activeSheet.conditionalFormats.addSpecificTextRule(GC.Spread.Sheets.ConditionalFormatting.TextComparisonOperators.contains, "test", style, ranges);
  16137. * activeSheet.setValue(0, 0, "testing");
  16138. * activeSheet.setValue(1, 0, "test");
  16139. * activeSheet.setValue(2, 0, "a");
  16140. * activeSheet.setValue(3, 0, "t");
  16141. */
  16142. addSpecificTextRule(comparisionOperator: GC.Spread.Sheets.ConditionalFormatting.TextComparisonOperators, text: string, style: GC.Spread.Sheets.Style, ranges: GC.Spread.Sheets.Range[]): GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase;
  16143. /**
  16144. * Adds the top 10 rule or bottom 10 rule to the collection based on the Top10CondtionType object.
  16145. * @param {GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType} type The top 10 condition.
  16146. * @param {number} rank The number of top or bottom items to apply the style to.
  16147. * @param {GC.Spread.Sheets.Style} style The style that is applied to the cell when the condition is met.
  16148. * @param {Array.<GC.Spread.Sheets.Range>} ranges The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.
  16149. * @returns {GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} The top 10 rule added to the rule collection.
  16150. * @example
  16151. * //This example uses the addTop10Rule method.
  16152. * var style = new GC.Spread.Sheets.Style();
  16153. * style.backColor = "red";
  16154. * var ranges=[new GC.Spread.Sheets.Range(0,0,10,1)];
  16155. * activeSheet.conditionalFormats.addTop10Rule(GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType.top, 2, style, ranges);
  16156. * activeSheet.setValue(0, 0, 1);
  16157. * activeSheet.setValue(1, 0, 50);
  16158. * activeSheet.setValue(2, 0, 11);
  16159. * activeSheet.setValue(3, 0, 5);
  16160. */
  16161. addTop10Rule(type: GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType, rank: number, style: GC.Spread.Sheets.Style, ranges: GC.Spread.Sheets.Range[]): GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase;
  16162. /**
  16163. * Adds a unique rule to the rule collection.
  16164. * @param {GC.Spread.Sheets.Style} style The style that is applied to the cell when the condition is met.
  16165. * @param {Array.<GC.Spread.Sheets.Range>} ranges The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.
  16166. * @returns {GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} The unique rule added to the rule collection.
  16167. * @example
  16168. * //This example uses the addUniqueRule method.
  16169. * var style = new GC.Spread.Sheets.Style();
  16170. * style.backColor = "green";
  16171. * activeSheet.setValue(0, 0, 50);
  16172. * activeSheet.setValue(1, 0, 50);
  16173. * activeSheet.setValue(2, 0, 11);
  16174. * activeSheet.setValue(3, 0, 5);
  16175. * activeSheet.conditionalFormats.addUniqueRule(style, [new GC.Spread.Sheets.Range(0,0,10,1)]);
  16176. */
  16177. addUniqueRule(style: GC.Spread.Sheets.Style, ranges: GC.Spread.Sheets.Range[]): GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase;
  16178. /**
  16179. * Removes all rules.
  16180. * @example
  16181. * //This example uses the clearRule method.
  16182. * activeSheet.setValue(0,0, 1,3);
  16183. * activeSheet.setValue(1,0, 50,3);
  16184. * activeSheet.setValue(2,0, 100,3);
  16185. * activeSheet.conditionalFormats.add2ScaleRule(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number, 10, "red", GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number, 100, "yellow", [new GC.Spread.Sheets.Range(0, 0, 10, 3)]);
  16186. * // Remove comment in front of method to test
  16187. * //activeSheet.conditionalFormats.clearRule();
  16188. */
  16189. clearRule(): void;
  16190. /**
  16191. * Determines whether the specified cell contains a specified rule.
  16192. * @param {GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} rule The rule for which to check.
  16193. * @param {number} row The row index.
  16194. * @param {number} column The column index.
  16195. * @returns {boolean} <c>true</c> if the specified cell contains a specified rule; otherwise, <c>false</c>.
  16196. * @example
  16197. * //This example checks to see if a cell has a specified rule.
  16198. * var style = new GC.Spread.Sheets.Style();
  16199. * style.backColor = "red";
  16200. * var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  16201. * rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  16202. * rule.ranges([new GC.Spread.Sheets.Range(0,0,5,1)]);
  16203. * rule.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between);
  16204. * rule.style(style);
  16205. * rule.value1(2);
  16206. * rule.value2(100);
  16207. * activeSheet.conditionalFormats.addRule(rule);
  16208. * activeSheet.setValue(0,0,1,3);
  16209. * activeSheet.setValue(1,0,45,3);
  16210. * var ruletest = activeSheet.conditionalFormats.containsRule(rule, 0, 0);
  16211. * alert(ruletest);
  16212. */
  16213. containsRule(rule: GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase, row: number, column: number): boolean;
  16214. /**
  16215. * Gets the number of rule objects in the collection.
  16216. * @returns {number} The number of rule objects in the collection.
  16217. * @example
  16218. * //This example counts the rules.
  16219. * var style = new GC.Spread.Sheets.Style();
  16220. * style.backColor = "red";
  16221. * var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  16222. * rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  16223. * rule.ranges([new GC.Spread.Sheets.Range(0,0,5,1)]);
  16224. * rule.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between);
  16225. * rule.style(style);
  16226. * rule.value1(2);
  16227. * rule.value2(100);
  16228. * activeSheet.conditionalFormats.addRule(rule);
  16229. * activeSheet.setValue(0,0,1,3);
  16230. * activeSheet.setValue(1,0,45,3);
  16231. * var ruletest = activeSheet.conditionalFormats.count();
  16232. * alert(ruletest);
  16233. */
  16234. count(): number;
  16235. /**
  16236. * Gets the rule using the index.
  16237. * @param {number} index The index from which to get the rule.
  16238. * @returns {GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} The rule from the index.
  16239. * @example
  16240. * //This example uses the getRule method.
  16241. * var style = new GC.Spread.Sheets.Style();
  16242. * style.backColor = "red";
  16243. * var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  16244. * rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  16245. * rule.ranges([new GC.Spread.Sheets.Range(0,0,5,1)]);
  16246. * rule.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between);
  16247. * rule.style(style);
  16248. * rule.value1(2);
  16249. * rule.value2(100);
  16250. * activeSheet.conditionalFormats.addRule(rule);
  16251. * activeSheet.setValue(0,0,1,3);
  16252. * activeSheet.setValue(1,0,45,3);
  16253. * var ruletest = activeSheet.conditionalFormats.getRule(0);
  16254. * alert(ruletest.value1());
  16255. */
  16256. getRule(index: number): GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase;
  16257. /**
  16258. * Gets the conditional rules from the cell at the specified row and column.
  16259. * @param {number} row The row index.
  16260. * @param {number} column The column index.
  16261. * @returns {Array.<GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase>} The conditional rules.
  16262. * @example
  16263. * //This example uses the getRules method.
  16264. * var style = new GC.Spread.Sheets.Style();
  16265. * style.backColor = "red";
  16266. * var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  16267. * rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  16268. * rule.ranges([new GC.Spread.Sheets.Range(0,0,5,1)]);
  16269. * rule.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between);
  16270. * rule.style(style);
  16271. * rule.value1(2);
  16272. * rule.value2(100);
  16273. * activeSheet.conditionalFormats.addRule(rule);
  16274. * activeSheet.setValue(0,0,1,3);
  16275. * activeSheet.setValue(1,0,45,3);
  16276. * var ruletest = activeSheet.conditionalFormats.getRules();
  16277. * alert(ruletest[0].style().backColor);
  16278. */
  16279. getRules(row: number, column: number): GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase[];
  16280. /**
  16281. * Removes a rule object from the ConditionalFormats object.
  16282. * @param {GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} rule The rule object to remove from the ConditionalFormats object.
  16283. * @example
  16284. * //This example uses the removeRule method.
  16285. * var style = new GC.Spread.Sheets.Style();
  16286. * style.backColor = "red";
  16287. * var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  16288. * rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  16289. * rule.ranges([new GC.Spread.Sheets.Range(0,0,5,1)]);
  16290. * rule.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between);
  16291. * rule.style(style);
  16292. * rule.value1(2);
  16293. * rule.value2(100);
  16294. * activeSheet.conditionalFormats.addRule(rule);
  16295. * activeSheet.setValue(0,0,1,3);
  16296. * activeSheet.setValue(1,0,45,3);
  16297. * activeSheet.conditionalFormats.removeRule(rule);
  16298. */
  16299. removeRule(rule: GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase): void;
  16300. /**
  16301. * Removes the rules from a specified cell range.
  16302. * @param {number} row The row index of the first cell in the range.
  16303. * @param {number} column The column index of the first cell in the range.
  16304. * @param {number} rowCount The number of rows in the range.
  16305. * @param {number} columnCount The number of columns in the range.
  16306. * @example
  16307. * //This example uses the removeRuleByRange method.
  16308. * var style = new GC.Spread.Sheets.Style();
  16309. * style.backColor = "red";
  16310. * var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  16311. * rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  16312. * rule.ranges([new GC.Spread.Sheets.Range(0,0,5,1)]);
  16313. * rule.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between);
  16314. * rule.style(style);
  16315. * rule.value1(2);
  16316. * rule.value2(100);
  16317. * activeSheet.conditionalFormats.addRule(rule);
  16318. * activeSheet.setValue(0,0,1,3);
  16319. * activeSheet.setValue(1,0,45,3);
  16320. * activeSheet.conditionalFormats.removeRuleByRange(0, 0, 5, 1);
  16321. */
  16322. removeRuleByRange(row: number, column: number, rowCount: number, columnCount: number): void;
  16323. }
  16324. export class ConditionRuleBase{
  16325. /**
  16326. * Represents a formatting base rule class as the specified style.
  16327. * @param {GC.Spread.Sheets.ConditionalFormatting.RuleType} ruleType
  16328. * @param {GC.Spread.Sheets.Style} style The style for the rule.
  16329. * @param {Array.<GC.Spread.Sheets.Range>} ranges The range array.
  16330. * @class
  16331. */
  16332. constructor(ruleType: GC.Spread.Sheets.ConditionalFormatting.RuleType, style: GC.Spread.Sheets.Style, ranges: GC.Spread.Sheets.Range[]);
  16333. /**
  16334. * Gets or sets the base condition of the rule.
  16335. * @param {GC.Spread.Sheets.ConditionalFormatting.Condition} value The base condition of the rule.
  16336. * @returns {GC.Spread.Sheets.ConditionalFormatting.Condition | GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} If no value is set, returns the base condition of the rule; otherwise, returns the condition rule.
  16337. */
  16338. condition(value?: GC.Spread.Sheets.ConditionalFormatting.Condition): any;
  16339. /**
  16340. * Determines whether the range of cells contains the cell at the specified row and column.
  16341. * @param {number} row The row index.
  16342. * @param {number} column The column index.
  16343. * @returns {boolean} <c>true</c> if the range of cells contains the cell at the specified row and column; otherwise, <c>false</c>.
  16344. */
  16345. contains(row: number, column: number): boolean;
  16346. /**
  16347. * Creates condition for the rule.
  16348. * @returns {GC.Spread.Sheets.ConditionalFormatting.Condition} The condition.
  16349. */
  16350. createCondition(): GC.Spread.Sheets.ConditionalFormatting.Condition;
  16351. /**
  16352. * Returns the cell style of the rule if the cell satisfies the condition.
  16353. * @param {Object} evaluator The object that can evaluate a condition.
  16354. * @param {number} baseRow The row index.
  16355. * @param {number} baseColumn The column index.
  16356. * @param {Object} actual The actual value.
  16357. * @returns {GC.Spread.Sheets.Style} The cell style of the rule.
  16358. */
  16359. evaluate(evaluator: Object, baseRow: number, baseColumn: number, actual: Object): GC.Spread.Sheets.Style;
  16360. /**
  16361. * Gets the style of the base rule.
  16362. * @returns {GC.Spread.Sheets.Style}
  16363. */
  16364. getExpected(): GC.Spread.Sheets.Style;
  16365. /**
  16366. * Specifies whether the range for this rule intersects another range.
  16367. * @param {number} row The row index.
  16368. * @param {number} column The column index.
  16369. * @param {number} rowCount The number of rows.
  16370. * @param {number} columnCount The number of columns.
  16371. * @returns {boolean} <c>true</c> if the range for this rule intersects another range; otherwise, <c>false</c>.
  16372. */
  16373. intersects(row: number, column: number, rowCount: number, columnCount: number): boolean;
  16374. /**
  16375. * Specifies whether this rule is a scale rule.
  16376. * @returns {boolean} <c>true</c> if this rule is a scale rule; otherwise, <c>false</c>.
  16377. */
  16378. isScaleRule(): boolean;
  16379. /**
  16380. * Gets or sets the priority of the rule.
  16381. * @param {number} value The priority of the rule.
  16382. * @returns {number | GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} If no value is set, returns the priority of the rule; otherwise, returns the condition rule.
  16383. */
  16384. priority(value?: number): any;
  16385. /**
  16386. * Gets or sets the condition rule ranges.
  16387. * @param {Array.<GC.Spread.Sheets.Range>} value The condition rule ranges.
  16388. * @returns {Array.<GC.Spread.Sheets.Range> | GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} If no value is set, returns the condition rule ranges; otherwise, returns the condition rule.
  16389. * @example
  16390. * var style = new GC.Spread.Sheets.Style();
  16391. * style.backColor = "green";
  16392. * var ranges = [new GC.Spread.Sheets.Range(0, 0, 10, 1)];
  16393. * activeSheet.conditionalFormats.addUniqueRule(style, ranges);
  16394. * activeSheet.setValue(0, 0, 50);
  16395. * activeSheet.setValue(1, 0, 50);
  16396. * activeSheet.setValue(2, 0, 11);
  16397. * activeSheet.setValue(3, 0, 5);
  16398. */
  16399. ranges(value?: GC.Spread.Sheets.Range[]): any;
  16400. /**
  16401. * Resets the rule.
  16402. */
  16403. reset(): void;
  16404. /**
  16405. * Gets or sets the condition rule type.
  16406. * @param {GC.Spread.Sheets.ConditionalFormatting.RuleType} value The condition rule type.
  16407. * @returns {GC.Spread.Sheets.ConditionalFormatting.RuleType | GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} If no value is set, returns the condition rule type; otherwise, returns the condition rule.
  16408. * @example
  16409. * //This example uses the ruleType method.
  16410. * activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
  16411. * var style = new GC.Spread.Sheets.Style();
  16412. * style.backColor = "red";
  16413. * style.foreColor = "black";
  16414. * var cell = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  16415. * cell.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  16416. * cell.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan);
  16417. * cell.value1(5);
  16418. * cell.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  16419. * cell.style(style);
  16420. * activeSheet.conditionalFormats.addRule(cell);
  16421. * var style1 = new GC.Spread.Sheets.Style();
  16422. * style1.foreColor = "red";
  16423. * var top = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  16424. * top.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.top10Rule);
  16425. * top.type(GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType.top);
  16426. * top.rank(3);
  16427. * top.style(style1);
  16428. * top.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  16429. * top.stopIfTrue(true);
  16430. * activeSheet.conditionalFormats.addRule(top);
  16431. */
  16432. ruleType(value?: GC.Spread.Sheets.ConditionalFormatting.RuleType): any;
  16433. /**
  16434. * Gets or sets whether rules with lower priority are applied before this rule.
  16435. * @param {boolean} value Whether rules with lower priority are applied before this rule.
  16436. * @returns {boolean | GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} If no value is set, returns whether the rules with lower priority are not applied before this rule; otherwise, returns the condition rule.
  16437. * @example
  16438. * //This example applies multiple rules.
  16439. * activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
  16440. * var style = new GC.Spread.Sheets.Style();
  16441. * style.backColor = "red";
  16442. * style.foreColor = "black";
  16443. * var cell = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  16444. * cell.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  16445. * cell.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan);
  16446. * cell.value1(5);
  16447. * cell.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  16448. * cell.style(style);
  16449. * activeSheet.conditionalFormats.addRule(cell);
  16450. * var style1 = new GC.Spread.Sheets.Style();
  16451. * style1.foreColor = "red";
  16452. * var top = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  16453. * top.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.top10Rule);
  16454. * top.type(GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType.top);
  16455. * top.rank(3);
  16456. * top.style(style1);
  16457. * top.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  16458. * top.stopIfTrue(true);
  16459. * activeSheet.conditionalFormats.addRule(top);
  16460. */
  16461. stopIfTrue(value?: boolean): any;
  16462. /**
  16463. * Gets or sets the style for the rule.
  16464. * @param {GC.Spread.Sheets.Style} value The style for the rule.
  16465. * @returns {GC.Spread.Sheets.Style | GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase} If no value is set, returns the style for the rule; otherwise, returns the condition rule.
  16466. * @example
  16467. * //This example applies multiple rules.
  16468. * activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
  16469. * var style = new GC.Spread.Sheets.Style();
  16470. * style.backColor = "red";
  16471. * style.foreColor = "black";
  16472. * var cell = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  16473. * cell.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  16474. * cell.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan);
  16475. * cell.value1(5);
  16476. * cell.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  16477. * cell.style(style);
  16478. * activeSheet.conditionalFormats.addRule(cell);
  16479. * var style1 = new GC.Spread.Sheets.Style();
  16480. * style1.foreColor = "red";
  16481. * var top = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  16482. * top.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.top10Rule);
  16483. * top.type(GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType.top);
  16484. * top.rank(3);
  16485. * top.style(style1);
  16486. * top.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  16487. * top.stopIfTrue(true);
  16488. * activeSheet.conditionalFormats.addRule(top);
  16489. */
  16490. style(value?: GC.Spread.Sheets.Style): any;
  16491. }
  16492. export class DataBarRule extends ConditionRuleBase{
  16493. /**
  16494. * Represents a data bar conditional rule with the specified parameters.
  16495. * @extends GC.Spread.Sheets.ConditionalFormatting.ScaleRule
  16496. * @param {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType} minType The minimum scale type.
  16497. * @param {number | string} minValue The minimum scale value.
  16498. * @param {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType} maxType The maximum scale type.
  16499. * @param {number | string} maxValue The maximum scale value.
  16500. * @param {string} color The fill color of the data bar.
  16501. * @param {Array.<GC.Spread.Sheets.Range>} ranges The data bar rule effected range.
  16502. * @class
  16503. * @example
  16504. * //This example creates a data bar rule.
  16505. * activeSheet.setValue(0,0,1,3);
  16506. * activeSheet.setValue(1,0,15,3);
  16507. * activeSheet.setValue(2,0,25,3);
  16508. * activeSheet.setValue(3,0,-1,3);
  16509. * var dataBarRule = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number, -1, GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number, 40, "green", [new GC.Spread.Sheets.Range(0,0,4,1)]);
  16510. * dataBarRule.color("green");
  16511. * dataBarRule.showBorder(true);
  16512. * dataBarRule.borderColor("orange");
  16513. * dataBarRule.dataBarDirection(GC.Spread.Sheets.ConditionalFormatting.BarDirection.leftToRight);
  16514. * dataBarRule.negativeFillColor("yellow");
  16515. * dataBarRule.useNegativeFillColor(true);
  16516. * dataBarRule.negativeBorderColor("red");
  16517. * dataBarRule.useNegativeBorderColor(true);
  16518. * dataBarRule.axisPosition(GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition.automatic);
  16519. * dataBarRule.axisColor("blue");
  16520. * dataBarRule.showBarOnly(false);
  16521. * activeSheet.conditionalFormats.addRule(dataBarRule);
  16522. */
  16523. constructor(minType: GC.Spread.Sheets.ConditionalFormatting.ScaleValueType, minValue: number | string, maxType: GC.Spread.Sheets.ConditionalFormatting.ScaleValueType, maxValue: number | string, color: string, ranges: GC.Spread.Sheets.Range[]);
  16524. /**
  16525. * Gets or sets the axis color of the data bar.
  16526. * @param {string} value The axis color of the data bar.
  16527. * @returns {string | GC.Spread.Sheets.ConditionalFormatting.DataBarRule} If no value is set, returns the axis color of the data bar; otherwise, returns the data bar rule.
  16528. * @example
  16529. * //This example uses the axisColor method.
  16530. * activeSheet.setValue(0,0,1,3);
  16531. * activeSheet.setValue(1,0,15,3);
  16532. * activeSheet.setValue(2,0,25,3);
  16533. * activeSheet.setValue(3,0,-1,3);
  16534. * //rule
  16535. * var dataBarRule = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule();
  16536. * dataBarRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  16537. * dataBarRule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16538. * dataBarRule.minValue(-1);
  16539. * dataBarRule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16540. * dataBarRule.maxValue(40);
  16541. * dataBarRule.color("green");
  16542. * dataBarRule.showBorder(true);
  16543. * dataBarRule.borderColor("orange");
  16544. * dataBarRule.dataBarDirection(GC.Spread.Sheets.ConditionalFormatting.BarDirection.leftToRight);
  16545. * dataBarRule.negativeFillColor("yellow");
  16546. * dataBarRule.useNegativeFillColor(true);
  16547. * dataBarRule.negativeBorderColor("red");
  16548. * dataBarRule.useNegativeBorderColor(true);
  16549. * dataBarRule.axisPosition(GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition.automatic);
  16550. * dataBarRule.axisColor("blue");
  16551. * dataBarRule.showBarOnly(false);
  16552. * activeSheet.conditionalFormats.addRule(dataBarRule);
  16553. */
  16554. axisColor(value?: string): any;
  16555. /**
  16556. * Gets or sets the axis position of the data bar.
  16557. * @param {GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition} value The axis position of the data bar.
  16558. * @returns {GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition | GC.Spread.Sheets.ConditionalFormatting.DataBarRule} If no value is set, returns the axis position of the data bar; otherwise, returns the data bar rule.
  16559. * @example
  16560. * //This example uses the axisPosition method.
  16561. * activeSheet.setValue(0,0,1,3);
  16562. * activeSheet.setValue(1,0,15,3);
  16563. * activeSheet.setValue(2,0,25,3);
  16564. * activeSheet.setValue(3,0,-1,3);
  16565. * //rule
  16566. * var dataBarRule = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule();
  16567. * dataBarRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  16568. * dataBarRule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16569. * dataBarRule.minValue(-1);
  16570. * dataBarRule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16571. * dataBarRule.maxValue(40);
  16572. * dataBarRule.color("green");
  16573. * dataBarRule.showBorder(true);
  16574. * dataBarRule.borderColor("orange");
  16575. * dataBarRule.dataBarDirection(GC.Spread.Sheets.ConditionalFormatting.BarDirection.leftToRight);
  16576. * dataBarRule.negativeFillColor("yellow");
  16577. * dataBarRule.useNegativeFillColor(true);
  16578. * dataBarRule.negativeBorderColor("red");
  16579. * dataBarRule.useNegativeBorderColor(true);
  16580. * dataBarRule.axisPosition(GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition.automatic);
  16581. * dataBarRule.axisColor("blue");
  16582. * dataBarRule.showBarOnly(false);
  16583. * activeSheet.conditionalFormats.addRule(dataBarRule);
  16584. */
  16585. axisPosition(value?: GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition): any;
  16586. /**
  16587. * Gets or sets the color of the border.
  16588. * @param {string} value The color of the border.
  16589. * @returns {string | GC.Spread.Sheets.ConditionalFormatting.DataBarRule} If no value is set, returns the color of the border; otherwise, returns the data bar rule.
  16590. * @example
  16591. * //This example uses the borderColor method.
  16592. * activeSheet.setValue(0,0,1,3);
  16593. * activeSheet.setValue(1,0,15,3);
  16594. * activeSheet.setValue(2,0,25,3);
  16595. * activeSheet.setValue(3,0,-1,3);
  16596. * //rule
  16597. * var dataBarRule = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule();
  16598. * dataBarRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  16599. * dataBarRule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16600. * dataBarRule.minValue(-1);
  16601. * dataBarRule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16602. * dataBarRule.maxValue(40);
  16603. * dataBarRule.color("green");
  16604. * dataBarRule.showBorder(true);
  16605. * dataBarRule.borderColor("orange");
  16606. * dataBarRule.dataBarDirection(GC.Spread.Sheets.ConditionalFormatting.BarDirection.leftToRight);
  16607. * dataBarRule.negativeFillColor("yellow");
  16608. * dataBarRule.useNegativeFillColor(true);
  16609. * dataBarRule.negativeBorderColor("red");
  16610. * dataBarRule.useNegativeBorderColor(true);
  16611. * dataBarRule.axisPosition(GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition.automatic);
  16612. * dataBarRule.axisColor("blue");
  16613. * dataBarRule.showBarOnly(false);
  16614. * activeSheet.conditionalFormats.addRule(dataBarRule);
  16615. */
  16616. borderColor(value?: string): any;
  16617. /**
  16618. * Gets or sets the postive fill color of the data bar.
  16619. * @param {string} value The fill color.
  16620. * @returns {string | GC.Spread.Sheets.ConditionalFormatting.DataBarRule} If no value is set, returns the postive fill color of the data bar; otherwise, returns the data bar rule.
  16621. * @example
  16622. * //This example uses the color method.
  16623. * activeSheet.setValue(0,0,1,3);
  16624. * activeSheet.setValue(1,0,15,3);
  16625. * activeSheet.setValue(2,0,25,3);
  16626. * activeSheet.setValue(3,0,-1,3);
  16627. * //rule
  16628. * var dataBarRule = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule();
  16629. * dataBarRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  16630. * dataBarRule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16631. * dataBarRule.minValue(-1);
  16632. * dataBarRule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16633. * dataBarRule.maxValue(40);
  16634. * dataBarRule.color("green");
  16635. * dataBarRule.showBorder(true);
  16636. * dataBarRule.borderColor("orange");
  16637. * dataBarRule.dataBarDirection(GC.Spread.Sheets.ConditionalFormatting.BarDirection.leftToRight);
  16638. * dataBarRule.negativeFillColor("yellow");
  16639. * dataBarRule.useNegativeFillColor(true);
  16640. * dataBarRule.negativeBorderColor("red");
  16641. * dataBarRule.useNegativeBorderColor(true);
  16642. * dataBarRule.axisPosition(GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition.automatic);
  16643. * dataBarRule.axisColor("blue");
  16644. * dataBarRule.showBarOnly(false);
  16645. * activeSheet.conditionalFormats.addRule(dataBarRule);
  16646. */
  16647. color(value?: string): any;
  16648. /**
  16649. * Gets or sets the data bar direction.
  16650. * @param {GC.Spread.Sheets.ConditionalFormatting.BarDirection} value The data bar direction.
  16651. * @returns {GC.Spread.Sheets.ConditionalFormatting.BarDirection | GC.Spread.Sheets.ConditionalFormatting.DataBarRule} If no value is set, returns the data bar direction; otherwise, returns the data bar rule.
  16652. * @example
  16653. * //This example uses the dataBarDirection method.
  16654. * activeSheet.setValue(0,0,1,3);
  16655. * activeSheet.setValue(1,0,15,3);
  16656. * activeSheet.setValue(2,0,25,3);
  16657. * activeSheet.setValue(3,0,-1,3);
  16658. * //rule
  16659. * var dataBarRule = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule();
  16660. * dataBarRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  16661. * dataBarRule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16662. * dataBarRule.minValue(-1);
  16663. * dataBarRule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16664. * dataBarRule.maxValue(40);
  16665. * dataBarRule.color("green");
  16666. * dataBarRule.showBorder(true);
  16667. * dataBarRule.borderColor("orange");
  16668. * dataBarRule.dataBarDirection(GC.Spread.Sheets.ConditionalFormatting.BarDirection.leftToRight);
  16669. * dataBarRule.negativeFillColor("yellow");
  16670. * dataBarRule.useNegativeFillColor(true);
  16671. * dataBarRule.negativeBorderColor("red");
  16672. * dataBarRule.useNegativeBorderColor(true);
  16673. * dataBarRule.axisPosition(GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition.automatic);
  16674. * dataBarRule.axisColor("blue");
  16675. * dataBarRule.showBarOnly(false);
  16676. * activeSheet.conditionalFormats.addRule(dataBarRule);
  16677. */
  16678. dataBarDirection(value?: GC.Spread.Sheets.ConditionalFormatting.BarDirection): any;
  16679. /**
  16680. * Returns the specified value of the rule if the cell meets the condition.
  16681. * @param {Object} evaluator The evaluator.
  16682. * @param {number} baseRow The row index.
  16683. * @param {number} baseColumn The column index.
  16684. * @param {Object} actual The current value.
  16685. * @returns {Object} The specified value of the rule if the cell meets the condition.
  16686. */
  16687. evaluate(evaluator: Object, baseRow: number, baseColumn: number, actual: Object): any;
  16688. /**
  16689. * Gets or sets a value that indicates whether the data bar is a gradient.
  16690. * @param {boolean} value Whether the data bar is a gradient.
  16691. * @returns {boolean | GC.Spread.Sheets.ConditionalFormatting.DataBarRule} If no value is set, returns the value that indicates whether the data bar is a gradient; otherwise, returns the data bar rule.
  16692. * @example
  16693. * //This example uses the gradient method.
  16694. * activeSheet.setValue(0,0,1,3);
  16695. * activeSheet.setValue(1,0,15,3);
  16696. * activeSheet.setValue(2,0,25,3);
  16697. * activeSheet.setValue(3,0,-1,3);
  16698. * var dataBarRule = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule();
  16699. * dataBarRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  16700. * dataBarRule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16701. * dataBarRule.minValue(-1);
  16702. * dataBarRule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16703. * dataBarRule.maxValue(40);
  16704. * dataBarRule.color("green");
  16705. * dataBarRule.showBorder(true);
  16706. * dataBarRule.borderColor("orange");
  16707. * dataBarRule.dataBarDirection(GC.Spread.Sheets.ConditionalFormatting.BarDirection.leftToRight);
  16708. * dataBarRule.negativeFillColor("yellow");
  16709. * dataBarRule.useNegativeFillColor(true);
  16710. * dataBarRule.negativeBorderColor("red");
  16711. * dataBarRule.useNegativeBorderColor(true);
  16712. * dataBarRule.axisPosition(GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition.automatic);
  16713. * dataBarRule.axisColor("blue");
  16714. * dataBarRule.showBarOnly(false);
  16715. * dataBarRule.gradient(false);
  16716. * activeSheet.conditionalFormats.addRule(dataBarRule);
  16717. */
  16718. gradient(value?: boolean): any;
  16719. /**
  16720. * Gets or sets the color of the negative border.
  16721. * @param {string} value The color of the negative boreder.
  16722. * @returns {string | GC.Spread.Sheets.ConditionalFormatting.DataBarRule} If no value is set, returns the color of the negative border; otherwise, returns the data bar rule.
  16723. * @example
  16724. * //This example uses the negativeBorderColor method.
  16725. * activeSheet.setValue(0,0,1,3);
  16726. * activeSheet.setValue(1,0,15,3);
  16727. * activeSheet.setValue(2,0,25,3);
  16728. * activeSheet.setValue(3,0,-1,3);
  16729. * var dataBarRule = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule();
  16730. * dataBarRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  16731. * dataBarRule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16732. * dataBarRule.minValue(-1);
  16733. * dataBarRule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16734. * dataBarRule.maxValue(40);
  16735. * dataBarRule.color("green");
  16736. * dataBarRule.showBorder(true);
  16737. * dataBarRule.borderColor("orange");
  16738. * dataBarRule.dataBarDirection(GC.Spread.Sheets.ConditionalFormatting.BarDirection.leftToRight);
  16739. * dataBarRule.negativeFillColor("yellow");
  16740. * dataBarRule.useNegativeFillColor(true);
  16741. * dataBarRule.negativeBorderColor("red");
  16742. * dataBarRule.useNegativeBorderColor(true);
  16743. * dataBarRule.axisPosition(GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition.automatic);
  16744. * dataBarRule.axisColor("blue");
  16745. * dataBarRule.showBarOnly(false);
  16746. * activeSheet.conditionalFormats.addRule(dataBarRule);
  16747. */
  16748. negativeBorderColor(value?: string): any;
  16749. /**
  16750. * Gets or sets the color of the negative fill.
  16751. * @param {string} value The color of the negative fill.
  16752. * @returns {string | GC.Spread.Sheets.ConditionalFormatting.DataBarRule} If no value is set, returns the color of the negative fill; otherwise, returns the data bar rule.
  16753. * @example
  16754. * //This example uses the negativeFillColor method.
  16755. * activeSheet.setValue(0,0,1,3);
  16756. * activeSheet.setValue(1,0,15,3);
  16757. * activeSheet.setValue(2,0,25,3);
  16758. * activeSheet.setValue(3,0,-1,3);
  16759. * var dataBarRule = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule();
  16760. * dataBarRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  16761. * dataBarRule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16762. * dataBarRule.minValue(-1);
  16763. * dataBarRule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16764. * dataBarRule.maxValue(40);
  16765. * dataBarRule.color("green");
  16766. * dataBarRule.showBorder(true);
  16767. * dataBarRule.borderColor("orange");
  16768. * dataBarRule.dataBarDirection(GC.Spread.Sheets.ConditionalFormatting.BarDirection.leftToRight);
  16769. * dataBarRule.negativeFillColor("yellow");
  16770. * dataBarRule.useNegativeFillColor(true);
  16771. * dataBarRule.negativeBorderColor("red");
  16772. * dataBarRule.useNegativeBorderColor(true);
  16773. * dataBarRule.axisPosition(GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition.automatic);
  16774. * dataBarRule.axisColor("blue");
  16775. * dataBarRule.showBarOnly(false);
  16776. * activeSheet.conditionalFormats.addRule(dataBarRule);
  16777. */
  16778. negativeFillColor(value?: string): any;
  16779. /**
  16780. * Gets or sets whether to display the data bar without text.
  16781. * @param {boolean} value Whether to display the data bar without text.
  16782. * @returns {boolean | GC.Spread.Sheets.ConditionalFormatting.DataBarRule} If no value is set, returns whether the widget displays the data bar without text; otherwise, returns the data bar rule.
  16783. * @example
  16784. * //This example uses the showBarOnly method.
  16785. * activeSheet.setValue(0,0,1,3);
  16786. * activeSheet.setValue(1,0,15,3);
  16787. * activeSheet.setValue(2,0,25,3);
  16788. * activeSheet.setValue(3,0,-1,3);
  16789. * var dataBarRule = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule();
  16790. * dataBarRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  16791. * dataBarRule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16792. * dataBarRule.minValue(-1);
  16793. * dataBarRule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16794. * dataBarRule.maxValue(40);
  16795. * dataBarRule.color("green");
  16796. * dataBarRule.showBorder(true);
  16797. * dataBarRule.borderColor("orange");
  16798. * dataBarRule.dataBarDirection(GC.Spread.Sheets.ConditionalFormatting.BarDirection.leftToRight);
  16799. * dataBarRule.negativeFillColor("yellow");
  16800. * dataBarRule.useNegativeFillColor(true);
  16801. * dataBarRule.negativeBorderColor("red");
  16802. * dataBarRule.useNegativeBorderColor(true);
  16803. * dataBarRule.axisPosition(GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition.automatic);
  16804. * dataBarRule.axisColor("blue");
  16805. * dataBarRule.showBarOnly(false);
  16806. * activeSheet.conditionalFormats.addRule(dataBarRule);
  16807. */
  16808. showBarOnly(value?: boolean): any;
  16809. /**
  16810. * Gets or sets a value that indicates whether to paint the border.
  16811. * @param {boolean} value Whether to paint the border.
  16812. * @returns {boolean | GC.Spread.Sheets.ConditionalFormatting.DataBarRule} If no value is set, returns the value that indicates whether to paint the border; otherwise, returns the data bar rule.
  16813. * @example
  16814. * //This example uses the showBorder method.
  16815. * activeSheet.setValue(0,0,1,3);
  16816. * activeSheet.setValue(1,0,15,3);
  16817. * activeSheet.setValue(2,0,25,3);
  16818. * activeSheet.setValue(3,0,-1,3);
  16819. * var dataBarRule = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule();
  16820. * dataBarRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  16821. * dataBarRule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16822. * dataBarRule.minValue(-1);
  16823. * dataBarRule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16824. * dataBarRule.maxValue(40);
  16825. * dataBarRule.color("green");
  16826. * dataBarRule.showBorder(true);
  16827. * dataBarRule.borderColor("orange");
  16828. * dataBarRule.dataBarDirection(GC.Spread.Sheets.ConditionalFormatting.BarDirection.leftToRight);
  16829. * dataBarRule.negativeFillColor("yellow");
  16830. * dataBarRule.useNegativeFillColor(true);
  16831. * dataBarRule.negativeBorderColor("red");
  16832. * dataBarRule.useNegativeBorderColor(true);
  16833. * dataBarRule.axisPosition(GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition.automatic);
  16834. * dataBarRule.axisColor("blue");
  16835. * dataBarRule.showBarOnly(false);
  16836. * activeSheet.conditionalFormats.addRule(dataBarRule);
  16837. */
  16838. showBorder(value?: boolean): any;
  16839. /**
  16840. * Gets or sets a value that indicates whether the negative border color is used to paint the border for the negative value.
  16841. * @param {boolean} value Whether the negative border color is used to paint the border for the negative value.
  16842. * @returns {boolean | GC.Spread.Sheets.ConditionalFormatting.DataBarRule} If no value is set, returns the value that indicates whether the negative border color is used to paint the border for the negative value; otherwise, returns the data bar rule.
  16843. * @example
  16844. * //This example uses the useNegativeBorderColor method.
  16845. * activeSheet.setValue(0,0,1,3);
  16846. * activeSheet.setValue(1,0,15,3);
  16847. * activeSheet.setValue(2,0,25,3);
  16848. * activeSheet.setValue(3,0,-1,3);
  16849. * var dataBarRule = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule();
  16850. * dataBarRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  16851. * dataBarRule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16852. * dataBarRule.minValue(-1);
  16853. * dataBarRule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16854. * dataBarRule.maxValue(40);
  16855. * dataBarRule.color("green");
  16856. * dataBarRule.showBorder(true);
  16857. * dataBarRule.borderColor("orange");
  16858. * dataBarRule.dataBarDirection(GC.Spread.Sheets.ConditionalFormatting.BarDirection.leftToRight);
  16859. * dataBarRule.negativeFillColor("yellow");
  16860. * dataBarRule.useNegativeFillColor(true);
  16861. * dataBarRule.negativeBorderColor("red");
  16862. * dataBarRule.useNegativeBorderColor(true);
  16863. * dataBarRule.axisPosition(GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition.automatic);
  16864. * dataBarRule.axisColor("blue");
  16865. * dataBarRule.showBarOnly(false);
  16866. * activeSheet.conditionalFormats.addRule(dataBarRule);
  16867. */
  16868. useNegativeBorderColor(value?: boolean): any;
  16869. /**
  16870. * Gets or sets a value that indicates whether the negative fill color is used to paint the negative value.
  16871. * @param {boolean} value Whether the negative fill color is used to paint the negative value.
  16872. * @returns {boolean | GC.Spread.Sheets.ConditionalFormatting.DataBarRule} If no value is set, returns the value that indicates whether the negative fill color is used to paint the negative value; otherwise, returns the data bar rule.
  16873. * @example
  16874. * //This example uses the useNegativeFillColor method.
  16875. * activeSheet.setValue(0,0,1,3);
  16876. * activeSheet.setValue(1,0,15,3);
  16877. * activeSheet.setValue(2,0,25,3);
  16878. * activeSheet.setValue(3,0,-1,3);
  16879. * var dataBarRule = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule();
  16880. * dataBarRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  16881. * dataBarRule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16882. * dataBarRule.minValue(-1);
  16883. * dataBarRule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  16884. * dataBarRule.maxValue(40);
  16885. * dataBarRule.color("green");
  16886. * dataBarRule.showBorder(true);
  16887. * dataBarRule.borderColor("orange");
  16888. * dataBarRule.dataBarDirection(GC.Spread.Sheets.ConditionalFormatting.BarDirection.leftToRight);
  16889. * dataBarRule.negativeFillColor("yellow");
  16890. * dataBarRule.useNegativeFillColor(true);
  16891. * dataBarRule.negativeBorderColor("red");
  16892. * dataBarRule.useNegativeBorderColor(true);
  16893. * dataBarRule.axisPosition(GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition.automatic);
  16894. * dataBarRule.axisColor("blue");
  16895. * dataBarRule.showBarOnly(false);
  16896. * activeSheet.conditionalFormats.addRule(dataBarRule);
  16897. */
  16898. useNegativeFillColor(value?: boolean): any;
  16899. }
  16900. export class IconCriterion{
  16901. /**
  16902. * Represents an icon criteria with the specified parameters.
  16903. * @class
  16904. * @param {boolean} isGreaterThanOrEqualTo If set to true, use the greater than or equal to operator to calculate the value.
  16905. * @param {GC.Spread.Sheets.ConditionalFormatting.IconValueType} iconValueType The type of scale value.
  16906. * @param {Object} iconValue The scale value.
  16907. * @example
  16908. * //This example creates an icon rule.
  16909. * activeSheet.setValue(0,0,1,3);
  16910. * activeSheet.setValue(1,0,15,3);
  16911. * activeSheet.setValue(2,0,25,3);
  16912. * activeSheet.setValue(3,0,-1,3);
  16913. * //rule
  16914. * var iconSetRule = new GC.Spread.Sheets.ConditionalFormatting.IconSetRule();
  16915. * iconSetRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  16916. * iconSetRule.iconSetType(GC.Spread.Sheets.ConditionalFormatting.IconSetType.fourTrafficLights);
  16917. * var iconCriteria = iconSetRule.iconCriteria();
  16918. * iconCriteria[0] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 1);
  16919. * iconCriteria[1] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 10);
  16920. * iconCriteria[2] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 20);
  16921. * iconSetRule.reverseIconOrder(false);
  16922. * iconSetRule.showIconOnly(false);
  16923. * activeSheet.conditionalFormats.addRule(iconSetRule);
  16924. */
  16925. constructor(isGreaterThanOrEqualTo: boolean, iconValueType: IconValueType, iconValue: Object);
  16926. }
  16927. export class IconSetRule extends ConditionRuleBase{
  16928. /**
  16929. * Represents an icon set rule with the specified parameters.
  16930. * @class
  16931. * @extends GC.Spread.Sheets.ConditionalFormatting.ScaleRule
  16932. * @param {GC.Spread.Sheets.ConditionalFormatting.IconSetType} iconSetType The type of icon set.
  16933. * @param {Array.<GC.Spread.Sheets.Range>} ranges
  16934. * @example
  16935. * //This example creates a new icon set rule and sets the range and icon for it.
  16936. * activeSheet.setValue(0,0,1,3);
  16937. * activeSheet.setValue(1,0,15,3);
  16938. * activeSheet.setValue(2,0,25,3);
  16939. * activeSheet.setValue(3,0,-1,3);
  16940. * var iconSetRule = new GC.Spread.Sheets.ConditionalFormatting.IconSetRule();
  16941. * iconSetRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  16942. * iconSetRule.iconSetType(GC.Spread.Sheets.ConditionalFormatting.IconSetType.fourTrafficLights);
  16943. * var icons = iconSetRule.icons();
  16944. * icons[0] = {iconSetType: GC.Spread.Sheets.ConditionalFormatting.IconSetType.fiveArrowsColored, iconIndex: 1};
  16945. * icons[1] = {iconSetType: GC.Spread.Sheets.ConditionalFormatting.IconSetType.fiveArrowsColored, iconIndex: 2};
  16946. * icons[2] = {iconSetType: GC.Spread.Sheets.ConditionalFormatting.IconSetType.noIcons, iconIndex: 0};
  16947. *
  16948. * var iconCriteria = iconSetRule.iconCriteria();
  16949. * iconCriteria[0] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 1);
  16950. * iconCriteria[1] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 10);
  16951. * iconCriteria[2] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 20);
  16952. * iconSetRule.reverseIconOrder(false);
  16953. * iconSetRule.showIconOnly(false);
  16954. * activeSheet.conditionalFormats.addRule(iconSetRule);
  16955. */
  16956. constructor(iconSetType: IconSetType, ranges: GC.Spread.Sheets.Range[]);
  16957. /**
  16958. * Returns the specified value of the rule if the cell meets the condition.
  16959. * @param {Object} evaluator The evaluator.
  16960. * @param {number} baseRow The row index.
  16961. * @param {number} baseColumn The column index.
  16962. * @param {Object} actual The current value.
  16963. * @returns {Object} The specified value of the rule if the cell meets the condition.
  16964. */
  16965. evaluate(evaluator: Object, baseRow: number, baseColumn: number, actual: Object): any;
  16966. /**
  16967. * Gets the icon criteria.
  16968. * @returns {Array.<GC.Spread.Sheets.ConditionalFormatting.IconCriterion>} Returns the icon criterias whose item type is GC.Spread.Sheets.ConditionalFormatting.IconCriterion.
  16969. * @example
  16970. * //This example creates a rule.
  16971. * activeSheet.setValue(0,0,1,3);
  16972. * activeSheet.setValue(1,0,15,3);
  16973. * activeSheet.setValue(2,0,25,3);
  16974. * activeSheet.setValue(3,0,-1,3);
  16975. * //rule
  16976. * var iconSetRule = new GC.Spread.Sheets.ConditionalFormatting.IconSetRule();
  16977. * iconSetRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  16978. * iconSetRule.iconSetType(GC.Spread.Sheets.ConditionalFormatting.IconSetType.fourTrafficLights);
  16979. * var iconCriteria = iconSetRule.iconCriteria();
  16980. * iconCriteria[0] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 1);
  16981. * iconCriteria[1] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 10);
  16982. * iconCriteria[2] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 20);
  16983. * iconSetRule.reverseIconOrder(false);
  16984. * iconSetRule.showIconOnly(false);
  16985. * activeSheet.conditionalFormats.addRule(iconSetRule);
  16986. */
  16987. iconCriteria(): GC.Spread.Sheets.ConditionalFormatting.IconCriterion[];
  16988. /**
  16989. * Gets or sets the icons.
  16990. * @param {object[]} [iconInfos] - Sets the iconInfos array.
  16991. * @param {GC.Spread.Sheets.ConditionalFormatting.IconSetType} iconInfos.iconSetType - The custom iconSetType
  16992. * @param {number} iconInfos.iconIndex - The custom iconIndex
  16993. * @returns {object[]} Returns the iconInfos array.
  16994. * @example
  16995. * //This example creates a rule.
  16996. * activeSheet.setValue(0,0,1,3);
  16997. * activeSheet.setValue(1,0,15,3);
  16998. * activeSheet.setValue(2,0,25,3);
  16999. * activeSheet.setValue(3,0,-1,3);
  17000. *
  17001. * //rule
  17002. * var iconSetRule = new GC.Spread.Sheets.ConditionalFormatting.IconSetRule();
  17003. * iconSetRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  17004. * iconSetRule.iconSetType(GC.Spread.Sheets.ConditionalFormatting.IconSetType.fourTrafficLights);
  17005. * var icons = iconSetRule.icons();
  17006. * icons[0] = {iconSetType: GC.Spread.Sheets.ConditionalFormatting.IconSetType.fiveArrowsColored, iconIndex: 1};
  17007. * icons[1] = {iconSetType: GC.Spread.Sheets.ConditionalFormatting.IconSetType.fiveArrowsColored, iconIndex: 2};
  17008. * icons[2] = {iconSetType: GC.Spread.Sheets.ConditionalFormatting.IconSetType.noIcons, iconIndex: 0};
  17009. * iconSetRule.reverseIconOrder(false);
  17010. * iconSetRule.showIconOnly(false);
  17011. * activeSheet.conditionalFormats.addRule(iconSetRule);
  17012. */
  17013. icons(value?: GC.Spread.Sheets.ConditionalFormatting.IIconInfo[]): GC.Spread.Sheets.ConditionalFormatting.IIconInfo[];
  17014. /**
  17015. * Gets or sets the type of icon set.
  17016. * @param {GC.Spread.Sheets.ConditionalFormatting.IconSetType} value The type of icon set.
  17017. * @returns {GC.Spread.Sheets.ConditionalFormatting.IconSetType | GC.Spread.Sheets.ConditionalFormatting.IconSetRule} If no value is set, returns the type of icon set; otherwise, returns the icon set rule.
  17018. * @example
  17019. * //This example creates a rule.
  17020. * activeSheet.setValue(0,0,1,3);
  17021. * activeSheet.setValue(1,0,15,3);
  17022. * activeSheet.setValue(2,0,25,3);
  17023. * activeSheet.setValue(3,0,-1,3);
  17024. * //rule
  17025. * var iconSetRule = new GC.Spread.Sheets.ConditionalFormatting.IconSetRule();
  17026. * iconSetRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  17027. * iconSetRule.iconSetType(GC.Spread.Sheets.ConditionalFormatting.IconSetType.fourTrafficLights);
  17028. * var iconCriteria = iconSetRule.iconCriteria();
  17029. * iconCriteria[0] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 1);
  17030. * iconCriteria[1] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 10);
  17031. * iconCriteria[2] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 20);
  17032. * iconSetRule.reverseIconOrder(false);
  17033. * iconSetRule.showIconOnly(false);
  17034. * activeSheet.conditionalFormats.addRule(iconSetRule);
  17035. */
  17036. iconSetType(value?: GC.Spread.Sheets.ConditionalFormatting.IconSetType): any;
  17037. /**
  17038. * Resets the rule.
  17039. * @example
  17040. * //This example uses the reset method.
  17041. * activeSheet.setValue(0,0,1,3);
  17042. * activeSheet.setValue(1,0,15,3);
  17043. * activeSheet.setValue(2,0,25,3);
  17044. * activeSheet.setValue(3,0,-1,3);
  17045. * //rule
  17046. * var iconSetRule = new GC.Spread.Sheets.ConditionalFormatting.IconSetRule();
  17047. * iconSetRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  17048. * iconSetRule.iconSetType(GC.Spread.Sheets.ConditionalFormatting.IconSetType.fourTrafficLights);
  17049. * var iconCriteria = iconSetRule.iconCriteria();
  17050. * iconCriteria[0] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 1);
  17051. * iconCriteria[1] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 10);
  17052. * iconCriteria[2] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 20);
  17053. * iconSetRule.reverseIconOrder(false);
  17054. * iconSetRule.showIconOnly(false);
  17055. * activeSheet.conditionalFormats.addRule(iconSetRule);
  17056. * iconSetRule.reset();
  17057. */
  17058. reset(): void;
  17059. /**
  17060. * Gets or sets whether to reverse icon order.
  17061. * @param {boolean} value Whether to reverse icon order.
  17062. * @returns {boolean | GC.Spread.Sheets.ConditionalFormatting.IconSetRule} If no value is set, returns the value that indicates whether to reverse icon order; otherwise, returns the icon set rule.
  17063. * @example
  17064. * //This example creates a rule.
  17065. * activeSheet.setValue(0,0,1,3);
  17066. * activeSheet.setValue(1,0,15,3);
  17067. * activeSheet.setValue(2,0,25,3);
  17068. * activeSheet.setValue(3,0,-1,3);
  17069. * //rule
  17070. * var iconSetRule = new GC.Spread.Sheets.ConditionalFormatting.IconSetRule();
  17071. * iconSetRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  17072. * iconSetRule.iconSetType(GC.Spread.Sheets.ConditionalFormatting.IconSetType.fourTrafficLights);
  17073. * var iconCriteria = iconSetRule.iconCriteria();
  17074. * iconCriteria[0] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 1);
  17075. * iconCriteria[1] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 10);
  17076. * iconCriteria[2] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 20);
  17077. * iconSetRule.reverseIconOrder(false);
  17078. * iconSetRule.showIconOnly(false);
  17079. * activeSheet.conditionalFormats.addRule(iconSetRule);
  17080. */
  17081. reverseIconOrder(value?: boolean): any;
  17082. /**
  17083. * Gets or sets whether to display the icon only.
  17084. * @param {boolean} value Whether to display the icon only.
  17085. * @returns {boolean | GC.Spread.Sheets.ConditionalFormatting.IconSetRule} If no value is set, returns the value that indicates whether to display the icon only; otherwise, returns the icon set rule.
  17086. * @example
  17087. * //This example creates a rule.
  17088. * activeSheet.setValue(0,0,1,3);
  17089. * activeSheet.setValue(1,0,15,3);
  17090. * activeSheet.setValue(2,0,25,3);
  17091. * activeSheet.setValue(3,0,-1,3);
  17092. * //rule
  17093. * var iconSetRule = new GC.Spread.Sheets.ConditionalFormatting.IconSetRule();
  17094. * iconSetRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  17095. * iconSetRule.iconSetType(GC.Spread.Sheets.ConditionalFormatting.IconSetType.fourTrafficLights);
  17096. * var iconCriteria = iconSetRule.iconCriteria();
  17097. * iconCriteria[0] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 1);
  17098. * iconCriteria[1] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 10);
  17099. * iconCriteria[2] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(true, GC.Spread.Sheets.ConditionalFormatting.IconValueType.number, 20);
  17100. * iconSetRule.reverseIconOrder(false);
  17101. * iconSetRule.showIconOnly(false);
  17102. * activeSheet.conditionalFormats.addRule(iconSetRule);
  17103. */
  17104. showIconOnly(value?: boolean): any;
  17105. }
  17106. export class NormalConditionRule extends ConditionRuleBase{
  17107. /**
  17108. * Represents a normal conditional rule.
  17109. * @class
  17110. * @extends GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase
  17111. * @param {GC.Spread.Sheets.ConditionalFormatting.RuleType} ruleType
  17112. * @param {Array.<GC.Spread.Sheets.Range>} ranges The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.
  17113. * @param {GC.Spread.Sheets.Style} style The style that is applied to the cell when the condition is met.
  17114. * @param {GC.Spread.Sheets.ConditionalFormatting.LogicalOperators | GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators | GC.Spread.Sheets.ConditionalFormatting.TextComparisonOperators} operator The comparison operator.
  17115. * @param {Object} value1 The first value.
  17116. * @param {Object} value2 The second value.
  17117. * @param {string} text The text for comparison.
  17118. * @param {string} formula The condition formula.
  17119. * @param {GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType | GC.Spread.Sheets.ConditionalFormatting.AverageConditionType | GC.Spread.Sheets.ConditionalFormatting.DateOccurringType} type The average condition type.
  17120. * @param {number} rank The number of top or bottom items to apply the style to.
  17121. * @constructor
  17122. * @example
  17123. * activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
  17124. * var cell = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  17125. * cell.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  17126. * cell.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan);
  17127. * cell.value1(5);
  17128. * cell.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  17129. * var style = new GC.Spread.Sheets.Style();
  17130. * style.backColor = "red";
  17131. * cell.style(style);
  17132. * activeSheet.conditionalFormats.addRule(cell);
  17133. * //button
  17134. * $("#button1").click(function () {
  17135. * cell.reset();
  17136. * activeSheet.suspendPaint();
  17137. * activeSheet.resumePaint();
  17138. * });
  17139. */
  17140. constructor(ruleType: GC.Spread.Sheets.ConditionalFormatting.RuleType, ranges: GC.Spread.Sheets.Range[], style: GC.Spread.Sheets.Style, operator: GC.Spread.Sheets.ConditionalFormatting.LogicalOperators | GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators | GC.Spread.Sheets.ConditionalFormatting.TextComparisonOperators, value1: Object, value2: Object, text: string, formula: string, type: GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType | GC.Spread.Sheets.ConditionalFormatting.AverageConditionType | GC.Spread.Sheets.ConditionalFormatting.DateOccurringType, rank: number);
  17141. /**
  17142. * Creates a condition for the rule.
  17143. * @returns {GC.Spread.Sheets.ConditionalFormatting.Condition} The condition.
  17144. */
  17145. createCondition(): GC.Spread.Sheets.ConditionalFormatting.Condition;
  17146. /**
  17147. * Gets or sets the condition formula.
  17148. * @param {string | number} formulaOrBaseRow The condition formula or the base row.
  17149. * @param {number} baseColumn The base column.
  17150. * @returns {string | GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule} If no value is set or baseRow and baseColumn is set, returns the condition formula; otherwise, returns the number condition rule.
  17151. * @example
  17152. * //This example uses the formula method.
  17153. * var style = new GC.Spread.Sheets.Style();
  17154. * style.backColor = "red";
  17155. * var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  17156. * rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.formulaRule);
  17157. * rule.formula("=A1=B1+C1");
  17158. * rule.ranges([new GC.Spread.Sheets.Range(0, 0, 2, 1)]);
  17159. * rule.style(style);
  17160. * activeSheet.conditionalFormats.addRule(rule);
  17161. * activeSheet.setValue(0, 0, 2,3);
  17162. * activeSheet.setValue(0, 1, 1,3);
  17163. * activeSheet.setValue(0, 2,1,3);
  17164. * activeSheet.setValue(1, 0, 1,3);
  17165. * var formulaOfTheTopLeftCell = rule.formula();
  17166. * var formulaOfA1 = rule.formula(0, 0);
  17167. * var formulaOfA2 = rule.formula(1, 0);
  17168. */
  17169. formula(formulaOrBaseRow?: string | number, baseColumn ?: number): any;
  17170. /**
  17171. * Gets or sets the comparison operator.
  17172. * @param {GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators} value The comparison operator.
  17173. * @returns {GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators | GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule} If no value is set, returns the comparison operator; otherwise, returns the number condition rule.
  17174. * @example
  17175. * //This example creates multiple rules.
  17176. * activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
  17177. * var style = new GC.Spread.Sheets.Style();
  17178. * style.backColor = "red";
  17179. * style.foreColor = "black";
  17180. * var cell = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  17181. * cell.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  17182. * cell.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan);
  17183. * cell.value1(5);
  17184. * cell.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  17185. * cell.style(style);
  17186. * activeSheet.conditionalFormats.addRule(cell);
  17187. * var style1 = new GC.Spread.Sheets.Style();
  17188. * style1.foreColor = "red";
  17189. * var top = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  17190. * top.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.top10Rule);
  17191. * top.type(GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType.top);
  17192. * top.rank(3);
  17193. * top.style(style1);
  17194. * top.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  17195. * top.stopIfTrue(true);
  17196. * activeSheet.conditionalFormats.addRule(top);
  17197. */
  17198. operator(value?: GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators): any;
  17199. /**
  17200. * Gets or sets the number of top or bottom items to apply the style to.
  17201. * @param {number} value The number of top or bottom items to apply the style to.
  17202. * @returns {number | GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule} If no value is set, returns the number of top or bottom items to apply the style to; otherwise, returns the number condition rule.
  17203. * @example
  17204. * //This example creates multiple rules.
  17205. * activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
  17206. * var style = new GC.Spread.Sheets.Style();
  17207. * style.backColor = "red";
  17208. * style.foreColor = "black";
  17209. * var cell = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  17210. * cell.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  17211. * cell.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan);
  17212. * cell.value1(5);
  17213. * cell.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  17214. * cell.style(style);
  17215. * activeSheet.conditionalFormats.addRule(cell);
  17216. * var style1 = new GC.Spread.Sheets.Style();
  17217. * style1.foreColor = "red";
  17218. * var top = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  17219. * top.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.top10Rule);
  17220. * top.type(GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType.top);
  17221. * top.rank(3);
  17222. * top.style(style1);
  17223. * top.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  17224. * top.stopIfTrue(true);
  17225. * activeSheet.conditionalFormats.addRule(top);
  17226. */
  17227. rank(value?: number): any;
  17228. /**
  17229. * Resets the rule.
  17230. * @example
  17231. * activeSheet.setValue(0,0, 1,3);
  17232. * activeSheet.setValue(1,0, 50,3);
  17233. * activeSheet.setValue(2,0, 100,3);
  17234. * activeSheet.setValue(3,0, 2,3);
  17235. * activeSheet.setValue(4,0, 60,3);
  17236. * activeSheet.setValue(5,0, 90,3);
  17237. * activeSheet.setValue(6,0, 3,3);
  17238. * activeSheet.setValue(7,0, 40,3);
  17239. * activeSheet.setValue(8,0, 70,3);
  17240. * activeSheet.setValue(9,0, 5,3);
  17241. * activeSheet.setValue(10,0, 35,3);
  17242. * var style = new GC.Spread.Sheets.Style();
  17243. * style.backColor = "red";
  17244. * style.borderLeft =new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  17245. * style.borderTop = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  17246. * style.borderRight = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  17247. * style.borderBottom = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
  17248. * var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  17249. * rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.averageRule);
  17250. * rule.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 3)]);
  17251. * rule.style(style);
  17252. * rule.type(GC.Spread.Sheets.ConditionalFormatting.AverageConditionType.above);
  17253. * activeSheet.conditionalFormats.addRule(rule);
  17254. * rule.reset();
  17255. */
  17256. reset(): void;
  17257. /**
  17258. * Gets or sets the text for comparison.
  17259. * @param {string} value The text for comparison.
  17260. * @returns {string | GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule} If no value is set, returns the text for comparison; otherwise, returns the number condition rule.
  17261. * @example
  17262. * //This example creates a rule.
  17263. * var style = new GC.Spread.Sheets.Style();
  17264. * style.backColor = "red";
  17265. * var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  17266. * rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.specificTextRule);
  17267. * rule.style(style);
  17268. * rule.text("test");
  17269. * rule.operator(GC.Spread.Sheets.ConditionalFormatting.TextComparisonOperators.contains);
  17270. * rule.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  17271. * activeSheet.conditionalFormats.addRule(rule);
  17272. * activeSheet.setValue(0, 0, "testing");
  17273. * activeSheet.setValue(1, 0, "test");
  17274. * activeSheet.setValue(2, 0, "a");
  17275. * activeSheet.setValue(3, 0, "t");
  17276. */
  17277. text(value?: string): any;
  17278. /**
  17279. * Gets or sets the average condition type.
  17280. * @param {GC.Spread.Sheets.ConditionalFormatting.AverageConditionType} value The average condition type.
  17281. * @returns {GC.Spread.Sheets.ConditionalFormatting.AverageConditionType | GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule} If no value is set, returns the average condition type; otherwise, returns the number condition rule.
  17282. * @example
  17283. * activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
  17284. * var style = new GC.Spread.Sheets.Style();
  17285. * style.backColor = "red";
  17286. * style.foreColor = "black";
  17287. * var cell = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  17288. * cell.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  17289. * cell.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan);
  17290. * cell.value1(5);
  17291. * cell.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  17292. * cell.style(style);
  17293. * activeSheet.conditionalFormats.addRule(cell);
  17294. * var style1 = new GC.Spread.Sheets.Style();
  17295. * style1.foreColor = "red";
  17296. * var top = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  17297. * top.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.top10Rule);
  17298. * top.type(GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType.top);
  17299. * top.rank(3);
  17300. * top.style(style1);
  17301. * top.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  17302. * top.stopIfTrue(true);
  17303. * activeSheet.conditionalFormats.addRule(top);
  17304. */
  17305. type(value?: GC.Spread.Sheets.ConditionalFormatting.AverageConditionType): any;
  17306. /**
  17307. * Gets or sets the first value.
  17308. * @param {Object | number} valueOrBaseRow The first value or the base row.
  17309. * @param {number} baseColumn The base column.
  17310. * @returns {Object | GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule} If no value is set or baseRow and baseColumn is set, returns the first value; otherwise, returns the number condition rule.
  17311. * @example
  17312. * //This example creates multiple rules.
  17313. * activeSheet.setArray(0,0,[[1,10],[2,9], [3,8],[4,7],[5,6],[6,5],[7,4],[8,3],[9,2],[10,1]]);
  17314. * var style = new GC.Spread.Sheets.Style();
  17315. * style.backColor = "red";
  17316. * style.foreColor = "black";
  17317. * var cell = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  17318. * cell.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  17319. * cell.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan);
  17320. * cell.value1("=B1");
  17321. * cell.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  17322. * cell.style(style);
  17323. * activeSheet.conditionalFormats.addRule(cell);
  17324. * var style1 = new GC.Spread.Sheets.Style();
  17325. * style1.foreColor = "red";
  17326. * var top = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  17327. * top.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.top10Rule);
  17328. * top.type(GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType.top);
  17329. * top.rank(3);
  17330. * top.style(style1);
  17331. * top.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  17332. * top.stopIfTrue(true);
  17333. * activeSheet.conditionalFormats.addRule(top);
  17334. * var formulaOfTheTopLeftCell = cell.value1();
  17335. * var formulaOfA5 = cell.value1(4, 0);
  17336. * var formulaOfA10 = cell.value1(9, 0);
  17337. */
  17338. value1(valueOrBaseRow?: any, baseColumn?: number): any;
  17339. /**
  17340. * Gets or sets the first value.
  17341. * @param {Object | number} valueOrBaseRow The first value or the base row.
  17342. * @param {number} baseColumn The base column.
  17343. * @returns {Object | GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule} If no value is set or baseRow and baseColumn is set, returns the first value; otherwise, returns the number condition rule.
  17344. * @example
  17345. * //This example uses the value2 method.
  17346. * activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
  17347. * var cell = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
  17348. * cell.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
  17349. * cell.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between);
  17350. * cell.value1(5);
  17351. * cell.value2(7);
  17352. * cell.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
  17353. * var style = new GC.Spread.Sheets.Style();
  17354. * style.backColor = "red";
  17355. * style.foreColor = "black";
  17356. * cell.style(style);
  17357. * activeSheet.conditionalFormats.addRule(cell);
  17358. */
  17359. value2(valueOrBaseRow?: any, baseColumn?: number): any;
  17360. }
  17361. export class ScaleRule extends ConditionRuleBase{
  17362. /**
  17363. * Represents a scale conditional rule.
  17364. * @@extends GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase
  17365. * @param {GC.Spread.Sheets.ConditionalFormatting.RuleType} ruleType The rule type.
  17366. * @param {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType} minType The minimum scale type.
  17367. * @param {number} minValue The minimum scale value.
  17368. * @param {string} minColor The minimum scale color.
  17369. * @param {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType} midType The midpoint scale type.
  17370. * @param {number} midValue The midpoint scale value.
  17371. * @param {string} midColor The midpoint scale color.
  17372. * @param {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType} maxType The maximum scale type.
  17373. * @param {number} maxValue The maximum scale value.
  17374. * @param {string} maxColor The maximum scale color.
  17375. * @param {Array.<GC.Spread.Sheets.Range>} ranges The ranges.
  17376. * @constructor
  17377. * @example
  17378. * var scale = new GC.Spread.Sheets.ConditionalFormatting.ScaleRule();
  17379. * scale.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.threeScaleRule);
  17380. * scale.midColor("red");
  17381. * scale.midType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17382. * scale.midValue(50);
  17383. * scale.maxColor("blue");
  17384. * scale.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17385. * scale.maxValue(100);
  17386. * scale.minColor("yellow");
  17387. * scale.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17388. * scale.minValue(10);
  17389. * scale.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 3)]);
  17390. * activeSheet.conditionalFormats.addRule(scale);
  17391. * activeSheet.setValue(0,0, 1,3);
  17392. * activeSheet.setValue(1,0, 50,3);
  17393. * activeSheet.setValue(2,0, 100,3);
  17394. */
  17395. constructor(ruleType: GC.Spread.Sheets.ConditionalFormatting.RuleType, minType?: GC.Spread.Sheets.ConditionalFormatting.ScaleValueType, minValue?: number, minColor?: string, midType?: GC.Spread.Sheets.ConditionalFormatting.ScaleValueType, midValue?: number, midColor?: string, maxType?: GC.Spread.Sheets.ConditionalFormatting.ScaleValueType, maxValue?: number, maxColor?: string, ranges?: GC.Spread.Sheets.Range[]);
  17396. /**
  17397. * Creates a condition for the rule.
  17398. * @returns {GC.Spread.Sheets.ConditionalFormatting.Condition} The condition.
  17399. */
  17400. createCondition(): GC.Spread.Sheets.ConditionalFormatting.Condition;
  17401. /**
  17402. * Returns a specified value of the rule if the cell satisfies the condition.
  17403. * @param {Object} evaluator The evaluator.
  17404. * @param {number} baseRow The row index.
  17405. * @param {number} baseColumn The column index.
  17406. * @param {Object} actual The actual value object for evaluation.
  17407. * @returns {string} A specified value of the rule if the cell satisfies the condition.
  17408. */
  17409. evaluate(evaluator: Object, baseRow: number, baseColumn: number, actual: Object): any;
  17410. /**
  17411. * Gets or sets the maximum color scale.
  17412. * @param {string} value The maximum color scale.
  17413. * @returns {string | GC.Spread.Sheets.ConditionalFormatting.ScaleRule} If no value is set, returns the maximum color scale; otherwise, returns the scale rule.
  17414. * @example
  17415. * var rule = new GC.Spread.Sheets.ConditionalFormatting.ScaleRule();
  17416. * rule.ranges([new GC.Spread.Sheets.Range(0,0,10,3)]);
  17417. * rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.twoScaleRule);
  17418. * rule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17419. * rule.minValue(10);
  17420. * rule.minColor("Yellow");
  17421. * rule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17422. * rule.maxValue(100);
  17423. * rule.maxColor("Blue");
  17424. * activeSheet.conditionalFormats.addRule(rule);
  17425. * activeSheet.setValue(0,0, 1,3);
  17426. * activeSheet.setValue(1,0, 50,3);
  17427. * activeSheet.setValue(2,0, 100,3);
  17428. */
  17429. maxColor(value?: string): any;
  17430. /**
  17431. * Gets or sets the maximum scale type.
  17432. * @param {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType} value The maximum scale type.
  17433. * @returns {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType | GC.Spread.Sheets.ConditionalFormatting.ScaleRule} If no value is set, returns the maximum scale type; otherwise, returns the scale rule.
  17434. * @example
  17435. * var scale = new GC.Spread.Sheets.ConditionalFormatting.ScaleRule();
  17436. * scale.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.threeScaleRule);
  17437. * scale.midColor("red");
  17438. * scale.midType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17439. * scale.midValue(50);
  17440. * scale.maxColor("blue");
  17441. * scale.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17442. * scale.maxValue(100);
  17443. * scale.minColor("yellow");
  17444. * scale.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17445. * scale.minValue(10);
  17446. * scale.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 3)]);
  17447. * activeSheet.conditionalFormats.addRule(scale);
  17448. * activeSheet.setValue(0,0, 1,3);
  17449. * activeSheet.setValue(1,0, 50,3);
  17450. * activeSheet.setValue(2,0, 100,3);
  17451. */
  17452. maxType(value?: GC.Spread.Sheets.ConditionalFormatting.ScaleValueType): any;
  17453. /**
  17454. * Gets or sets the maximum scale value.
  17455. * @param {number} value The maximum scale value.
  17456. * @returns {number | GC.Spread.Sheets.ConditionalFormatting.ScaleRule} If no value is set, returns the maximum scale value; otherwise, returns the scale rule.
  17457. * @example
  17458. * var scale = new GC.Spread.Sheets.ConditionalFormatting.ScaleRule();
  17459. * scale.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.twoScaleRule);
  17460. * scale.maxColor("blue");
  17461. * scale.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17462. * scale.maxValue(100);
  17463. * scale.minColor("yellow");
  17464. * scale.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17465. * scale.minValue(10);
  17466. * scale.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 3)]);
  17467. * activeSheet.conditionalFormats.addRule(scale);
  17468. * activeSheet.setValue(0,0, 1,3);
  17469. * activeSheet.setValue(1,0, 50,3);
  17470. * activeSheet.setValue(2,0, 100,3);
  17471. * alert("Color: " + scale.maxColor() + " Type: " + scale.maxType() + " Value: " + scale.maxValue());
  17472. */
  17473. maxValue(value?: number): any;
  17474. /**
  17475. * Gets or sets the midpoint scale color.
  17476. * @param {string} value The midpoint scale color.
  17477. * @returns {string | GC.Spread.Sheets.ConditionalFormatting.ScaleRule} If no value is set, returns the midpoint scale color; otherwise, returns the scale rule.
  17478. * @example
  17479. * var scale = new GC.Spread.Sheets.ConditionalFormatting.ScaleRule();
  17480. * scale.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.threeScaleRule);
  17481. * scale.midColor("red");
  17482. * scale.midType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17483. * scale.midValue(50);
  17484. * scale.maxColor("blue");
  17485. * scale.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17486. * scale.maxValue(100);
  17487. * scale.minColor("yellow");
  17488. * scale.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17489. * scale.minValue(10);
  17490. * scale.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 3)]);
  17491. * activeSheet.conditionalFormats.addRule(scale);
  17492. * activeSheet.setValue(0,0, 1,3);
  17493. * activeSheet.setValue(1,0, 50,3);
  17494. * activeSheet.setValue(2,0, 100,3);
  17495. */
  17496. midColor(value?: string): any;
  17497. /**
  17498. * Gets or sets the midpoint scale type.
  17499. * @param {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType} value The midpoint scale type.
  17500. * @returns {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType | GC.Spread.Sheets.ConditionalFormatting.ScaleRule} If no value is set, returns the midpoint scale type; otherwise, returns the scale rule.
  17501. * @example
  17502. * var scale = new GC.Spread.Sheets.ConditionalFormatting.ScaleRule();
  17503. * scale.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.threeScaleRule);
  17504. * scale.midColor("red");
  17505. * scale.midType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17506. * scale.midValue(50);
  17507. * scale.maxColor("blue");
  17508. * scale.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17509. * scale.maxValue(100);
  17510. * scale.minColor("yellow");
  17511. * scale.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17512. * scale.minValue(10);
  17513. * scale.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 3)]);
  17514. * activeSheet.conditionalFormats.addRule(scale);
  17515. * activeSheet.setValue(0,0, 1,3);
  17516. * activeSheet.setValue(1,0, 50,3);
  17517. * activeSheet.setValue(2,0, 100,3);
  17518. */
  17519. midType(value?: GC.Spread.Sheets.ConditionalFormatting.ScaleValueType): any;
  17520. /**
  17521. * Gets or sets the midpoint scale value.
  17522. * @param {number} value The midpoint scale value.
  17523. * @returns {number | GC.Spread.Sheets.ConditionalFormatting.ScaleRule} If no value is set, returns the midpoint scale value; otherwise, returns the scale rule.
  17524. * @example
  17525. * var scale = new GC.Spread.Sheets.ConditionalFormatting.ScaleRule();
  17526. * scale.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.threeScaleRule);
  17527. * scale.midColor("red");
  17528. * scale.midType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17529. * scale.midValue(50);
  17530. * scale.maxColor("blue");
  17531. * scale.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17532. * scale.maxValue(100);
  17533. * scale.minColor("yellow");
  17534. * scale.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17535. * scale.minValue(10);
  17536. * scale.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 3)]);
  17537. * activeSheet.conditionalFormats.addRule(scale);
  17538. * activeSheet.setValue(0,0, 1,3);
  17539. * activeSheet.setValue(1,0, 50,3);
  17540. * activeSheet.setValue(2,0, 100,3);
  17541. */
  17542. midValue(value?: number): any;
  17543. /**
  17544. * Gets or sets the minimum scale color.
  17545. * @param {string} value The minimum scale color.
  17546. * @returns {string | GC.Spread.Sheets.ConditionalFormatting.ScaleRule} If no value is set, returns the minimum scale color; otherwise, returns the scale rule.
  17547. * @example
  17548. * var rule = new GC.Spread.Sheets.ConditionalFormatting.ScaleRule();
  17549. * rule.ranges([new GC.Spread.Sheets.Range(0,0,10,3)]);
  17550. * rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.twoScaleRule);
  17551. * rule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17552. * rule.minValue(10);
  17553. * rule.minColor("Yellow");
  17554. * rule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17555. * rule.maxValue(100);
  17556. * rule.maxColor("Blue");
  17557. * activeSheet.conditionalFormats.addRule(rule);
  17558. * activeSheet.setValue(0,0, 1,3);
  17559. * activeSheet.setValue(1,0, 50,3);
  17560. * activeSheet.setValue(2,0, 100,3);
  17561. */
  17562. minColor(value?: string): any;
  17563. /**
  17564. * Gets or sets the type of minimum scale.
  17565. * @param {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType} value The type of minimum scale.
  17566. * @returns {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType | GC.Spread.Sheets.ConditionalFormatting.ScaleRule} If no value is set, returns the type of minimum scale; otherwise, returns the scale rule.
  17567. * @example
  17568. * activeSheet.setValue(0,0,1,3);
  17569. * activeSheet.setValue(1,0,15,3);
  17570. * activeSheet.setValue(2,0,25,3);
  17571. * activeSheet.setValue(3,0,-1,3);
  17572. * var dataBarRule = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule();
  17573. * dataBarRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  17574. * dataBarRule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17575. * dataBarRule.minValue(-1);
  17576. * dataBarRule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17577. * dataBarRule.maxValue(40);
  17578. * dataBarRule.color("green");
  17579. * dataBarRule.showBorder(true);
  17580. * dataBarRule.borderColor("orange");
  17581. * dataBarRule.dataBarDirection(GC.Spread.Sheets.ConditionalFormatting.BarDirection.leftToRight);
  17582. * dataBarRule.negativeFillColor("yellow");
  17583. * dataBarRule.useNegativeFillColor(true);
  17584. * dataBarRule.negativeBorderColor("red");
  17585. * dataBarRule.useNegativeBorderColor(true);
  17586. * dataBarRule.axisPosition(GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition.automatic);
  17587. * dataBarRule.axisColor("blue");
  17588. * dataBarRule.showBarOnly(false);
  17589. * activeSheet.conditionalFormats.addRule(dataBarRule);
  17590. */
  17591. minType(value?: GC.Spread.Sheets.ConditionalFormatting.ScaleValueType): any;
  17592. /**
  17593. * Gets or sets the minimum scale value.
  17594. * @param {number} value The minimum scale value.
  17595. * @returns {number | GC.Spread.Sheets.ConditionalFormatting.ScaleRule} If no value is set, returns the minimum scale value; otherwise, returns the scale rule.
  17596. * @example
  17597. * activeSheet.setValue(0,0,1,3);
  17598. * activeSheet.setValue(1,0,15,3);
  17599. * activeSheet.setValue(2,0,25,3);
  17600. * activeSheet.setValue(3,0,-1,3);
  17601. * var dataBarRule = new GC.Spread.Sheets.ConditionalFormatting.DataBarRule();
  17602. * dataBarRule.ranges([new GC.Spread.Sheets.Range(0,0,4,1)]);
  17603. * dataBarRule.minType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17604. * dataBarRule.minValue(-1);
  17605. * dataBarRule.maxType(GC.Spread.Sheets.ConditionalFormatting.ScaleValueType.number);
  17606. * dataBarRule.maxValue(40);
  17607. * dataBarRule.color("green");
  17608. * dataBarRule.showBorder(true);
  17609. * dataBarRule.borderColor("orange");
  17610. * dataBarRule.dataBarDirection(GC.Spread.Sheets.ConditionalFormatting.BarDirection.leftToRight);
  17611. * dataBarRule.negativeFillColor("yellow");
  17612. * dataBarRule.useNegativeFillColor(true);
  17613. * dataBarRule.negativeBorderColor("red");
  17614. * dataBarRule.useNegativeBorderColor(true);
  17615. * dataBarRule.axisPosition(GC.Spread.Sheets.ConditionalFormatting.DataBarAxisPosition.automatic);
  17616. * dataBarRule.axisColor("blue");
  17617. * dataBarRule.showBarOnly(false);
  17618. * activeSheet.conditionalFormats.addRule(dataBarRule);
  17619. */
  17620. minValue(value?: number): any;
  17621. /**
  17622. * Gets whether evaluation should stop if the condition evaluates to <c>true</c>.
  17623. */
  17624. stopIfTrue(value?: boolean): boolean;
  17625. }
  17626. export class ScaleValue{
  17627. /**
  17628. * Represents a scale value with the specified type and value.
  17629. * @class
  17630. * @param {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType} type The scale value type.
  17631. * @param {Object} value The scale value.
  17632. */
  17633. constructor(type: GC.Spread.Sheets.ConditionalFormatting.ScaleValueType, value: Object);
  17634. /** Gets the scale value type.
  17635. * @type {GC.Spread.Sheets.ConditionalFormatting.ScaleValueType}
  17636. */
  17637. type: GC.Spread.Sheets.ConditionalFormatting.ScaleValueType;
  17638. /** Gets the scale value.
  17639. * @type {Object}
  17640. */
  17641. value: Object;
  17642. }
  17643. }
  17644. module ContextMenu{
  17645. export interface IMenuItemData{
  17646. name?:string;
  17647. text?:string;
  17648. command?:string|Function;
  17649. disable?:boolean;
  17650. iconClass?:string;
  17651. group?:string;
  17652. subMenu?:IMenuItemData[];
  17653. type?:string;
  17654. workArea?:string;
  17655. visible?: boolean;
  17656. menuContent?: string;
  17657. status?: string | any;
  17658. }
  17659. export class ContextMenu{
  17660. /**
  17661. * Represents ContextMenu
  17662. * @class
  17663. */
  17664. constructor();
  17665. /**
  17666. * Represents the build-in menuData
  17667. * @type {GC.Spread.Sheets.ContextMenu.IMenuItemData[]}
  17668. */
  17669. menuData: GC.Spread.Sheets.ContextMenu.IMenuItemData[];
  17670. /**
  17671. * Represents the build-in menuView
  17672. * @type {Object}
  17673. */
  17674. menuView: Object;
  17675. /**
  17676. * open context menu
  17677. * @param {GC.Spread.Sheets.ContextMenu.IMenuItemData[]} menuData
  17678. * @param {GC.Spread.Sheets.ContextMenu.IMenuItemData[]} itemsDataForShown
  17679. * @param {Object} hitInfo
  17680. * @param {Object} spread
  17681. * @return {boolean} indicate whether or not the contextmenu event has been processed done
  17682. * @example
  17683. * $(document).ready(function () {
  17684. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
  17685. * function ContextMenu(){}
  17686. * ContextMenu.prototype = new GC.Spread.Sheets.ContextMenu.ContextMenu(spread);
  17687. * ContextMenu.prototype.onOpenMenu = function (menuData, itemsDataForShown, hitInfo, spread) {
  17688. * console.log(menuData);
  17689. * console.log(itemsDataForShown);
  17690. * console.log(hitInfo);
  17691. * console.log(spread);
  17692. * //you can change itemsDataForShown to change filter result
  17693. * //if you only want to change filter result,return false or don't return anything
  17694. * //you also can open your own context menu,if you want to do this,return true
  17695. * //return true;
  17696. * };
  17697. * var contextMenu = new ContextMenu();
  17698. * spread.contextMenu = contextMenu;
  17699. * });
  17700. */
  17701. onOpenMenu(menuData: GC.Spread.Sheets.ContextMenu.IMenuItemData[], itemsDataForShown: GC.Spread.Sheets.ContextMenu.IMenuItemData[], hitInfo: Object, spread: Object): boolean;
  17702. }
  17703. export class MenuView{
  17704. /**
  17705. * Represents MenuView
  17706. * @class
  17707. */
  17708. constructor();
  17709. /**
  17710. * create menuitem view
  17711. * @param {GC.Spread.Sheets.ContextMenu.IMenuItemData} menuItemData the data of the menu item which needs to be shown
  17712. * @return {HTMLElement} menuitem view
  17713. * @example
  17714. * $(document).ready(function () {
  17715. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
  17716. * function CustomMenuView() {
  17717. * }
  17718. * CustomMenuView.prototype = new GC.Spread.Sheets.ContextMenu.MenuView();
  17719. * CustomMenuView.prototype.createMenuItemElement = function (menuItemData) {
  17720. * var self = this;
  17721. * var menuItemView = GC.Spread.Sheets.ContextMenu.MenuView.prototype.createMenuItemElement.call(self, menuItemData);
  17722. * if (menuItemData.name === "markWithABg") {
  17723. * var subMenuView = menuItemView.find(".gc-ui-contextmenu-container");
  17724. * $(subMenuView[0]).colorpicker();
  17725. * }
  17726. * return menuItemView;
  17727. * };
  17728. * });
  17729. */
  17730. createMenuItemElement(menuItemData: GC.Spread.Sheets.ContextMenu.IMenuItemData):HTMLElement;
  17731. /**
  17732. * get command options of specified menu item
  17733. * @param {Object} menuItemData the data of the menu item which be clicked
  17734. * @param {HTMLElement} host the container of the menu item which be clicked
  17735. * @param {Object} event the mouse click event
  17736. * @return {Object} command options of specified menu item
  17737. * @example
  17738. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
  17739. * function CustomMenuView() {
  17740. * }
  17741. * CustomMenuView.prototype = new GC.Spread.Sheets.ContextMenu.MenuView();
  17742. * CustomMenuView.prototype.getCommandOptions = function (menuItemData, host, event) {
  17743. * if (menuItemData &amp;&amp; menuItemData.name === "markWithABg") {
  17744. * var ele = event.target || event.srcElement;
  17745. * if (ele.className.indexOf("colorpicker-div-inner-colorcell") !== -1) {
  17746. * ele = ele.parentElement;
  17747. * }
  17748. * return ele.style.background;
  17749. * }
  17750. * };
  17751. */
  17752. getCommandOptions(menuItemData: GC.Spread.Sheets.ContextMenu.IMenuItemData, host: Object, event: Object): any;
  17753. }
  17754. }
  17755. module DataValidation{
  17756. /**
  17757. * Creates a validator based on the data.
  17758. * @static
  17759. * @param {GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators} typeOperator The type of ComparisonOperators compare operator.
  17760. * @param {object} v1 The first object.
  17761. * @param {object} v2 The second object.
  17762. * @returns {GC.Spread.Sheets.DataValidation.DefaultDataValidator} The validator.
  17763. * @example
  17764. * spread.options.highlightInvalidData = true;
  17765. * var dv = GC.Spread.Sheets.DataValidation.createDateValidator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between, new Date(2012, 11, 31), new Date(2013, 11, 31));
  17766. * dv.showInputMessage(true);
  17767. * dv.inputMessage("Enter a date between 12/31/2012 and 12/31/2013.");
  17768. * dv.inputTitle("Tip");
  17769. * activeSheet.getCell(1, -1).validator(dv);
  17770. */
  17771. function createDateValidator(typeOperator: GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators, v1: Object, v2: Object): GC.Spread.Sheets.DataValidation.DefaultDataValidator;
  17772. /**
  17773. * Creates a validator based on a formula list.
  17774. * @static
  17775. * @param {string} formula The formula list.
  17776. * @returns {GC.Spread.Sheets.DataValidation.DefaultDataValidator} The validator.
  17777. * @example
  17778. * activeSheet.setValue(0, 2, 5);
  17779. * activeSheet.setValue(1, 2, 4);
  17780. * activeSheet.setValue(2, 2, 5);
  17781. * spread.options.highlightInvalidData = true;
  17782. * var dv = GC.Spread.Sheets.DataValidation.createFormulaListValidator("$C$1:$C$3");
  17783. * dv.showInputMessage(true);
  17784. * dv.inputMessage("Pick a value from the list.");
  17785. * dv.inputTitle("tip");
  17786. * activeSheet.setDataValidator(1, 1, 1,1,dv,GC.Spread.Sheets.SheetArea.viewport);
  17787. * var validList = activeSheet.getDataValidator(1, 1).getValidList(activeSheet, 1, 1);
  17788. * alert(validList);
  17789. */
  17790. function createFormulaListValidator(formula: string): GC.Spread.Sheets.DataValidation.DefaultDataValidator;
  17791. /**
  17792. * Creates a validator based on a formula.
  17793. * @static
  17794. * @param {string} formula The formula condition.
  17795. * @returns {GC.Spread.Sheets.DataValidation.DefaultDataValidator} The validator.
  17796. * @example
  17797. * spread.options.highlightInvalidData = true;
  17798. * //The formula validator is valid if the formula condition returns true.
  17799. * var dv = GC.Spread.Sheets.DataValidation.createFormulaValidator("A1>0");
  17800. * dv.showInputMessage(true);
  17801. * dv.inputMessage("Enter a value greater than 0 in A1.");
  17802. * dv.inputTitle("Tip");
  17803. * activeSheet.setDataValidator(0, 0, 1,1,dv,GC.Spread.Sheets.SheetArea.viewport);
  17804. */
  17805. function createFormulaValidator(formula: string): GC.Spread.Sheets.DataValidation.DefaultDataValidator;
  17806. /**
  17807. * Creates a validator based on a list.
  17808. * @static
  17809. * @param {string} source The list value.
  17810. * @returns {GC.Spread.Sheets.DataValidation.DefaultDataValidator} The validator.
  17811. * @example
  17812. * spread.options.highlightInvalidData = true;
  17813. * var dv = GC.Spread.Sheets.DataValidation.createListValidator("1,2,3");
  17814. * dv.showInputMessage(true);
  17815. * dv.inputMessage("Value must be 1,2 or 3");
  17816. * dv.inputTitle("tip");
  17817. * activeSheet.setDataValidator(1,1,1,1,dv, GC.Spread.Sheets.SheetArea.viewport);
  17818. * alert(activeSheet.getDataValidator(1,1).getValidList(activeSheet,1,1));
  17819. */
  17820. function createListValidator(source: string): GC.Spread.Sheets.DataValidation.DefaultDataValidator;
  17821. /**
  17822. * Creates a validator based on numbers.
  17823. * @static
  17824. * @param {GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators} typeOperator The type of ComparisonOperators compare operator.
  17825. * @param {object} v1 The first object.
  17826. * @param {object} v2 The second object.
  17827. * @param {boolean} isIntegerValue Set to <c>true</c> if the validator is set to a number.
  17828. * @returns {GC.Spread.Sheets.DataValidation.DefaultDataValidator} The validator.
  17829. * @example
  17830. * spread.options.highlightInvalidData = true;
  17831. * var dv = GC.Spread.Sheets.DataValidation.createNumberValidator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between, "5", "20", true);
  17832. * dv.showInputMessage(true);
  17833. * dv.inputMessage("Value must be between 5 and 20.");
  17834. * dv.inputTitle("tip");
  17835. * activeSheet.setDataValidator(1, 1, 1,1,dv,GC.Spread.Sheets.SheetArea.viewport);
  17836. */
  17837. function createNumberValidator(typeOperator: GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators, v1: Object, v2: Object, isIntegerValue: boolean): GC.Spread.Sheets.DataValidation.DefaultDataValidator;
  17838. /**
  17839. * Creates a validator based on text length.
  17840. * @static
  17841. * @param {GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators} typeOperator The type of ComparisonOperators compare operator.
  17842. * @param {object} v1 The first object.
  17843. * @param {object} v2 The second object.
  17844. * @returns {GC.Spread.Sheets.DataValidation.DefaultDataValidator} The validator.
  17845. * @example
  17846. * spread.options.highlightInvalidData = true;
  17847. * var dv = GC.Spread.Sheets.DataValidation.createTextLengthValidator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan, "4", "20");
  17848. * dv.showInputMessage(true);
  17849. * dv.inputMessage("Number of characters must be greater than 4.");
  17850. * dv.inputTitle("tip");
  17851. * activeSheet.setDataValidator(1, 1, 1, 1, dv, GC.Spread.Sheets.SheetArea.viewport);
  17852. */
  17853. function createTextLengthValidator(typeOperator: GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators, v1: Object, v2: Object): GC.Spread.Sheets.DataValidation.DefaultDataValidator;
  17854. /**
  17855. * Indicates the data validator criteria type.
  17856. * @enum {number}
  17857. * @example
  17858. * //This example uses the CriteriaType enumeration.
  17859. * var textLengthCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.textLengthCondition);
  17860. * textLengthCondition.compareType(GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators.greaterThan);
  17861. * textLengthCondition.formula("$C$1"); // formula used to calculate a number.
  17862. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(textLengthCondition);
  17863. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  17864. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  17865. * spread.options.highlightInvalidData = true;
  17866. * activeSheet.setValue(0, 0, "abcf");
  17867. * //Set value 3 to $C$1, after this code, the value in Cell(0,0) is valid.
  17868. * activeSheet.setValue(0, 2, 3);
  17869. * //Set value 5 to $C$1, after this code, the value in Cel(0,0) is invalid.
  17870. * // activeSheet.setValue(0, 2, 5);
  17871. */
  17872. export enum CriteriaType{
  17873. /**
  17874. * Specifies that the data validation allows any type of value and does not check for a type or range of values.
  17875. */
  17876. anyValue= 0,
  17877. /**
  17878. * Specifies that the data validation checks for and allows whole number values satisfying the given condition.
  17879. */
  17880. wholeNumber= 1,
  17881. /**
  17882. * Specifies that the data validation checks for and allows decimal values satisfying the given condition.
  17883. */
  17884. decimalValues= 2,
  17885. /**
  17886. * Specifies that the data validation checks for and allows a value that matches one in a list of values.
  17887. */
  17888. list= 3,
  17889. /**
  17890. * Specifies that the data validation checks for and allows date values satisfying the given condition.
  17891. */
  17892. date= 4,
  17893. /**
  17894. * Specifies that the data validation checks for and allows time values satisfying the given condition.
  17895. */
  17896. time= 5,
  17897. /**
  17898. * Specifies that the data validation checks for and allows text values whose length satisfies the given condition.
  17899. */
  17900. textLength= 6,
  17901. /**
  17902. * Specifies that the data validation uses a custom formula to check the cell value.
  17903. */
  17904. custom= 7
  17905. }
  17906. /**
  17907. * Indicates the data validation result.
  17908. * @enum {number}
  17909. */
  17910. export enum DataValidationResult{
  17911. /**
  17912. * Indicates to apply the value to a cell for a validation error.
  17913. */
  17914. forceApply= 0,
  17915. /**
  17916. * Indicates to discard the value and not apply it to the cell for a validation error.
  17917. */
  17918. discard= 1,
  17919. /**
  17920. * Indicates to retry multiple times to apply the value to the cell for a validation error.
  17921. */
  17922. retry= 2
  17923. }
  17924. /**
  17925. * Indicates the data validation error style.
  17926. * @enum {number}
  17927. */
  17928. export enum ErrorStyle{
  17929. /**
  17930. * Specifies to use a stop icon in the error alert.
  17931. */
  17932. stop= 0,
  17933. /**
  17934. * Specifies to use a warning icon in the error alert.
  17935. */
  17936. warning= 1,
  17937. /**
  17938. * Specifies to use an information icon in the error alert.
  17939. */
  17940. information= 2
  17941. }
  17942. /**
  17943. * Indicates the data validation highlightposition.
  17944. * @enum {number}
  17945. */
  17946. export enum HighlightPosition{
  17947. /**
  17948. * Specifies highlight flag on the topleft of the invalid data cell.
  17949. */
  17950. topLeft= 0,
  17951. /**
  17952. * Specifies highlight flag on the topright of the invalid data cell.
  17953. */
  17954. topRight= 1,
  17955. /**
  17956. * Specifies highlight flag on the bottomright of the invalid data cell.
  17957. */
  17958. bottomRight= 2,
  17959. /**
  17960. * Specifies highlight flag on the bottomleft of the invalid data cell.
  17961. */
  17962. bottomLeft= 3,
  17963. /**
  17964. * Specifies image which type is icon on the left of the invalid data cell.
  17965. */
  17966. outsideLeft= 4,
  17967. /**
  17968. * Specifies image which type is icon on the Right of the invalid data cell.
  17969. */
  17970. outsideRight= 5
  17971. }
  17972. /**
  17973. * Indicates the data validation highlightType.
  17974. * @enum {number}
  17975. */
  17976. export enum HighlightType{
  17977. /**
  17978. * Specifies to use a circle in the invalid data cell.
  17979. */
  17980. circle= 0,
  17981. /**
  17982. * Specifies to use a dogEar in the invalid data cell.
  17983. */
  17984. dogEar= 1,
  17985. /**
  17986. * Specifies to use a icon in the invalid data cell.
  17987. */
  17988. icon= 2
  17989. }
  17990. export class DefaultDataValidator{
  17991. /**
  17992. * Represents a data validator.
  17993. * @class
  17994. * @param {GC.Spread.Sheets.ConditionalFormatting.Condition} condition The condition.
  17995. * @example
  17996. * //This example validates the cell data.
  17997. * spread.options.highlightInvalidData = true;
  17998. * var dv = new GC.Spread.Sheets.DataValidation.createTextLengthValidator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan, 5);
  17999. * activeSheet.setDataValidator(0, 0, 1, 1, dv, GC.Spread.Sheets.SheetArea.viewport);
  18000. * activeSheet.setValue(0, 0, "abcf");
  18001. */
  18002. constructor(condition: GC.Spread.Sheets.ConditionalFormatting.Condition);
  18003. /**
  18004. * Gets or sets the comparison operator.
  18005. * @param {GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators} value The comparison operator.
  18006. * @returns {GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns the comparison operator; otherwise, returns the data validator.
  18007. */
  18008. comparisonOperator(value?: GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators): any;
  18009. /**
  18010. * Gets or sets the condition to validate.
  18011. * @param {GC.Spread.Sheets.ConditionalFormatting.Condition} value The condition to validate.
  18012. * @returns {GC.Spread.Sheets.ConditionalFormatting.Condition | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns the condition to validate; otherwise, returns the data validator.
  18013. */
  18014. condition(value?: GC.Spread.Sheets.ConditionalFormatting.Condition): any;
  18015. /**
  18016. * Gets or sets the error message.
  18017. * @param {string} value The error message.
  18018. * @returns {string | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns the error message; otherwise, returns the data validator.
  18019. */
  18020. errorMessage(value?: string): any;
  18021. /**
  18022. * Gets or sets the error style to display.
  18023. * @param {GC.Spread.Sheets.DataValidation.ErrorStyle} value The error style to display.
  18024. * @returns {GC.Spread.Sheets.DataValidation.ErrorStyle | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns the error style to display; otherwise, returns the data validator.
  18025. */
  18026. errorStyle(value?: GC.Spread.Sheets.DataValidation.ErrorStyle): any;
  18027. /**
  18028. * Gets or sets the error title.
  18029. * @param {string} value The error title.
  18030. * @returns {string | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns the error title; otherwise, returns the data validator.
  18031. */
  18032. errorTitle(value?: string): any;
  18033. /**
  18034. * Returns the valid data lists if the Data validation type is list; otherwise, returns null.
  18035. * @param {object} evaluator The object that can evaluate a condition.
  18036. * @param {number} baseRow The base row.
  18037. * @param {number} baseColumn The base column.
  18038. * @returns {Array.<Object>} The valid data lists or null.
  18039. */
  18040. getValidList(evaluator: Object, baseRow: number, baseColumn: number): any[];
  18041. /**
  18042. * Get or Sets the invalid data cell highlight style.
  18043. * @param {GC.Spread.Sheets.DataValidation.HighlightType} [style.type] - typeIndicates the data validation highlightType.
  18044. * @param {string} [style.color] - Indicates the data validation highlight color.
  18045. * @param {GC.Spread.Sheets.DataValidation.HighlightPosition} [style.position] - Indicates the data validation highlight position.
  18046. * @param {string} [style.image] - Indicates the data validation highlight image url or data.
  18047. * @returns {Object | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns the hignlight style object; otherwise, returns the data validator.
  18048. * @example
  18049. * //This example uses the highlightStyle method.
  18050. * sheet.setValue(1, 1, "sss");
  18051. * var dv = new GC.Spread.Sheets.DataValidation.createListValidator('Fruit,Vegetable,Food');
  18052. * dv.highlightStyle({
  18053. * type:GC.Spread.Sheets.DataValidation.HighlightType.dogEar,
  18054. * color:'blue',
  18055. * position:GC.Spread.Sheets.DataValidation.HighlightPosition.topLeft
  18056. * });
  18057. * sheet.setDataValidator(1,1, dv);
  18058. * spread.options.highlightInvalidData = true;
  18059. */
  18060. highlightStyle(style?: Object): Object;
  18061. /**
  18062. * Gets or sets whether to ignore an empty value.
  18063. * @param {boolean} value Indicates whether to ignore the empty value.
  18064. * @returns {boolean | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns whether to ignore the empty value; otherwise, returns the data validator.
  18065. * @example
  18066. * //This example uses the IgnoreBlank method.
  18067. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.cellValueCondition);
  18068. * nCondition.compareType(GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators.equalsTo);
  18069. * nCondition.expected(0);
  18070. * //When the option is false, the validation fails and the red alert is displayed.
  18071. * //When the option is true, the blank cell is treated as zero and the validation is successful.
  18072. * nCondition.treatNullValueAsZero(false);
  18073. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  18074. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  18075. * validator.ignoreBlank(false);
  18076. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  18077. * spread.options.highlightInvalidData = true;
  18078. * activeSheet.setValue(0, 0, null);
  18079. */
  18080. ignoreBlank(value?: boolean): any;
  18081. /**
  18082. * Gets or sets whether to display a drop-down button.
  18083. * @param {boolean} value Indicates whether to display a drop-down button.
  18084. * @returns {boolean | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns whether to display a drop-down button; otherwise, returns the data validator.
  18085. * @example
  18086. * //This example uses the inCellDropdown method.
  18087. * spread.options.highlightInvalidData = true;
  18088. * var dv = GC.Spread.Sheets.DataValidation.createListValidator("1,2,3");
  18089. * dv.showInputMessage(true);
  18090. * dv.inputMessage("Value must be 1,2 or 3");
  18091. * dv.inputTitle("tip");
  18092. * dv.inCellDropdown(true);
  18093. * activeSheet.setDataValidator(1,1,1,1,dv,GC.Spread.Sheets.SheetArea.viewport);
  18094. * var validList = activeSheet.getDataValidator(1, 1).getValidList(activeSheet, 1, 1);
  18095. * alert(validList);
  18096. */
  18097. inCellDropdown(value?: boolean): any;
  18098. /**
  18099. * Gets or sets the input message.
  18100. * @param {string} value The input message.
  18101. * @returns {string | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns the input message; otherwise, returns the data validator.
  18102. * @example
  18103. * spread.options.highlightInvalidData = true;
  18104. * var dv = GC.Spread.Sheets.DataValidation.createListValidator("1,2,3");
  18105. * dv.showInputMessage(true);
  18106. * dv.inputMessage("Value must be 1,2 or 3");
  18107. * dv.inputTitle("tip");
  18108. * activeSheet.setDataValidator(1,1,1,1,dv,GC.Spread.Sheets.SheetArea.viewport);
  18109. * alert(activeSheet.getDataValidator(1,1).getValidList(activeSheet,1,1));
  18110. */
  18111. inputMessage(value?: string): any;
  18112. /**
  18113. * Gets or sets the input title.
  18114. * @param {string} value The input title.
  18115. * @returns {string | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns the input title; otherwise, returns the data validator.
  18116. * @example
  18117. * spread.options.highlightInvalidData = true;
  18118. * var dv = GC.Spread.Sheets.DataValidation.createListValidator("1,2,3");
  18119. * dv.showInputMessage(true);
  18120. * dv.inputMessage("Value must be 1,2 or 3");
  18121. * dv.inputTitle("tip");
  18122. * activeSheet.setDataValidator(1,1,1,1,dv,GC.Spread.Sheets.SheetArea.viewport);
  18123. * alert(activeSheet.getDataValidator(1,1).getValidList(activeSheet,1,1));
  18124. */
  18125. inputTitle(value?: string): any;
  18126. /**
  18127. * Determines whether the current value is valid.
  18128. * @param {object} evaluator The evaluator.
  18129. * @param {number} baseRow The base row.
  18130. * @param {number} baseColumn The base column.
  18131. * @param {object} actual The current value.
  18132. * @returns {boolean} <c>true</c> if the value is valid; otherwise, <c>false</c>.
  18133. */
  18134. isValid(evaluator: Object, baseRow: number, baseColumn: number, actual: Object): boolean;
  18135. /**
  18136. * Resets the data validator.
  18137. * @example
  18138. * //This example uses the reset method.
  18139. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.cellValueCondition);
  18140. * nCondition.compareType(GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators.equalsTo);
  18141. * nCondition.expected(0);
  18142. * //When the option is false, the validation fails and the red alert is displayed.
  18143. * //When the option is true, the blank cell is treated as zero and the validation is successful.
  18144. * nCondition.treatNullValueAsZero(false);
  18145. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  18146. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  18147. * validator.ignoreBlank(false);
  18148. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  18149. * spread.options.highlightInvalidData = true;
  18150. * activeSheet.setValue(0, 0, null);
  18151. * validator.reset();
  18152. */
  18153. reset(): void;
  18154. /**
  18155. * Gets or sets whether to display an error message.
  18156. * @param {boolean} value Indicates whether to display an error message.
  18157. * @returns {boolean | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns whether to display an error message; otherwise, returns the data validator.
  18158. * @example
  18159. * spread.options.highlightInvalidData = true;
  18160. * //The formula validator is valid if the formula condition returns true.
  18161. * var dv = GC.Spread.Sheets.DataValidation.createFormulaValidator("A1&gt;0");
  18162. * dv.showInputMessage(true);
  18163. * dv.inputMessage("Enter a value greater than 0 in A1.");
  18164. * dv.inputTitle("Tip");
  18165. * dv.showErrorMessage(true);
  18166. * dv.errorMessage("Incorrect Value");
  18167. * activeSheet.setDataValidator(0, 0, 1, 1, dv, GC.Spread.Sheets.SheetArea.viewport);
  18168. * //bind
  18169. * activeSheet.bind(GC.Spread.Sheets.Events.ValidationError, function (sender, args) {
  18170. * if (args.validator.showErrorMessage()) {
  18171. * if (confirm(args.validator.errorMessage())) {
  18172. * args.validationResult = GC.Spread.Sheets.DataValidation.DataValidationResult.retry;
  18173. * } else {
  18174. * args.validationResult = GC.Spread.Sheets.DataValidation.DataValidationResult.forceApply;
  18175. * }
  18176. * }
  18177. * });
  18178. */
  18179. showErrorMessage(value?: boolean): any;
  18180. /**
  18181. * Gets or sets whether to display the input title and input message.
  18182. * @param {boolean} value Indicates whether to display the input title and input message.
  18183. * @returns {boolean | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns whether to display the input title and input message; otherwise, returns the data validator.
  18184. * @example
  18185. * spread.options.highlightInvalidData = true;
  18186. * var dv = GC.Spread.Sheets.DataValidation.createListValidator("1,2,3");
  18187. * dv.showInputMessage(true);
  18188. * dv.inputMessage("Value must be 1,2 or 3");
  18189. * dv.inputTitle("tip");
  18190. * activeSheet.setDataValidator(1,1,1,1,dv,GC.Spread.Sheets.SheetArea.viewport);
  18191. * alert(activeSheet.getDataValidator(1,1).getValidList(activeSheet,1,1));
  18192. */
  18193. showInputMessage(value?: boolean): any;
  18194. /**
  18195. * Gets or sets the criteria type of this data validator.
  18196. * @param {GC.Spread.Sheets.DataValidation.CriteriaType} value The criteria type of this data validator.
  18197. * @returns {GC.Spread.Sheets.DataValidation.CriteriaType | GC.Spread.Sheets.DataValidation.DefaultDataValidator} If no value is set, returns the criteria type of this data validator; otherwise, returns the data validator.
  18198. */
  18199. type(value?: GC.Spread.Sheets.DataValidation.CriteriaType): any;
  18200. /**
  18201. * Gets the first value of the data validation.
  18202. * @param {number} baseRow The base row.
  18203. * @param {number} baseColumn The base column.
  18204. * @returns {object} The first value.
  18205. * @example
  18206. * //This example validates a cell value.
  18207. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.cellValueCondition);
  18208. * nCondition.compareType(GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators.equalsTo);
  18209. * nCondition.expected(0);
  18210. * //When the option is false, the validation fails and the red alert is displayed.
  18211. * //When the option is true, the blank cell is treated as zero and the validation is successful.
  18212. * nCondition.treatNullValueAsZero(false);
  18213. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  18214. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  18215. * validator.ignoreBlank(false);
  18216. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  18217. * spread.options.highlightInvalidData = true;
  18218. * activeSheet.setValue(0, 0, null);
  18219. * alert(validator.value1());
  18220. */
  18221. value1(baseRow ?: number, baseColumn ?: number): any;
  18222. /**
  18223. * Gets the second value of the data validation.
  18224. * @param {number} baseRow The base row.
  18225. * @param {number} baseColumn The base column.
  18226. * @returns {object} The second value.
  18227. * @example
  18228. * //This example validates a cell value.
  18229. * var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.cellValueCondition);
  18230. * nCondition.compareType(GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators.equalsTo);
  18231. * nCondition.expected(0);
  18232. * //When the option is false, the validation fails and the red alert is displayed.
  18233. * //When the option is true, the blank cell is treated as zero and the validation is successful.
  18234. * nCondition.treatNullValueAsZero(false);
  18235. * var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
  18236. * validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
  18237. * validator.ignoreBlank(false);
  18238. * activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
  18239. * spread.options.highlightInvalidData = true;
  18240. * activeSheet.setValue(0, 0, null);
  18241. * alert(validator.value2());
  18242. */
  18243. value2(baseRow ?: number, baseColumn ?: number): any;
  18244. }
  18245. }
  18246. module Fill{
  18247. export interface IFillOptions{
  18248. fillType: GC.Spread.Sheets.Fill.FillType;
  18249. series: GC.Spread.Sheets.Fill.FillSeries;
  18250. direction?: GC.Spread.Sheets.Fill.FillDirection;
  18251. step?: number;
  18252. stop?: number;
  18253. unit?: GC.Spread.Sheets.Fill.FillDateUnit;
  18254. }
  18255. // <editor-fold desc="AutoFillType">
  18256. /**
  18257. * Represents the type of drag fill.
  18258. * @enum {number}
  18259. * @example
  18260. * //This example uses the AutoFillType enumeration.
  18261. * activeSheet.bind(GC.Spread.Sheets.Events.DragFillBlockCompleted, function (e, info) {
  18262. * alert("Type (" + info.autoFillType + ")");
  18263. * });
  18264. */
  18265. export enum AutoFillType{
  18266. /**
  18267. * Fills cells with all data objects, including values, formatting, and formulas.
  18268. */
  18269. copyCells= 0,
  18270. /**
  18271. * Fills cells with series.
  18272. */
  18273. fillSeries= 1,
  18274. /**
  18275. * Fills cells only with formatting.
  18276. */
  18277. fillFormattingOnly= 2,
  18278. /**
  18279. * Fills cells with values and not formatting.
  18280. */
  18281. fillWithoutFormatting= 3,
  18282. /**
  18283. * Clears cell values.
  18284. */
  18285. clearValues= 4,
  18286. /**
  18287. * Automatically fills cells.
  18288. */
  18289. auto= 5
  18290. }
  18291. // <editor-fold desc="FillDateUnit">
  18292. /**
  18293. * Represents the date fill unit.
  18294. * @enum {number}
  18295. * @example
  18296. * //This example uses the FillDateUnit enumeration.
  18297. * spread.options.allowUserDragFill = true;
  18298. * activeSheet.setValue(0, 0, new Date(2011, 1, 1));
  18299. * activeSheet.setValue(0, 1, new Date(2011, 2, 9));
  18300. * activeSheet.setValue(0, 2, 5);
  18301. * activeSheet.setValue(0, 3, 10);
  18302. * activeSheet.setValue(0, 4, 1);
  18303. *
  18304. * var start = new GC.Spread.Sheets.Range(0, 0, 1, 1);
  18305. * var r = new GC.Spread.Sheets.Range(0, 0, 4, 1);
  18306. * activeSheet.fillAuto(start, r, {
  18307. * fillType: GC.Spread.Sheets.Fill.FillType.date,
  18308. * series: GC.Spread.Sheets.Fill.FillSeries.column,
  18309. * fillDirection: GC.Spread.Sheets.Fill.FillDirection.down,
  18310. * unit: GC.Spread.Sheets.Fill.FillDateUnit.day,
  18311. * step: 1,
  18312. * stop: new Date(2011, 2, 11)
  18313. * });
  18314. *
  18315. * start = new GC.Spread.Sheets.Range(0, 1, 1, 1);
  18316. * var r2 = new GC.Spread.Sheets.Range(0, 1, 4, 1);
  18317. * activeSheet.fillAuto(start, r2, {
  18318. * fillType: GC.Spread.Sheets.Fill.FillType.date,
  18319. * series: GC.Spread.Sheets.Fill.FillSeries.column,
  18320. * fillDirection:GC.Spread.Sheets.Fill.FillDirection.down,
  18321. * unit: GC.Spread.Sheets.Fill.FillDateUnit.day,
  18322. * step: 1,
  18323. * stop: new Date(2011, 2, 11)
  18324. * });
  18325. *
  18326. * start = new GC.Spread.Sheets.Range(0, 2, 1, 1);
  18327. * var r3 = new GC.Spread.Sheets.Range(0, 2, 4, 1);
  18328. * activeSheet.fillAuto(start, r3, {
  18329. * fillType: GC.Spread.Sheets.Fill.FillType.auto,
  18330. * series: GC.Spread.Sheets.Fill.FillSeries.column,
  18331. * });
  18332. *
  18333. * start = new GC.Spread.Sheets.Range(0, 3, 1, 1);
  18334. * var r4 = new GC.Spread.Sheets.Range(0, 3, 4, 1);
  18335. * activeSheet.fillAuto(start, r4, {
  18336. * fillType: GC.Spread.Sheets.Fill.FillType.growth,
  18337. * series: GC.Spread.Sheets.Fill.FillSeries.column,
  18338. * step:2,
  18339. * stop:55
  18340. * });
  18341. *
  18342. * start = new GC.Spread.Sheets.Range(0, 4, 1, 1);
  18343. * var r5 = new GC.Spread.Sheets.Range(0, 4, 4, 1);
  18344. * activeSheet.fillAuto(start, r5, {
  18345. * fillType: GC.Spread.Sheets.Fill.FillType.linear,
  18346. * series: GC.Spread.Sheets.Fill.FillSeries.column,
  18347. * step:3,
  18348. * stop:20
  18349. * });
  18350. *
  18351. * activeSheet.setValue(0, 5, 123);
  18352. * var r6 = new GC.Spread.Sheets.Range(0, 5, 4, 1);
  18353. * activeSheet.fillAuto(new GC.Spread.Sheets.Range(0, 5, 1, 1), r6, {
  18354. * fillType: GC.Spread.Sheets.Fill.FillType.auto,
  18355. * series: GC.Spread.Sheets.Fill.FillSeries.column,
  18356. * });
  18357. */
  18358. export enum FillDateUnit{
  18359. /** Sets the date fill unit to day.
  18360. * @type {number}
  18361. */
  18362. day= 0,
  18363. /** Sets the date fill unit to weekday.
  18364. * @type {number}
  18365. */
  18366. weekday= 1,
  18367. /** Sets the date fill unit to month.
  18368. * @type {number}
  18369. */
  18370. month= 2,
  18371. /** Sets the date fill unit to year.
  18372. * @type {number}
  18373. */
  18374. year= 3
  18375. }
  18376. // <editor-fold desc="FillDirection">
  18377. /**
  18378. * Represents the type of drag fill direction.
  18379. * @enum {number}
  18380. * @example
  18381. * var start = new GC.Spread.Sheets.Range(0, 2, 1, 1);
  18382. * activeSheet.setValue(0, 2, 5);
  18383. * var r3 = new GC.Spread.Sheets.Range(0, 2, 4, 1);
  18384. * activeSheet.fillAuto(start, r3, {fillType: GC.Spread.Sheets.Fill.FillType.auto, fillDirection:GC.Spread.Sheets.Fill.FillDirection.down, series: GC.Spread.Sheets.Fill.FillSeries.column});
  18385. */
  18386. export enum FillDirection{
  18387. /**
  18388. * Fills from the right to the left.
  18389. */
  18390. left= 0,
  18391. /**
  18392. * Fills from the left to the right.
  18393. */
  18394. right= 1,
  18395. /**
  18396. * Fills from the bottom to the top.
  18397. */
  18398. up= 2,
  18399. /**
  18400. * Fills from the top to the bottom.
  18401. */
  18402. down= 3
  18403. }
  18404. // <editor-fold desc="FillSeries">
  18405. /**
  18406. * Represents the fill series for drag fill.
  18407. * @enum {number}
  18408. * @example
  18409. * //This example automatically fills the data in an area of the sheet.
  18410. * activeSheet.setValue(0, 0, 5);
  18411. * var start = new GC.Spread.Sheets.Range(0, 0, 1, 1);
  18412. * var r3 = new GC.Spread.Sheets.Range(0, 0, 4, 1);
  18413. * activeSheet.fillAuto(start,r3, {fillType:GC.Spread.Sheets.Fill.FillType.auto, series:GC.Spread.Sheets.Fill.FillSeries.column, fillDirection:GC.Spread.Sheets.Fill.FillDirection.down});
  18414. */
  18415. export enum FillSeries{
  18416. /**
  18417. * Fills the column data.
  18418. */
  18419. column= 0,
  18420. /**
  18421. * Fills the row data.
  18422. */
  18423. row= 1
  18424. }
  18425. // <editor-fold desc="FillType">
  18426. /**
  18427. * Represents the type of fill data.
  18428. * @enum {number}
  18429. */
  18430. export enum FillType{
  18431. /** Represents the direction fill type.
  18432. * @type {number}
  18433. */
  18434. direction= 0,
  18435. /** Represents the linear fill type.
  18436. * @type {number}
  18437. */
  18438. linear= 1,
  18439. /** Represents the growth fill type.
  18440. * @type {number}
  18441. */
  18442. growth= 2,
  18443. /** Represents the date fill type.
  18444. * @type {number}
  18445. */
  18446. date= 3,
  18447. /** Represents the auto fill type.
  18448. * @type {number}
  18449. */
  18450. auto= 4
  18451. }
  18452. }
  18453. module Filter{
  18454. export interface IFilterDialogVisibleInfo{
  18455. sortByValue? : boolean,
  18456. sortByColor? : boolean,
  18457. filterByColor? : boolean,
  18458. filterByValue? : boolean,
  18459. listFilterArea? : boolean
  18460. }
  18461. export interface IFilteredArgs{
  18462. action: FilterActionType;
  18463. sheet: Sheets.Worksheet;
  18464. range: Sheets.Range;
  18465. filteredRows: number[];
  18466. filteredOutRows: number[];
  18467. columns: number;
  18468. }
  18469. /**
  18470. * Defines the type of filter action.
  18471. * @enum {number}
  18472. */
  18473. export enum FilterActionType{
  18474. /** Specifies the filter action.
  18475. */
  18476. filter= 0,
  18477. /** Specifies the unfilter action.
  18478. */
  18479. unfilter= 1
  18480. }
  18481. export class HideRowFilter extends RowFilterBase{
  18482. /**
  18483. * Represents a default row filter.
  18484. * @class GC.Spread.Sheets.Filter.HideRowFilter
  18485. * @extends GC.Spread.Sheets.Filter.RowFilterBase
  18486. * @param {GC.Spread.Sheets.Range} range The filter range.
  18487. * @example
  18488. * //The following example creates a new filter.
  18489. * sheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(0,0,4,4)));
  18490. * sheet.repaint();
  18491. */
  18492. constructor(range?: GC.Spread.Sheets.Range);
  18493. /**
  18494. * Gets or sets the visible info for the row filter.
  18495. * @param {Object} visibleInfo The visible info for row filter.
  18496. * @param {boolean} [visibleInfo.sortByValue] Whether to show the sort by value area in filter dialog.
  18497. * @param {boolean} [visibleInfo.sortByColor] Whether to show the sort by color area in filter dialog.
  18498. * @param {boolean} [visibleInfo.filterByColor] Whether to show the filter by color area in filter dialog.
  18499. * @param {boolean} [visibleInfo.filterByValue] Whether to show the filter by value area in filter dialog.
  18500. * @param {boolean} [visibleInfo.listFilterArea] Whether to show the list filter in filter dialog.
  18501. * @returns {Object | GC.Spread.Sheets.Filter.HideRowFilter} If no value is set filter dialog visible info; otherwise, returns the HideRowFilter.
  18502. * @example
  18503. * //This example creates a row filter.
  18504. * sheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(1,1,10,3)));
  18505. * var filter = sheet.rowFilter();
  18506. * filter.filterDialogVisibleInfo({
  18507. * sortByValue : false,
  18508. * sortByColor : true,
  18509. * filterByColor : true,
  18510. * filterByValue : true,
  18511. * listFilterArea : false
  18512. * })
  18513. */
  18514. filterDialogVisibleInfo(visibleInfo?: GC.Spread.Sheets.Filter.IFilterDialogVisibleInfo): any;
  18515. }
  18516. export class RowFilterBase{
  18517. /**
  18518. * Represents a row filter base that supports row filters for filtering rows in a sheet.
  18519. * @class GC.Spread.Sheets.Filter.RowFilterBase
  18520. * @param {GC.Spread.Sheets.Range} range The filter range.
  18521. */
  18522. constructor(range?: GC.Spread.Sheets.Range);
  18523. /**
  18524. * Represents the range for the row filter.
  18525. * @type {GC.Spread.Sheets.Range}
  18526. */
  18527. range: GC.Spread.Sheets.Range;
  18528. /**
  18529. * Represents the type name string used for supporting serialization.
  18530. * @type {string}
  18531. */
  18532. typeName: string;
  18533. /**
  18534. * Adds a specified filter to the row filter.
  18535. * @param {number} col The column index.
  18536. * @param {GC.Spread.Sheets.ConditionalFormatting.Condition} condition The condition to filter.
  18537. */
  18538. addFilterItem(col: number, condition: GC.Spread.Sheets.ConditionalFormatting.Condition): void;
  18539. /**
  18540. * Filters the specified column.
  18541. * @param {number} col The index of the column to be filtered; if it is omitted, all the columns in the range will be filtered.
  18542. */
  18543. filter(col?: number): void;
  18544. /**
  18545. * Gets or sets whether the sheet column's filter button is displayed.
  18546. * @param {number} col The column index of the filter button.
  18547. * @param {boolean} value Whether the filter button is displayed.
  18548. * @returns {boolean | GC.Spread.Sheets.Filter.RowFilterBase}
  18549. * No parameter <c>false</c> if all filter buttons are invisible; otherwise, <c>true</c>.
  18550. * One parameter col <c>false</c> if the specified column filter button is invisible; otherwise, <c>true</c>.
  18551. * One parameter value <c>GC.Spread.Sheets.Filter.RowFilterBase</c> sets all filter buttons to be visible(true)/invisible(false).
  18552. * Two parameters col,value <c>GC.Spread.Sheets.Filter.RowFilterBase</c> sets the specified column filter button to be visible(true)/invisible(false).
  18553. */
  18554. filterButtonVisible(col?: number, value?: boolean): any;
  18555. /**
  18556. * Loads the object state from the specified JSON string.
  18557. * @param {object} settings The row filter data from deserialization.
  18558. */
  18559. fromJSON(settings: Object): void;
  18560. /**
  18561. * Gets all the filtered conditions.
  18562. * @returns {Array.<GC.Spread.Sheets.ConditionalFormatting.Condition>} Returns a collection that contains all the filtered conditions.
  18563. */
  18564. getFilteredItems(): GC.Spread.Sheets.ConditionalFormatting.Condition[];
  18565. /**
  18566. * Gets the filters for the specified column.
  18567. * @param {number} col The column index.
  18568. * @returns {Array.<GC.Spread.Sheets.ConditionalFormatting.Condition>} Returns a collection that contains conditions that belong to a specified column.
  18569. */
  18570. getFilterItems(col: number): GC.Spread.Sheets.ConditionalFormatting.Condition[];
  18571. /**
  18572. * Gets the current sort state.
  18573. * @param {number} col The column index.
  18574. * @returns {GC.Spread.Sheets.SortState} The sort state of the current filter.
  18575. */
  18576. getSortState(col: number): GC.Spread.Sheets.SortState;
  18577. /**
  18578. * Gets a value that indicates whether any row or specified column is filtered.
  18579. * @param {number} col The column index.
  18580. * @returns {boolean} No parameter <c>true</c> if some rows are filtered; otherwise, <c>false</c>.
  18581. * One parameter col <c>true</c> if the specified column is filtered; otherwise, <c>false</c>.
  18582. * @example
  18583. * //This example uses the isFiltered method.
  18584. * activeSheet.setValue(0, 0, "North");
  18585. * activeSheet.setValue(1, 0, "South");
  18586. * activeSheet.setValue(2, 0, "East");
  18587. * activeSheet.setValue(3, 0, "South");
  18588. * activeSheet.setValue(4, 0, "North");
  18589. * activeSheet.setValue(5, 0, "North");
  18590. * activeSheet.setValue(6, 0, "West");
  18591. * activeSheet.setColumnWidth(0, 80);
  18592. * //Set a row filter.
  18593. * activeSheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(0, 0, 7, 1)));
  18594. * //button
  18595. * $("#button1").click(function () {
  18596. * var rowFilter = spread.getActiveSheet().rowFilter();
  18597. * if (rowFilter.isFiltered(0)) {
  18598. * alert("Row-filtering executed for Column1");
  18599. * } else {
  18600. * alert("Row-filtering not executed for Column1");
  18601. * }
  18602. * });
  18603. * //Add button control to page
  18604. * &lt;input type="button" id="button1" value="button1"/&gt;
  18605. */
  18606. isFiltered(col?: number): boolean;
  18607. /**
  18608. * Determines whether the specified row is filtered out.
  18609. * @param {number} row The row index.
  18610. * @returns {boolean} <c>true</c> if the row is filtered out; otherwise, <c>false</c>.
  18611. */
  18612. isRowFilteredOut(row: number): boolean;
  18613. /**
  18614. * Performs the action when some columns have just been filtered or unfiltered.
  18615. * @param {object} args An object that contains the <i>action</i>, <i>sheet</i>, <i>range</i>, <i>filteredRows</i>, and <i>filteredOutRows</i>. See the Remarks for additional information.
  18616. */
  18617. onFilter(args: GC.Spread.Sheets.Filter.IFilteredArgs): void;
  18618. /**
  18619. * Opens the filter dialog when the user clicks the filter button.
  18620. * @param {GC.Spread.Sheets.IFilterButtonHitInfo} filterButtonHitInfo The hit test information about the filter button.
  18621. */
  18622. openFilterDialog(filterButtonHitInfo: GC.Spread.Sheets.IFilterButtonHitInfo): void;
  18623. /**
  18624. * Removes the specified filter.
  18625. * @param {number} col The column index.
  18626. */
  18627. removeFilterItems(col: number): void;
  18628. /**
  18629. * Clears all filters.
  18630. */
  18631. reset(): void;
  18632. /**
  18633. * Sorts the specified column in the specified order.
  18634. * @param {number} col The column index.
  18635. * @param {boolean} ascending Set to <c>true</c> to sort as ascending.
  18636. */
  18637. sortColumn(col: number, ascending: boolean): void;
  18638. /**
  18639. * Saves the object state to a JSON string.
  18640. * @returns {object} The row filter data.
  18641. */
  18642. toJSON(): Object;
  18643. /**
  18644. * Removes the filter from the specified column.
  18645. * @param {number} col The index of the column for which to remove the filter; if it is omitted, removes the filter for all columns in the range.
  18646. */
  18647. unfilter(col?: number): void;
  18648. }
  18649. }
  18650. module FloatingObjects{
  18651. export class FloatingObject{
  18652. /**
  18653. * Represents a floating object.
  18654. * @class
  18655. * @param {string} name The name of the floating object.
  18656. * @param {number} x The <i>x</i> location of the floating object.
  18657. * @param {number} y The <i>y</i> location of the floating object.
  18658. * @param {number} width The width of the floating object.
  18659. * @param {number} height The height of the floating object.
  18660. * @remarks
  18661. * This is a base class that is intended for internal use.
  18662. * @example
  18663. * //This example creates a floating object.
  18664. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  18665. * var btn = document.createElement('button');
  18666. * btn.style.width = "60px";
  18667. * btn.style.height = "30px";
  18668. * btn.innerText = "button";
  18669. * customFloatingObject.content(btn);
  18670. * activeSheet.floatingObjects.add(customFloatingObject);
  18671. */
  18672. constructor(name: string, x: number, y: number, width: number, height: number);
  18673. /** Represents the type name string used for supporting serialization.
  18674. * @type {string}
  18675. */
  18676. typeName: string;
  18677. /**
  18678. * Gets or sets whether to disable moving the floating object.
  18679. * @param {boolean} value The setting for whether to disable moving the floating object.
  18680. * @returns {boolean | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the setting for whether to disable moving the floating object; otherwise, returns the floating object.
  18681. * @example
  18682. * //This example prevents you from moving or resizing the floating object.
  18683. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  18684. * var btn = document.createElement('button');
  18685. * btn.style.width = "60px";
  18686. * btn.style.height = "30px";
  18687. * btn.innerText = "button";
  18688. * customFloatingObject.allowResize(false);
  18689. * customFloatingObject.allowMove(false);
  18690. * customFloatingObject.content(btn);
  18691. * activeSheet.floatingObjects.add(customFloatingObject);
  18692. */
  18693. allowMove(value?: boolean): any;
  18694. /**
  18695. * Gets or sets whether to disable resizing the floating object.
  18696. * @param {boolean} value The setting for whether to disable resizing the floating object.
  18697. * @returns {boolean | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the setting for whether to disable resizing the floating object; otherwise, returns the floating object.
  18698. * @example
  18699. * //This example prevents you from moving or resizing the floating object.
  18700. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  18701. * var btn = document.createElement('button');
  18702. * btn.style.width = "60px";
  18703. * btn.style.height = "30px";
  18704. * btn.innerText = "button";
  18705. * customFloatingObject.allowResize(false);
  18706. * customFloatingObject.allowMove(false);
  18707. * customFloatingObject.content(btn);
  18708. * activeSheet.floatingObjects.add(customFloatingObject);
  18709. */
  18710. allowResize(value?: boolean): any;
  18711. /**
  18712. * Gets a copy of the current content of the instance.
  18713. * @returns {HTMLElement} A copy of the current content of the instance.
  18714. */
  18715. cloneContent(): HTMLElement;
  18716. /**
  18717. * Gets or sets the content of the custom floating object.
  18718. * @param {HTMLElement} value The content of the custom floating object.
  18719. * @returns {HTMLElement | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the content of the custom floating object; otherwise, returns the floating object.
  18720. */
  18721. content(value?: HTMLElement): any;
  18722. /**
  18723. * Gets or sets whether the object moves when hiding or showing, resizing, or moving rows or columns.
  18724. * @param {boolean} value The value indicates whether the object moves when hiding or showing, resizing, or moving rows or columns.
  18725. * @returns {boolean | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns whether this floating object dynamically moves; otherwise, returns the floating object.
  18726. * @example
  18727. * //This example creates a floating object.
  18728. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  18729. * customFloatingObject.isVisible(true);
  18730. * customFloatingObject.dynamicSize(true);
  18731. * customFloatingObject.dynamicMove(true);
  18732. * var btn = document.createElement('button');
  18733. * btn.style.width = "60px";
  18734. * btn.style.height = "30px";
  18735. * btn.innerText = "button";
  18736. * customFloatingObject.content(btn);
  18737. * activeSheet.floatingObjects.add(customFloatingObject);
  18738. */
  18739. dynamicMove(value?: boolean): any;
  18740. /**
  18741. * Gets or sets whether the size of the object changes when hiding or showing, resizing, or moving rows or columns.
  18742. * @param {boolean} value The value indicates whether the size of the object changes when hiding or showing, resizing, or moving rows or columns.
  18743. * @returns {boolean | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns whether this floating object dynamically changes size; otherwise, returns the floating object.
  18744. * @example
  18745. * //This example creates a floating object.
  18746. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  18747. * customFloatingObject.isVisible(true);
  18748. * customFloatingObject.dynamicSize(true);
  18749. * customFloatingObject.dynamicMove(true);
  18750. * var btn = document.createElement('button');
  18751. * btn.style.width = "60px";
  18752. * btn.style.height = "30px";
  18753. * btn.innerText = "button";
  18754. * customFloatingObject.content(btn);
  18755. * activeSheet.floatingObjects.add(customFloatingObject);
  18756. */
  18757. dynamicSize(value?: boolean): any;
  18758. /**
  18759. * Gets or sets the end column index of the floating object position.
  18760. * @param {number} value The end column index of the floating object position.
  18761. * @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the end column index of the floating object position; otherwise, returns the floating object.
  18762. * @example
  18763. * //This example creates a floating object.
  18764. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  18765. * var btn = document.createElement('button');
  18766. * btn.style.width = "60px";
  18767. * btn.style.height = "30px";
  18768. * btn.innerText = "button";
  18769. * customFloatingObject.content(btn);
  18770. * activeSheet.floatingObjects.add(customFloatingObject);
  18771. * //takes effect when added into the sheet.
  18772. * customFloatingObject.startRow(2);
  18773. * customFloatingObject.startColumn(2);
  18774. * customFloatingObject.startRowOffset(10);
  18775. * customFloatingObject.startColumnOffset(10);
  18776. * customFloatingObject.endRow(7);
  18777. * customFloatingObject.endColumn(5);
  18778. * customFloatingObject.endRowOffset(10);
  18779. * customFloatingObject.endColumnOffset(10);
  18780. */
  18781. endColumn(value?: number): any;
  18782. /**
  18783. * Gets or sets the offset relative to the end column of the floating object.
  18784. * @param {number} value The offset relative to the end column of the floating object.
  18785. * @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the offset relative to the end column of the floating object; otherwise, returns the floating object.
  18786. * @example
  18787. * //This example creates a floating object.
  18788. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  18789. * var btn = document.createElement('button');
  18790. * btn.style.width = "60px";
  18791. * btn.style.height = "30px";
  18792. * btn.innerText = "button";
  18793. * customFloatingObject.content(btn);
  18794. * activeSheet.floatingObjects.add(customFloatingObject);
  18795. * //takes effect when added into the sheet.
  18796. * customFloatingObject.startRow(2);
  18797. * customFloatingObject.startColumn(2);
  18798. * customFloatingObject.startRowOffset(10);
  18799. * customFloatingObject.startColumnOffset(10);
  18800. * customFloatingObject.endRow(7);
  18801. * customFloatingObject.endColumn(5);
  18802. * customFloatingObject.endRowOffset(10);
  18803. * customFloatingObject.endColumnOffset(10);
  18804. */
  18805. endColumnOffset(value?: number): any;
  18806. /**
  18807. * Gets or sets the end row index of the floating object position.
  18808. * @param {number} value The end row index of the floating object position.
  18809. * @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the end row index of the floating object position; otherwise, returns the floating object.
  18810. * @example
  18811. * //This example creates a floating object.
  18812. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  18813. * var btn = document.createElement('button');
  18814. * btn.style.width = "60px";
  18815. * btn.style.height = "30px";
  18816. * btn.innerText = "button";
  18817. * customFloatingObject.content(btn);
  18818. * activeSheet.floatingObjects.add(customFloatingObject);
  18819. * //takes effect when added into the sheet.
  18820. * customFloatingObject.startRow(2);
  18821. * customFloatingObject.startColumn(2);
  18822. * customFloatingObject.startRowOffset(10);
  18823. * customFloatingObject.startColumnOffset(10);
  18824. * customFloatingObject.endRow(7);
  18825. * customFloatingObject.endColumn(5);
  18826. * customFloatingObject.endRowOffset(10);
  18827. * customFloatingObject.endColumnOffset(10);
  18828. */
  18829. endRow(value?: number): any;
  18830. /**
  18831. * Gets or sets the offset relative to the end row of the floating object.
  18832. * @param {number} value The offset relative to the end row of the floating object.
  18833. * @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the offset relative to the end row of the floating object; otherwise, returns the floating object.
  18834. * @example
  18835. * //This example creates a floating object.
  18836. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  18837. * var btn = document.createElement('button');
  18838. * btn.style.width = "60px";
  18839. * btn.style.height = "30px";
  18840. * btn.innerText = "button";
  18841. * customFloatingObject.content(btn);
  18842. * activeSheet.floatingObjects.add(customFloatingObject);
  18843. * //takes effect when added into the sheet.
  18844. * customFloatingObject.startRow(2);
  18845. * customFloatingObject.startColumn(2);
  18846. * customFloatingObject.startRowOffset(10);
  18847. * customFloatingObject.startColumnOffset(10);
  18848. * customFloatingObject.endRow(7);
  18849. * customFloatingObject.endColumn(5);
  18850. * customFloatingObject.endRowOffset(10);
  18851. * customFloatingObject.endColumnOffset(10);
  18852. */
  18853. endRowOffset(value?: number): any;
  18854. /**
  18855. * Gets or sets whether the position of the floating object is fixed. When fixedPosition is true, dynamicMove and dynamicSize are disabled.
  18856. * @param {boolean} value The value indicates whether the position of the floating object is fixed.
  18857. * @returns {boolean | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns whether the position of the floating object is fixed; otherwise, returns the floating object.
  18858. * @example
  18859. * //This example sets the position of the object to fixed.
  18860. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  18861. * customFloatingObject.fixedPosition(true);
  18862. * var btn = document.createElement('button');
  18863. * btn.style.width = "60px";
  18864. * btn.style.height = "30px";
  18865. * btn.innerText = "button";
  18866. * customFloatingObject.content(btn);
  18867. * activeSheet.floatingObjects.add(customFloatingObject);
  18868. */
  18869. fixedPosition(value: boolean): any;
  18870. /**
  18871. * Gets the dom host of the custom content.
  18872. * @returns {Array.<HTMLElement>}
  18873. */
  18874. getHost(): HTMLElement[];
  18875. /**
  18876. * Gets or sets the height of a floating object.
  18877. * @param {number} value The height of a floating object.
  18878. * @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the height of a floating object; otherwise, returns the floating object.
  18879. * @example
  18880. * //This example creates a floating object.
  18881. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1");
  18882. * customFloatingObject.x(10);
  18883. * customFloatingObject.y(10);
  18884. * customFloatingObject.width(60);
  18885. * customFloatingObject.height(64);
  18886. * var btn = document.createElement('button');
  18887. * btn.style.width = "60px";
  18888. * btn.style.height = "30px";
  18889. * btn.innerText = "button";
  18890. * customFloatingObject.content(btn);
  18891. * activeSheet.floatingObjects.add(customFloatingObject);
  18892. */
  18893. height(value?: number): any;
  18894. /**
  18895. * Gets or sets whether this floating object is locked.
  18896. * @param {boolean} value The value that indicates whether this floating object is locked.
  18897. * @returns {boolean | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns whether this floating object is locked; otherwise, returns the floating object.
  18898. * @example
  18899. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1");
  18900. * customFloatingObject.x(10);
  18901. * customFloatingObject.y(10);
  18902. * customFloatingObject.width(60);
  18903. * customFloatingObject.height(64);
  18904. * customFloatingObject.isLocked(true);
  18905. * var btn = document.createElement('button');
  18906. * btn.style.width = "60px";
  18907. * btn.style.height = "30px";
  18908. * btn.innerText = "button";
  18909. * customFloatingObject.content(btn);
  18910. * activeSheet.floatingObjects.add(customFloatingObject);
  18911. * activeSheet.options.isProtected = true;
  18912. */
  18913. isLocked(value?: boolean): any;
  18914. /**
  18915. * Gets or sets whether this floating object is selected.
  18916. * @param {boolean} value The value that indicates whether this floating object is selected.
  18917. * @returns {boolean | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns whether this floating object is selected; otherwise, returns the floating object.
  18918. * @example
  18919. * //This example creates a floating object.
  18920. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  18921. * customFloatingObject.isSelected(true);
  18922. * var btn = document.createElement('button');
  18923. * btn.style.width = "60px";
  18924. * btn.style.height = "30px";
  18925. * btn.innerText = "button";
  18926. * customFloatingObject.content(btn);
  18927. * activeSheet.floatingObjects.add(customFloatingObject);
  18928. */
  18929. isSelected(value?: boolean): any;
  18930. /**
  18931. * Gets or sets whether this floating object is visible.
  18932. * @param {boolean} value The value that indicates whether this floating object is visible.
  18933. * @returns {boolean | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns whether this floating object is visible; otherwise, returns the floating object.
  18934. * @example
  18935. * //This example creates a floating object.
  18936. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  18937. * customFloatingObject.isVisible(true);
  18938. * customFloatingObject.dynamicSize(true);
  18939. * customFloatingObject.dynamicMove(true);
  18940. * var btn = document.createElement('button');
  18941. * btn.style.width = "60px";
  18942. * btn.style.height = "30px";
  18943. * btn.innerText = "button";
  18944. * customFloatingObject.content(btn);
  18945. * activeSheet.floatingObjects.add(customFloatingObject);
  18946. */
  18947. isVisible(value?: boolean): any;
  18948. /**
  18949. * Gets the name of the floating object.
  18950. * @param {string} value The name of the floating object.
  18951. * @returns {string | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the name of the floating object; otherwise, returns the floating object.
  18952. * @example
  18953. * //This example uses the name method.
  18954. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject();
  18955. * customFloatingObject.name("f1");
  18956. * customFloatingObject.x(10);
  18957. * customFloatingObject.y(10);
  18958. * customFloatingObject.width(60);
  18959. * customFloatingObject.height(64);
  18960. * var btn = document.createElement('button');
  18961. * btn.style.width = "60px";
  18962. * btn.style.height = "30px";
  18963. * btn.innerText = "button";
  18964. * customFloatingObject.content(btn);
  18965. * activeSheet.floatingObjects.add(customFloatingObject);
  18966. */
  18967. name(value?: string): any;
  18968. /**
  18969. * Refresh the content in floatingObject.The user should override this method to make their content synchronize with the floatingObject.
  18970. */
  18971. refreshContent(): void;
  18972. /**
  18973. * Gets or sets the starting column index of the floating object position.
  18974. * @param {number} value The starting column index of the floating object position.
  18975. * @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the starting column index of the floating object position; otherwise, returns the floating object.
  18976. * @example
  18977. * //This example creates a floating object.
  18978. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  18979. * var btn = document.createElement('button');
  18980. * btn.style.width = "60px";
  18981. * btn.style.height = "30px";
  18982. * btn.innerText = "button";
  18983. * customFloatingObject.content(btn);
  18984. * activeSheet.floatingObjects.add(customFloatingObject);
  18985. * //takes effect when added into the sheet.
  18986. * customFloatingObject.startRow(2);
  18987. * customFloatingObject.startColumn(2);
  18988. * customFloatingObject.startRowOffset(10);
  18989. * customFloatingObject.startColumnOffset(10);
  18990. */
  18991. startColumn(value?: number): any;
  18992. /**
  18993. * Gets or sets the offset relative to the start column of the floating object.
  18994. * @param {number} value The offset relative to the start column of the floating object.
  18995. * @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the offset relative to the start column of the floating object; otherwise, returns the floating object.
  18996. * @example
  18997. * //This example creates a floating object.
  18998. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  18999. * var btn = document.createElement('button');
  19000. * btn.style.width = "60px";
  19001. * btn.style.height = "30px";
  19002. * btn.innerText = "button";
  19003. * customFloatingObject.content(btn);
  19004. * activeSheet.floatingObjects.add(customFloatingObject);
  19005. * //takes effect when added into the sheet.
  19006. * customFloatingObject.startRow(2);
  19007. * customFloatingObject.startColumn(2);
  19008. * customFloatingObject.startRowOffset(10);
  19009. * customFloatingObject.startColumnOffset(10);
  19010. */
  19011. startColumnOffset(value?: number): any;
  19012. /**
  19013. * Gets or sets the starting row index of the floating object position.
  19014. * @param {number} value The starting row index of the floating object position.
  19015. * @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the starting row index of the floating object position; otherwise, returns the floating object.
  19016. * @example
  19017. * //This example creates a floating object.
  19018. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  19019. * var btn = document.createElement('button');
  19020. * btn.style.width = "60px";
  19021. * btn.style.height = "30px";
  19022. * btn.innerText = "button";
  19023. * customFloatingObject.content(btn);
  19024. * activeSheet.floatingObjects.add(customFloatingObject);
  19025. * //takes effect when added into the sheet.
  19026. * customFloatingObject.startRow(2);
  19027. * customFloatingObject.startColumn(2);
  19028. * customFloatingObject.startRowOffset(10);
  19029. * customFloatingObject.startColumnOffset(10);
  19030. */
  19031. startRow(value?: number): any;
  19032. /**
  19033. * Gets or sets the offset relative to the start row of the floating object.
  19034. * @param {number} value The offset relative to the start row of the floating object.
  19035. * @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the offset relative to the start row of the floating object; otherwise, returns the floating object.
  19036. * @example
  19037. * //This example creates a floating object.
  19038. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  19039. * var btn = document.createElement('button');
  19040. * btn.style.width = "60px";
  19041. * btn.style.height = "30px";
  19042. * btn.innerText = "button";
  19043. * customFloatingObject.content(btn);
  19044. * activeSheet.floatingObjects.add(customFloatingObject);
  19045. * //takes effect when added into the sheet.
  19046. * customFloatingObject.startRow(2);
  19047. * customFloatingObject.startColumn(2);
  19048. * customFloatingObject.startRowOffset(10);
  19049. * customFloatingObject.startColumnOffset(10);
  19050. */
  19051. startRowOffset(value?: number): any;
  19052. /**
  19053. * Gets or sets the width of a floating object.
  19054. * @param {number} value The width of a floating object.
  19055. * @returns {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the width of a floating object; otherwise, returns the floating object.
  19056. * @example
  19057. * //This example creates a floating object.
  19058. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1");
  19059. * customFloatingObject.x(10);
  19060. * customFloatingObject.y(10);
  19061. * customFloatingObject.width(60);
  19062. * customFloatingObject.height(64);
  19063. * var btn = document.createElement('button');
  19064. * btn.style.width = "60px";
  19065. * btn.style.height = "30px";
  19066. * btn.innerText = "button";
  19067. * customFloatingObject.content(btn);
  19068. * activeSheet.floatingObjects.add(customFloatingObject);
  19069. */
  19070. width(value?: number): any;
  19071. /**
  19072. * Gets or sets the horizontal location of the floating object.
  19073. * @param {number} value The horizontal location of the floating object.
  19074. * @return {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the horizontal location of the floating object; otherwise, returns the floating object.
  19075. * @example
  19076. * //This example creates a floating object.
  19077. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1");
  19078. * customFloatingObject.x(10);
  19079. * customFloatingObject.y(10);
  19080. * customFloatingObject.width(60);
  19081. * customFloatingObject.height(64);
  19082. * var btn = document.createElement('button');
  19083. * btn.style.width = "60px";
  19084. * btn.style.height = "30px";
  19085. * btn.innerText = "button";
  19086. * customFloatingObject.content(btn);
  19087. * activeSheet.floatingObjects.add(customFloatingObject);
  19088. */
  19089. x(value?: number): any;
  19090. /**
  19091. * Gets or sets the vertical location of the floating object.
  19092. * @param {number} value The vertical location of the floating object.
  19093. * @return {number | GC.Spread.Sheets.FloatingObjects.FloatingObject} If no value is set, returns the vertical location of the floating object; otherwise, returns the floating object.
  19094. * @example
  19095. * //This example creates a floating object.
  19096. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1");
  19097. * customFloatingObject.x(10);
  19098. * customFloatingObject.y(10);
  19099. * customFloatingObject.width(60);
  19100. * customFloatingObject.height(64);
  19101. * var btn = document.createElement('button');
  19102. * btn.style.width = "60px";
  19103. * btn.style.height = "30px";
  19104. * btn.innerText = "button";
  19105. * customFloatingObject.content(btn);
  19106. * activeSheet.floatingObjects.add(customFloatingObject);
  19107. */
  19108. y(value?: number): any;
  19109. }
  19110. export class FloatingObjectCollection{
  19111. /**
  19112. * Represents a floating object manager that managers all floating objects in a sheet.
  19113. * @class
  19114. * @param {GC.Spread.Sheets.Worksheet} sheet The worksheet.
  19115. * @param {string} typeName The type name.
  19116. */
  19117. constructor(sheet?: GC.Spread.Sheets.Worksheet, typeName?: string);
  19118. /**
  19119. * Adds a floating object to the sheet.
  19120. * The arguments has 2 modes.
  19121. * If there is 1 parameter, the parameter is floatingObject which is a GC.Spread.Sheets.FloatingObjects.FloatingObject type.
  19122. * If there are 6 parameters, the parameters are name, src, x, y, width, and height.
  19123. * @param {GC.Spread.Sheets.FloatingObjects.FloatingObject|string} floatingObjectOrName The floating object that will be added to the sheet, or the name of the picture that will be added to the sheet.
  19124. * @param {string} src The image source of the picture.
  19125. * @param {number} x The x location of the picture.
  19126. * @param {number} y The y location of the picture.
  19127. * @param {number} width The width of the picture.
  19128. * @param {number} height The height of the picture.
  19129. * @return {GC.Spread.Sheets.FloatingObjects.FloatingObject} The floating object that has been added to the sheet.
  19130. * @example
  19131. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
  19132. * var btn = document.createElement('button');
  19133. * btn.style.width = "60px";
  19134. * btn.style.height = "30px";
  19135. * btn.innerText = "button";
  19136. * customFloatingObject.content(btn);
  19137. * activeSheet.floatingObjects.add(customFloatingObject);
  19138. */
  19139. add(floatingObjectOrName: GC.Spread.Sheets.FloatingObjects.FloatingObject | string, src?: string, x?: number, y?: number, width?: number, height?: number): GC.Spread.Sheets.FloatingObjects.FloatingObject;
  19140. /**
  19141. * Gets all of the floating objects in the sheet.
  19142. * @return {Array.<GC.Spread.Sheets.FloatingObjects.FloatingObject>} The collection of all the floating objects in the sheet.
  19143. * @example
  19144. * activeSheet.pictures.add("p1", "pics/download.jpg", 1, 6, 400, 400);
  19145. * activeSheet.pictures.add("p2", "pics/download.jpg", 500, 150, 200, 300);
  19146. * var pictures = activeSheet.pictures.all();
  19147. * for (var i = 0; i &lt; pictures.length; i++) {
  19148. * alert("Path of picture " + i + " is: " + pictures[i].src())
  19149. * }
  19150. */
  19151. all(): GC.Spread.Sheets.FloatingObjects.FloatingObject[];
  19152. /**
  19153. * Removes all floating objects in the sheet.
  19154. */
  19155. clear(): void;
  19156. /**
  19157. * Gets a floating object from the sheet by the indicate name.
  19158. * @param {string} name The name of the floating object.
  19159. * @return {GC.Spread.Sheets.FloatingObjects.FloatingObject} The floating object in the sheet with the indicate name.
  19160. * @example
  19161. * activeSheet.pictures.add("f2","tsoutline.png",100,60,200,100);
  19162. * //button
  19163. * $("#button1").click(function () {
  19164. * var pic = activeSheet.pictures.get("f2");
  19165. * });
  19166. */
  19167. get(name: string): GC.Spread.Sheets.FloatingObjects.FloatingObject;
  19168. /**
  19169. * Removes a floating object from the sheet by the indicate name.
  19170. * @param {string} name The name of the floating object.
  19171. * @example
  19172. * activeSheet.pictures.add("f2","tsoutline.png",100,60,200,100);
  19173. * //button
  19174. * $("#button1").click(function () {
  19175. * activeSheet.resumePaint();
  19176. * activeSheet.pictures.remove("f2");
  19177. * activeSheet.repaint();
  19178. * });
  19179. */
  19180. remove(name: string): void;
  19181. /**
  19182. * Gets or sets the z-index of floating object.
  19183. * @param {string} name The name of the floatingObject.
  19184. * @param {number} zIndex The z-index of the floating object.
  19185. * @return {number | *} If the parameter 'zIndex' is null or undefined,it will return the z-index of the floating object with the indicate name.
  19186. * @example
  19187. * var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 20, 20, 60, 64);
  19188. * var btn = document.createElement('button');
  19189. * btn.style.width = "60px";
  19190. * btn.style.height = "30px";
  19191. * btn.innerText = "button1";
  19192. * customFloatingObject.content(btn);
  19193. * activeSheet.floatingObjects.add(customFloatingObject);
  19194. * var customFloatingObject1 = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f2", 5, 5, 30, 64);
  19195. * var btn1 = document.createElement('button');
  19196. * btn1.style.width = "60px";
  19197. * btn1.style.height = "30px";
  19198. * btn1.innerText = "button2";
  19199. * customFloatingObject1.content(btn1);
  19200. * activeSheet.floatingObjects.add(customFloatingObject1);
  19201. * activeSheet.floatingObjects.zIndex("f2", 897);
  19202. * activeSheet.floatingObjects.zIndex("f1", 898);
  19203. */
  19204. zIndex(name: string, zIndex?: number): any;
  19205. }
  19206. export class Picture extends FloatingObject{
  19207. /**
  19208. * Represents a picture.
  19209. * @extends GC.Spread.Sheets.FloatingObjects.FloatingObject
  19210. * @class
  19211. * @param {string} name The name of the picture.
  19212. * @param {string} src The image source of the picture.
  19213. * @param {number} x The <i>x</i> location of the picture.
  19214. * @param {number} y The <i>y</i> location of the picture.
  19215. * @param {number} width The width of the picture.
  19216. * @param {number} height The height of the picture.
  19217. */
  19218. constructor(name: string, src: string, x: number, y: number, width: number, height: number);
  19219. /**
  19220. * Gets or sets the background color of the picture.
  19221. * @param {string} value The backcolor of the picture.
  19222. * @returns {string | GC.Spread.Sheets.FloatingObjects.Picture} If no value is set, returns the backcolor of the picture; otherwise, returns the picture.
  19223. * @example
  19224. * //This example sets the backcolor of the picture.
  19225. * activeSheet.pictures.add("f2","Event.png",2,2,10,10);
  19226. * var picture = activeSheet.pictures.get("f2");
  19227. * picture.pictureStretch(GC.Spread.Sheets.ImageLayout.stretch);
  19228. * picture.backColor("Blue");
  19229. * picture.borderWidth(2);
  19230. * picture.borderColor("Red");
  19231. */
  19232. backColor(value?: string): any;
  19233. /**
  19234. * Gets or sets the border color of the picture.
  19235. * @param {string} value The border color of the picture.
  19236. * @returns {string | GC.Spread.Sheets.FloatingObjects.Picture} If no value is set, returns the border color of the picture; otherwise, returns the picture.
  19237. * @example
  19238. * //This example sets the border color of the picture.
  19239. * activeSheet.pictures.add("f2","Event.png",2,2,10,10);
  19240. * var picture = activeSheet.pictures.get("f2");
  19241. * picture.pictureStretch(GC.Spread.Sheets.ImageLayout.stretch);
  19242. * picture.backColor("Blue");
  19243. * picture.borderWidth(2);
  19244. * picture.borderColor("Red");
  19245. */
  19246. borderColor(value?: string): any;
  19247. /**
  19248. * Gets or sets the border radius of the picture.
  19249. * @param {number} value The border radius of the picture.
  19250. * @returns {number | GC.Spread.Sheets.FloatingObjects.Picture} If no value is set, returns the border radius of the picture; otherwise, returns the picture.
  19251. * @example
  19252. * //This example uses the borderRadius method.
  19253. * activeSheet.pictures.add("f2","Event.png",2,2,10,10);
  19254. * var picture = activeSheet.pictures.get("f2");
  19255. * picture.pictureStretch(GC.Spread.Sheets.ImageLayout.center);
  19256. * picture.backColor("Blue");
  19257. * picture.borderWidth(2);
  19258. * picture.borderColor("Red");
  19259. * picture.borderStyle("dotted");
  19260. * picture.borderRadius(5);
  19261. */
  19262. borderRadius(value?: number): any;
  19263. /**
  19264. * Gets or sets the border style of the picture.
  19265. * @param {string} value The css border style of the picture, such as dotted, dashed, solid, and so on.
  19266. * @returns {string | GC.Spread.Sheets.FloatingObjects.Picture} If no value is set, returns the border style of the picture; otherwise, returns the picture.
  19267. * @example
  19268. * //This example uses the borderStyle method.
  19269. * activeSheet.pictures.add("f2","Event.png",2,2,10,10);
  19270. * var picture = activeSheet.pictures.get("f2");
  19271. * picture.pictureStretch(GC.Spread.Sheets.ImageLayout.center);
  19272. * picture.backColor("Blue");
  19273. * picture.borderWidth(2);
  19274. * picture.borderColor("Red");
  19275. * picture.borderStyle("dotted");
  19276. * picture.borderRadius(5);
  19277. */
  19278. borderStyle(value?: string): any;
  19279. /**
  19280. * Gets or sets the border width of the picture.
  19281. * @param {number} value The border width of the picture.
  19282. * @returns {number | GC.Spread.Sheets.FloatingObjects.Picture} If no value is set, returns the border width of the picture; otherwise, returns the picture.
  19283. * @example
  19284. * //This example uses the borderWidth method.
  19285. * activeSheet.pictures.add("f2","Event.png",2,2,10,10);
  19286. * var picture = activeSheet.pictures.get("f2");
  19287. * picture.pictureStretch(GC.Spread.Sheets.ImageLayout.stretch);
  19288. * picture.backColor("Blue");
  19289. * picture.borderWidth(2);
  19290. * picture.borderColor("Red");
  19291. */
  19292. borderWidth(value?: number): any;
  19293. /**
  19294. * Gets the original height of the picture.
  19295. * @returns {number} The original height of the picture.
  19296. * @example
  19297. * activeSheet.pictures.add("f2","Event.png",2,2,6,6);
  19298. * activeSheet.pictures.add("f1","tsoutline.png",3,0,6,6);
  19299. * var picture = activeSheet.pictures.get("f2");
  19300. * picture.pictureStretch(GC.Spread.Sheets.ImageLayout.center);
  19301. * //button
  19302. * $("#button1").click(function () {
  19303. * alert(picture.getOriginalHeight());
  19304. * });
  19305. */
  19306. getOriginalHeight(): number;
  19307. /**
  19308. * Gets the original width of the picture.
  19309. * @returns {number} The original width of the picture.
  19310. * @example
  19311. * activeSheet.pictures.add("f2","Event.png",2,2,6,6);
  19312. * activeSheet.pictures.add("f1","tsoutline.png",3,0,6,6);
  19313. * var picture = activeSheet.pictures.get("f2");
  19314. * picture.pictureStretch(GC.Spread.Sheets.ImageLayout.center);
  19315. * //button
  19316. * $("#button1").click(function () {
  19317. * alert(picture.getOriginalWidth());
  19318. * });
  19319. */
  19320. getOriginalWidth(): number;
  19321. /**
  19322. * Gets or sets the stretch of the picture.
  19323. * @param {GC.Spread.Sheets.ImageLayout} value The stretch of the picture.
  19324. * @returns {GC.Spread.Sheets.ImageLayout | GC.Spread.Sheets.FloatingObjects.Picture} If no value is set, returns the stretch of the picture; otherwise, returns the picture.
  19325. * @example
  19326. * //This example uses the pictureStretch method.
  19327. * activeSheet.pictures.add("f2","Event.png",2,2,10,10);
  19328. * var picture = activeSheet.pictures.get("f2");
  19329. * picture.pictureStretch(GC.Spread.Sheets.ImageLayout.stretch);
  19330. * picture.backColor("Blue");
  19331. * picture.borderWidth(2);
  19332. * picture.borderColor("Red");
  19333. */
  19334. pictureStretch(value?: GC.Spread.Sheets.ImageLayout): any;
  19335. /**
  19336. * Gets or sets the src of the picture.
  19337. * @param {string} value The src of the picture.
  19338. * @returns {string | GC.Spread.Sheets.FloatingObjects.Picture} If no value is set, returns the src of the picture; otherwise, returns the picture.
  19339. */
  19340. src(value?: string): any;
  19341. }
  19342. }
  19343. module FormulaTextBox{
  19344. export interface IFormulaTextBoxOptions{
  19345. rangeSelectMode: boolean;
  19346. absoluteReference: boolean;
  19347. needSheetName?: boolean;
  19348. }
  19349. export class FormulaTextBox{
  19350. /**
  19351. * Represents a formula text box.
  19352. * @class
  19353. * @param {HTMLElement} host The DOM element. It can be INPUT, TEXTAREA, or editable DIV.
  19354. * @param {Object} options The options. Default is {rangeSelectMode: false, absoluteReference: false}
  19355. * @example
  19356. * window.onload = function(){
  19357. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 1 });
  19358. * rangeSelector = new GC.Spread.Sheets.FormulaTextBox.FormulaTextBox(document.getElementById("ftb"), {rangeSelectMode: true});
  19359. * rangeSelector.workbook(spread);
  19360. * }
  19361. * function buttonClick(){
  19362. * alert(rangeSelector.text());
  19363. * }
  19364. */
  19365. constructor(host: HTMLElement, options: GC.Spread.Sheets.FormulaTextBox.IFormulaTextBoxOptions);
  19366. /**
  19367. * Adds a custom function description.
  19368. * @param {GC.Spread.CalcEngine.Functions.IFunctionDescription} functionDescription The function description to add. This can be an array. See the Remarks for more information.
  19369. */
  19370. add(functionDescription: GC.Spread.CalcEngine.Functions.IFunctionDescription): void;
  19371. /**
  19372. * Gets or sets whether the text box uses automatic complete.
  19373. * @param {boolean} value Whether to use automatic complete when editing.
  19374. * @returns {boolean} If no value is set, returns whether the text box uses auto complete; otherwise, there is no return value.
  19375. */
  19376. autoComplete(value?: boolean): boolean;
  19377. /**
  19378. * Binds an event.
  19379. * @param {string} type The event type.
  19380. * @param {Object} data Optional. Specifies additional data to pass along to the function.
  19381. * @param {Function} fn Specifies the function to run when the event occurs.
  19382. */
  19383. bind(type: string, data: Object, fn: Function): void;
  19384. /**
  19385. * Gets or sets the cursor position.
  19386. * @param {number} value The cursor position.
  19387. * @returns {number} If no value is set, returns the cursor position; otherwise, there is no return value.
  19388. */
  19389. caret(value?: number): any;
  19390. /**
  19391. * Removes host from formula text box and removes all binding events.
  19392. */
  19393. destroy(): void;
  19394. /**
  19395. * refresh the formula text box with the active cell.
  19396. */
  19397. refresh(): void;
  19398. /**
  19399. * Removes a custom function description.
  19400. * @param {string} name The custom function description name.
  19401. */
  19402. remove(name: string): void;
  19403. /**
  19404. * Gets or sets whether to display the function's help tip.
  19405. * @param {boolean} value Whether to display the function's help tip when editing.
  19406. * @returns {boolean} If no value is set, returns whether the text box displays the function's help tip when editing; otherwise, there is no return value.
  19407. */
  19408. showHelp(value?: boolean): any;
  19409. /**
  19410. * Gets or sets the text.
  19411. * @param {string} value The text.
  19412. * @returns {string} If no value is set, returns the text; otherwise, there is no return value.
  19413. */
  19414. text(value?: string): string;
  19415. /**
  19416. * Removes the binding of an event.
  19417. * @param {string} type The event type.
  19418. * @param {Function} fn Specifies the function for which to remove the binding.
  19419. */
  19420. unbind(type: string, fn: Function): void;
  19421. /**
  19422. * Removes the binding of all events.
  19423. */
  19424. unbindAll(): void;
  19425. /**
  19426. * Gets or sets the Workbook component to work with the formula text box.
  19427. * @param {GC.Spread.Sheets.Workbook} value The Workbook component.
  19428. * @returns {GC.Spread.Sheets.Workbook} If no value is set, returns the workbook component; otherwise, there is no return value.
  19429. * @example
  19430. * window.onload = function(){
  19431. * var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3});
  19432. * var activeSheet = spread.getActiveSheet();
  19433. * activeSheet.setArray(0, 0, [1, 2, 3, 4, 5]);
  19434. * var fbx = new GC.Spread.Sheets.FormulaTextBox.FormulaTextBox(document.getElementById("formulaTextBox"));
  19435. * fbx.workbook(spread);
  19436. * };
  19437. */
  19438. workbook(value?: GC.Spread.Sheets.Workbook): GC.Spread.Sheets.Workbook;
  19439. }
  19440. }
  19441. module Hyperlink{
  19442. /**
  19443. * Present the way that user open the hyperlinked document. Default is blank.
  19444. * @enum {number}
  19445. * @example
  19446. * //This example uses the HyperlinkTargetType.
  19447. * sheet.setHyperlink(1, 1, {
  19448. * url: 'https://www.grapecity.com/spreadjs',
  19449. * tooltip: 'baidu',
  19450. * target: GC.Spread.Sheets.Hyperlink.HyperlinkTargetType.top,
  19451. * }, GC.Spread.Sheets.SheetArea.viewport);
  19452. */
  19453. export enum HyperlinkTargetType{
  19454. /**
  19455. * Opens the hyperlinked document in a new window or tab.
  19456. */
  19457. blank= 0,
  19458. /**
  19459. * Opens the hyperlinked document in the same frame where the user clicked.
  19460. */
  19461. self= 1,
  19462. /**
  19463. * Opens the hyperlinked document in the parent frame.
  19464. */
  19465. parent= 2,
  19466. /**
  19467. * Opens the hyperlinked document in the full body of the window.
  19468. */
  19469. top= 3
  19470. }
  19471. }
  19472. module OutlineColumn{
  19473. export interface IOutlineColumnOptions{
  19474. columnIndex?: number; //OutlineColumn index.
  19475. showImage?: boolean; //Whether to display images.
  19476. images?: string[]; //The images by level (url or base64Image).
  19477. showCheckBox?: boolean; //Whether to display the check box.
  19478. showIndicator?: boolean; //Whether to display the indicator.
  19479. expandIndicator?: string; //The expand indicator (url or base64Image).
  19480. collapseIndicator?: string; //The collapse indicator (url or base64Image).
  19481. maxLevel?: number; //When the current row level is greater than maxLevel, the IncreaseCellIndent action does not take effect.
  19482. }
  19483. export class OutlineColumn{
  19484. /**
  19485. * Represents an indented column.
  19486. * @class
  19487. * @param {GC.Spread.Sheets.Worksheet} sheet The outlineColumn's WorkSheet.
  19488. */
  19489. constructor(sheet: GC.Spread.Sheets.Worksheet);
  19490. /**
  19491. * Gets the check status of the row or all rows.
  19492. * @param {number} [row] The index of the row.
  19493. * @returns {boolean|Array.<boolean>} If row is undefined, returns all row's check status; otherwise, returns the check status of the row.
  19494. */
  19495. getCheckStatus(row?: number): any;
  19496. /**
  19497. * Gets the collapsed setting of the row or all rows.
  19498. * @param {number} [row] The index of the collapsed row.
  19499. * @returns {boolean|Array.<boolean>} If row is undefined, returns all row's collapsed status; otherwise, returns the collapsed setting of the row.
  19500. */
  19501. getCollapsed(row?: number): any;
  19502. /**
  19503. * Gets or sets the outlineColumn options.
  19504. * @param {Object} outlineColumnOptions The outlineColumn options.
  19505. * @param {number} outlineColumnOptions.columnIndex - The index of the indented column.
  19506. * @param {boolean} [outlineColumnOptions.showImage] - Whether to display images.
  19507. * @param {Array.<string>} [outlineColumnOptions.images] - The images by level (url or base64Image).
  19508. * @param {boolean} [outlineColumnOptions.showCheckBox] - Whether to display a check box.
  19509. * @param {boolean} [outlineColumnOptions.showIndicator] - Whether to display the indicator.
  19510. * @param {string} [outlineColumnOptions.expandIndicator] - The expand indicator (url or base64Image).
  19511. * @param {string} [outlineColumnOptions.collapseIndicator] - The collapse indicator (url or base64Image).
  19512. * @param {number} [outlineColumnOptions.maxLevel] - When the current row level is greater than maxLevel, the IncreaseCellIndent action does not take effect.
  19513. * @returns {Object | GC.Spread.Sheets.OutlineColumn.OutlineColumn} outlineColumnOptions|outlineColumn
  19514. * If no outlineColumnOptions item is set, returns outlineColumnOptions; otherwise, returns the outlineColumn instance.
  19515. * @example
  19516. * var rowCount = 38;
  19517. * var colCount = 10;
  19518. * activeSheet.setColumnCount(colCount);
  19519. * activeSheet.setRowCount(rowCount);
  19520. * activeSheet.setColumnWidth(0, 310);
  19521. * activeSheet.setColumnWidth(1, 150);
  19522. * activeSheet.setColumnWidth(2, 150);
  19523. * activeSheet.frozenColumnCount(1);
  19524. * activeSheet.setValue(0, 0, "Name", GC.Spread.Sheets.SheetArea.colHeader);
  19525. * activeSheet.setValue(0, 1, "Chapter", GC.Spread.Sheets.SheetArea.colHeader);
  19526. * activeSheet.setValue(0, 2, "Page", GC.Spread.Sheets.SheetArea.colHeader);
  19527. * var commands = [
  19528. * {name: 'Preface', chapter: '1', page: 1, indent: 0},
  19529. * {name: 'Java SE5 and SE6', chapter: '1.1', page: 2, indent: 1},
  19530. * {name: 'Java SE6', chapter: '1.1.1', page: 2, indent: 2},
  19531. * {name: 'The 4th edition', chapter: '1.2', page: 2, indent: 1},
  19532. * {name: 'Changes', chapter: '1.2.1', page: 3, indent: 2},
  19533. * {name: 'Note on the cover design', chapter: '1.3', page: 4, indent: 1},
  19534. * {name: 'Acknowledgements', chapter: '1.4', page: 4, indent: 1},
  19535. * {name: 'Introduction', chapter: '2', page: 9, indent: 0},
  19536. * {name: 'Prerequisites', chapter: '2.1', page: 9, indent: 1},
  19537. * {name: 'Learning Java', chapter: '2.2', page: 10, indent: 1},
  19538. * {name: 'Goals', chapter: '2.3', page: 10, indent: 1},
  19539. * {name: 'Teaching from this book', chapter: '2.4', page: 11, indent: 1},
  19540. * {name: 'JDK HTML documentation', chapter: '2.5', page: 11, indent: 1},
  19541. * {name: 'Exercises', chapter: '2.6', page: 12, indent: 1},
  19542. * {name: 'Foundations for Java', chapter: '2.7', page: 12, indent: 1},
  19543. * {name: 'Source code', chapter: '2.8', page: 12, indent: 1},
  19544. * {name: 'Coding standards', chapter: '2.8.1', page: 14, indent: 2},
  19545. * {name: 'Errors', chapter: '2.9', page: 14, indent: 1},
  19546. * {name: 'Introduction to Objects', chapter: '3', page: 15, indent: 0},
  19547. * {name: 'The progress of abstraction', chapter: '3.1', page: 15, indent: 1},
  19548. * {name: 'An object has an interface', chapter: '3.2', page: 17, indent: 1},
  19549. * {name: 'An object provides services', chapter: '3.3', page: 18, indent: 1},
  19550. * {name: 'The hidden implementation', chapter: '3.4', page: 19, indent: 1},
  19551. * {name: 'Reusing the implementation', chapter: '3.5', page: 20, indent: 1},
  19552. * {name: 'Inheritance', chapter: '3.6', page: 21, indent: 1},
  19553. * {name: 'Is-a vs. is-like-a relationships', chapter: '3.6.1', page: 24, indent: 2},
  19554. * {name: 'Interchangeable objects with polymorphism', chapter: '3.7', page: 25, indent: 1},
  19555. * {name: 'The singly rooted hierarchy', chapter: '3.8', page: 28, indent: 1},
  19556. * {name: 'Containers', chapter: '3.9', page: 28, indent: 1},
  19557. * {name: 'Parameterized types (Generics)', chapter: '3.10', page: 29, indent: 1},
  19558. * {name: 'Object creation & lifetime', chapter: '3.11', page: 30, indent: 1},
  19559. * {name: 'Exception handling: dealing with errors', chapter: '3.12', page: 31, indent: 1},
  19560. * {name: 'Concurrent programming', chapter: '3.13', page: 32, indent: 1},
  19561. * {name: 'Java and the Internet', chapter: '3.14', page: 33, indent: 1},
  19562. * {name: 'What is the Web?', chapter: '3.14.1', page: 33, indent: 2},
  19563. * {name: 'Client-side programming', chapter: '3.14.2', page: 34, indent: 2},
  19564. * {name: 'Server-side programming', chapter: '3.14.3', page: 38, indent: 2},
  19565. * {name: 'Summary', chapter: '3.15', page: 38, indent: 1},
  19566. * ];
  19567. * for (var r = 0; r &lt; commands.length; r++) {
  19568. * activeSheet.setValue(r, 0, commands[r]['name']);
  19569. * activeSheet.setValue(r, 1, commands[r]['chapter']);
  19570. * activeSheet.setValue(r, 2, commands[r]['page']);
  19571. * activeSheet.getRange(r, 0, 1, 1).textIndent(commands[r].indent);
  19572. * }
  19573. * activeSheet.outlineColumn.options({
  19574. * columnIndex: 0,
  19575. * showImage: true,
  19576. * showCheckBox: true,
  19577. * images: ['star2.png', 'box4.png', 'rating4.png'],
  19578. * maxLevel: 2
  19579. * });
  19580. * activeSheet.showRowOutline(true);
  19581. * spread.invalidateLayout();
  19582. * spread.repaint();
  19583. */
  19584. options(outlineColumnOptions?: GC.Spread.Sheets.OutlineColumn.IOutlineColumnOptions): any;
  19585. /**
  19586. * Refreshes the indented column.
  19587. */
  19588. refresh(): void;
  19589. /**
  19590. * Sets the check status of the row.
  19591. * @param {number} row The index of the row.
  19592. * @param {boolean} checkStatus The check status of the row.
  19593. */
  19594. setCheckStatus(row: number, checkStatus: boolean): void;
  19595. /**
  19596. * Sets whether the row is collapsed.
  19597. * @param {number} row The index of the row.
  19598. * @param {boolean} collapsed The collapsed setting for the row.
  19599. */
  19600. setCollapsed(row: number, collapsed: boolean): void;
  19601. }
  19602. }
  19603. module Outlines{
  19604. /**
  19605. * Specifies the status of an outline (range group) summary row or column position.
  19606. * @enum {number}
  19607. * @example
  19608. * sheet.suspendPaint();
  19609. * sheet.rowOutlines.group(3,2);
  19610. * sheet.columnOutlines.group(4,1);
  19611. * sheet.rowOutlines.direction(GC.Spread.Sheets.Outlines.OutlineDirection.backward);
  19612. * sheet.columnOutlines.direction(GC.Spread.Sheets.Outlines.OutlineDirection.forward);
  19613. * sheet.resumePaint();
  19614. */
  19615. export enum OutlineDirection{
  19616. /** The summary row is above or to the left of the group detail.
  19617. * @type {number}
  19618. */
  19619. backward= 0,
  19620. /** The summary row is below or to the right of the group detail.
  19621. * @type {number}
  19622. */
  19623. forward= 1
  19624. }
  19625. /**
  19626. * Specifies the status of an outline (range group).
  19627. * @enum {number}
  19628. * @example
  19629. * //The following example specifies to display a range group as collapsed.
  19630. * sheet.rowOutlines.group(0,5);
  19631. * var rgi = sheet.rowOutlines.find(1, 0);
  19632. * rgi.state(GC.Spread.Sheets.Outlines.OutlineState.collapsed);
  19633. * spread.invalidateLayout();
  19634. * spread.repaint();
  19635. */
  19636. export enum OutlineState{
  19637. /** Indicates expanded status with the minus sign.
  19638. * @type {number}
  19639. */
  19640. expanded= 0,
  19641. /** Indicates collapsed status with the plus sign.
  19642. * @type {number}
  19643. */
  19644. collapsed= 1
  19645. }
  19646. export class Outline{
  19647. /**
  19648. * Represents an outline (range group) for the worksheet.
  19649. * @param {number} count The number of rows or columns.
  19650. * @class
  19651. */
  19652. constructor(count: number);
  19653. /**
  19654. * Gets or sets the outline's (range group) direction.
  19655. * @param {GC.Spread.Sheets.Outlines.OutlineDirection} [direction] The outline's (range group) direction.
  19656. * @returns {GC.Spread.Sheets.Outlines.OutlineDirection | GC.Spread.Sheets.Outlines.Outline} If no value is set, returns the outline's (range group) direction; otherwise, returns the outline.
  19657. * @example
  19658. * activeSheet.suspendPaint();
  19659. * activeSheet.rowOutlines.group(3,2);
  19660. * activeSheet.columnOutlines.group(4,1);
  19661. * activeSheet.rowOutlines.direction(GC.Spread.Sheets.Outlines.OutlineDirection.forward);
  19662. * activeSheet.resumePaint();
  19663. */
  19664. direction(direction?: GC.Spread.Sheets.Outlines.OutlineDirection): any;
  19665. /**
  19666. * Expands all outlines (range groups), using the specified level.
  19667. * @param {number} level The level of the outline to expand or collapse.
  19668. * @param {boolean} expand Whether to expand the groups.
  19669. * @example
  19670. * //This example uses the expand method.
  19671. * activeSheet.suspendPaint();
  19672. * activeSheet.rowOutlines.group(0,5);
  19673. * activeSheet.rowOutlines.expand(0,false);
  19674. * activeSheet.resumePaint();
  19675. */
  19676. expand(level: number, expand: boolean): void;
  19677. /**
  19678. * Expands or collapses the specified outline (range group) of rows or columns.
  19679. * @param {GC.Spread.Sheets.Outlines.OutlineInfo} groupInfo The group information of the range group.
  19680. * @param {boolean} expand Whether to expand the groups.
  19681. */
  19682. expandGroup(groupInfo: GC.Spread.Sheets.Outlines.OutlineInfo, expand: boolean): void;
  19683. /**
  19684. * Gets the outline (range group) with the specified group level and row or column index.
  19685. * @param {number} index The index of the row or column.
  19686. * @param {number} level The level of the outline (range group).
  19687. * @returns {GC.Spread.Sheets.Outlines.OutlineInfo} The specified range group.
  19688. * @example
  19689. * //This example uses the find method.
  19690. * activeSheet.rowOutlines.group(0,5);
  19691. * var rgi = activeSheet.rowOutlines.find(1, 0);
  19692. * rgi.state(GC.Spread.Sheets.Outlines.OutlineState.collapsed);
  19693. * spread.invalidateLayout();
  19694. * spread.repaint();
  19695. */
  19696. find(index: number, level: number): GC.Spread.Sheets.Outlines.OutlineInfo;
  19697. /**
  19698. * Gets the collapsed internal.
  19699. * @param {number} index The index.
  19700. * @returns {boolean} <c>true</c> if collapsed; otherwise, <c>false</c>.
  19701. * @example
  19702. * //This example uses the getCollapsed method.
  19703. * activeSheet.suspendPaint();
  19704. * activeSheet.rowOutlines.group(0,5);
  19705. * activeSheet.rowOutlines.expand(0,true);
  19706. * activeSheet.resumePaint();
  19707. * alert(activeSheet.rowOutlines.isCollapsed(0));
  19708. */
  19709. getCollapsed(index: number): boolean;
  19710. /**
  19711. * Gets the level of a specified row or column.
  19712. * The level's index is zero-based.
  19713. * @param {number} index The index of the row or column.
  19714. * @returns {number} The level for the row or column.
  19715. * @example
  19716. * //This example uses the getLevel method.
  19717. * activeSheet.suspendPaint();
  19718. * activeSheet.rowOutlines.group(0,5);
  19719. * activeSheet.rowOutlines.expand(0,true);
  19720. * activeSheet.resumePaint();
  19721. * alert(activeSheet.rowOutlines.getLevel(0));
  19722. */
  19723. getLevel(index: number): number;
  19724. /**
  19725. * Gets the number of the deepest level.
  19726. * @remarks The level index is zero-based.
  19727. * @returns {number} The number of the deepest level.
  19728. * @example
  19729. * //This example uses the getMaxLevel method.
  19730. * activeSheet.suspendPaint();
  19731. * activeSheet.rowOutlines.group(0,5);
  19732. * activeSheet.rowOutlines.group(1,4);
  19733. * activeSheet.rowOutlines.expand(0,true);
  19734. * activeSheet.columnOutlines.group(0,1);
  19735. * activeSheet.resumePaint();
  19736. * alert(activeSheet.rowOutlines.getMaxLevel());
  19737. */
  19738. getMaxLevel(): number;
  19739. /**
  19740. * Gets the state for the specified group.
  19741. * @param {GC.Spread.Sheets.Outlines.OutlineInfo} groupInfo The group information.
  19742. * @returns {GC.Spread.Sheets.Outlines.OutlineState} The group state.
  19743. * @example
  19744. * //This example uses the getState method.
  19745. * activeSheet.suspendPaint();
  19746. * activeSheet.rowOutlines.group(0,5);
  19747. * var rgi = activeSheet.rowOutlines.find(1, 0);
  19748. * rgi.state(GC.Spread.Sheets.Outlines.OutlineInfo.collapsed);
  19749. * alert(activeSheet.rowOutlines.getState(rgi));
  19750. * activeSheet.resumePaint();
  19751. */
  19752. getState(groupInfo: GC.Spread.Sheets.Outlines.OutlineInfo): GC.Spread.Sheets.Outlines.OutlineState;
  19753. /**
  19754. * Groups a range of rows or columns into an outline (range group) from a specified start index.
  19755. * @param {number} index The group starting index.
  19756. * @param {number} count The number of rows or columns to group.
  19757. * @example
  19758. * //This example uses the group method.
  19759. * activeSheet.suspendPaint();
  19760. * activeSheet.rowOutlines.group(0,5);
  19761. * activeSheet.rowOutlines.expand(0,false);
  19762. * activeSheet.resumePaint();
  19763. */
  19764. group(index: number, count: number): void;
  19765. /**
  19766. * Determines whether the range group at the specified index is collapsed.
  19767. * @param {number} index The index of the row or column in the range group.
  19768. * @returns {boolean} <c>true</c> if the specified row or column is collapsed; otherwise, <c>false</c>.
  19769. * @example
  19770. * //This example uses the isCollapsed method.
  19771. * activeSheet.suspendPaint();
  19772. * activeSheet.rowOutlines.group(0,5);
  19773. * activeSheet.rowOutlines.expand(0,true);
  19774. * activeSheet.resumePaint();
  19775. * alert(activeSheet.rowOutlines.isCollapsed(0));
  19776. */
  19777. isCollapsed(index: number): boolean;
  19778. /**
  19779. * Determines whether the specified index is the end of the group.
  19780. * @param {number} index The index.
  19781. * @param {number} processLevel The process level.
  19782. * @returns {boolean} <c>true</c> if the specfied index is the end of the group; otherwise, <c>false</c>.
  19783. */
  19784. isGroupEnd(index: number, processLevel: number): boolean;
  19785. /**
  19786. * Refreshes this range group.
  19787. */
  19788. refresh(): void;
  19789. /**
  19790. * Resumes the adding.
  19791. */
  19792. resumeAdding(): void;
  19793. /**
  19794. * Sets the collapsed level.
  19795. * @param {number} index The index.
  19796. * @param {boolean} collapsed Set to <c>true</c> to collapse the level.
  19797. * @example
  19798. * //This example uses the setCollapsed method.
  19799. * activeSheet.suspendPaint();
  19800. * activeSheet.rowOutlines.group(0,5);
  19801. * activeSheet.rowOutlines.setCollapsed(0,false);
  19802. * activeSheet.resumePaint();
  19803. */
  19804. setCollapsed(index: number, collapsed: boolean): void;
  19805. /**
  19806. * Suspends the adding.
  19807. */
  19808. suspendAdding(): void;
  19809. /**
  19810. * Removes all outlines (range groups).
  19811. * @example
  19812. * //This example uses the ungroup method.
  19813. * activeSheet.suspendPaint();
  19814. * activeSheet.rowOutlines.group(0,5);
  19815. * activeSheet.rowOutlines.ungroup();
  19816. * activeSheet.resumePaint();
  19817. */
  19818. ungroup(): void;
  19819. /**
  19820. * Removes a range of rows or columns from the outline (range group) at the specified start index.
  19821. * @param {number} index The group starting index.
  19822. * @param {number} count The number of rows or columns to remove.
  19823. * @example
  19824. * //This example uses the ungroupRange method.
  19825. * activeSheet.suspendPaint();
  19826. * activeSheet.rowOutlines.group(0,5);
  19827. * activeSheet.rowOutlines.ungroupRange(0,1);
  19828. * activeSheet.resumePaint();
  19829. */
  19830. ungroupRange(index: number, count: number): void;
  19831. }
  19832. export class OutlineInfo{
  19833. /**
  19834. * Represents the outline (range group) information.
  19835. * @param {GC.Spread.Sheets.Outlines.Outline} model The owner of the outline.
  19836. * @param {number} start The start index of the outline.
  19837. * @param {number} end The end index of the outline.
  19838. * @param {number} level The level of the outline.
  19839. * @class
  19840. */
  19841. constructor(model: GC.Spread.Sheets.Outlines.Outline, start: number, end: number, level: number);
  19842. /** The children of the group.
  19843. * @type {Array}
  19844. */
  19845. children: any[];
  19846. /** The end index of the group.
  19847. * @type {number}
  19848. */
  19849. end: number;
  19850. /** The level of the group.
  19851. * @type {number}
  19852. */
  19853. level: number;
  19854. /** The owner of the group.
  19855. * @type {GC.Spread.Sheets.Outlines.Outline}
  19856. */
  19857. model: GC.Spread.Sheets.Outlines.Outline;
  19858. /** The parent of the group.
  19859. * @type {GC.Spread.Sheets.Outlines.OutlineInfo}
  19860. */
  19861. parent: GC.Spread.Sheets.Outlines.OutlineInfo;
  19862. /** The start index of the group.
  19863. * @type {number}
  19864. */
  19865. start: number;
  19866. /**
  19867. * Adds the child.
  19868. * @param {Object} child The child.
  19869. */
  19870. addChild(child: Object): void;
  19871. /**
  19872. * Compares this instance to a specified OutlineInfo object and returns an indication of their relative values.
  19873. * @param {number} index The index of the group item.
  19874. * @returns {boolean} <c>true</c> if the range group contains the specified index; otherwise, <c>false</c>.
  19875. */
  19876. contains(index: number): boolean;
  19877. /**
  19878. * Gets or sets the state of this outline (range group).
  19879. * @param {GC.Spread.Sheets.Outlines.OutlineState} [value] The state of this outline (range group).
  19880. * @returns {GC.Spread.Sheets.Outlines.OutlineState} The state of this outline (range group).
  19881. */
  19882. state(value?: GC.Spread.Sheets.Outlines.OutlineState): GC.Spread.Sheets.Outlines.OutlineState;
  19883. }
  19884. }
  19885. module PDF{
  19886. module PDFFontsManager{
  19887. /**
  19888. *Provide a fallback font for the specific font.
  19889. *@param {string} font the css font string.
  19890. *@return {string | ArrayBuffer} The font file in base64 string or ArrayBuffer.
  19891. */
  19892. function fallbackFont(font: string): any;
  19893. /**
  19894. *Register a Font for export PDF.
  19895. *@param {string} name The font name.
  19896. *@param {Object} [font] The font object.
  19897. *@param {string | ArrayBuffer} [font.normal] The normal font file in base64 string or ArrayBuffer.
  19898. *@param {string | ArrayBuffer} [font.bold] The bold font file in base64 string or ArrayBuffer.
  19899. *@param {string | ArrayBuffer} [font.italic] The italic font file in base64 string or ArrayBuffer.
  19900. *@param {string | ArrayBuffer} [font.boldItalic] The boldItalic font file in base64 string or ArrayBuffer.
  19901. */
  19902. function registerFont(name: string, font: Object): void;
  19903. }
  19904. }
  19905. module Print{
  19906. export interface IPageInfo{
  19907. pages: IPageInfoItem[];
  19908. }
  19909. export interface IPageInfoItem{
  19910. row: number;
  19911. column: number;
  19912. rowCount: number;
  19913. columnCount: number;
  19914. }
  19915. export interface IWatermarkItem{
  19916. x: number;
  19917. y: number;
  19918. width: number;
  19919. height: number;
  19920. imageSrc: string;
  19921. page: string;
  19922. }
  19923. export interface PrintMargins{
  19924. top: number;
  19925. bottom: number;
  19926. left: number;
  19927. right: number;
  19928. header: number;
  19929. footer: number;
  19930. }
  19931. export interface PrintSize{
  19932. height: number;
  19933. width: number;
  19934. }
  19935. /**
  19936. * Specifies the paper kind for the printed page.
  19937. * @enum {number}
  19938. * @example
  19939. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  19940. * printInfo.headerLeft("Header Left");
  19941. * printInfo.paperSize(new GC.Spread.Sheets.Print.PaperSize(GC.Spread.Sheets.Print.PaperKind.a4));
  19942. * spread.print(0);
  19943. */
  19944. export enum PaperKind{
  19945. /**
  19946. * Specifies the paper size is 420 mm * 594 mm.
  19947. */
  19948. a2= 66,
  19949. /**
  19950. * Specifies the paper size is 297 mm * 420 mm.
  19951. */
  19952. a3= 8,
  19953. /**
  19954. * Specifies the paper size is 322 mm * 445 mm.
  19955. */
  19956. a3Extra= 63,
  19957. /**
  19958. * Specifies the paper size is 322 mm * 445 mm.
  19959. */
  19960. a3ExtraTransverse= 68,
  19961. /**
  19962. * Specifies the paper size is 420 mm * 297 mm.
  19963. */
  19964. a3Rotated= 76,
  19965. /**
  19966. * Specifies the paper size is 297 mm * 420 mm.
  19967. */
  19968. a3Transverse= 67,
  19969. /**
  19970. * Specifies the paper size is 210 mm * 297 mm.
  19971. */
  19972. a4= 9,
  19973. /**
  19974. * Specifies the paper size is 236 mm * 322 mm.
  19975. */
  19976. a4Extra= 53,
  19977. /**
  19978. * Specifies the paper size is 210 mm * 330 mm.
  19979. */
  19980. a4Plus= 60,
  19981. /**
  19982. * Specifies the paper size is 297 mm * 210 mm.
  19983. */
  19984. a4Rotated= 77,
  19985. /**
  19986. * Specifies the paper size is 210 mm * 297 mm.
  19987. */
  19988. a4Small= 10,
  19989. /**
  19990. * Specifies the paper size is 210 mm * 297 mm.
  19991. */
  19992. a4Transverse= 55,
  19993. /**
  19994. * Specifies the paper size is 148 mm * 210 mm.
  19995. */
  19996. a5= 11,
  19997. /**
  19998. * Specifies the paper size is 174 mm * 235 mm.
  19999. */
  20000. a5Extra= 64,
  20001. /**
  20002. * Specifies the paper size is 210 mm * 148 mm.
  20003. */
  20004. a5Rotated= 78,
  20005. /**
  20006. * Specifies the paper size is 148 mm * 210 mm.
  20007. */
  20008. a5Transverse= 61,
  20009. /**
  20010. * Specifies the paper size is 105 mm * 148 mm.
  20011. */
  20012. a6= 70,
  20013. /**
  20014. * Specifies the paper size is 148 mm * 105 mm.
  20015. */
  20016. a6Rotated= 83,
  20017. /**
  20018. * Specifies the paper size is 227 mm * 356 mm.
  20019. */
  20020. aPlus= 57,
  20021. /**
  20022. * Specifies the paper size is 250 mm * 353 mm.
  20023. */
  20024. b4= 12,
  20025. /**
  20026. * Specifies the paper size is 250 mm * 353 mm.
  20027. */
  20028. b4Envelope= 33,
  20029. /**
  20030. * Specifies the paper size is 364 mm * 257 mm.
  20031. */
  20032. b4JisRotated= 79,
  20033. /**
  20034. * Specifies the paper size is 176 mm * 250 mm.
  20035. */
  20036. b5= 13,
  20037. /**
  20038. * Specifies the paper size is 176 mm * 250 mm.
  20039. */
  20040. b5Envelope= 34,
  20041. /**
  20042. * Specifies the paper size is 201 mm * 276 mm.
  20043. */
  20044. b5Extra= 65,
  20045. /**
  20046. * Specifies the paper size is 257 mm * 182 mm.
  20047. */
  20048. b5JisRotated= 80,
  20049. /**
  20050. * Specifies the paper size is 182 mm * 257 mm.
  20051. */
  20052. b5Transverse= 62,
  20053. /**
  20054. * Specifies the paper size is 176 mm * 125 mm.
  20055. */
  20056. b6Envelope= 35,
  20057. /**
  20058. * Specifies the paper size is 128 mm * 182 mm.
  20059. */
  20060. b6Jis= 88,
  20061. /**
  20062. * Specifies the paper size is 182 mm * 128 mm.
  20063. */
  20064. b6JisRotated= 89,
  20065. /**
  20066. * Specifies the paper size is 305 mm * 487 mm.
  20067. */
  20068. bPlus= 58,
  20069. /**
  20070. * Specifies the paper size is 324 mm * 458 mm.
  20071. */
  20072. c3Envelope= 29,
  20073. /**
  20074. * Specifies the paper size is 229 mm * 324 mm.
  20075. */
  20076. c4Envelope= 30,
  20077. /**
  20078. * Specifies the paper size is 162 mm * 229 mm.
  20079. */
  20080. c5Envelope= 28,
  20081. /**
  20082. * Specifies the paper size is 114 mm * 229 mm.
  20083. */
  20084. c65Envelope= 32,
  20085. /**
  20086. * Specifies the paper size is 114 mm * 162 mm.
  20087. */
  20088. c6Envelope= 31,
  20089. /**
  20090. * Specifies the paper size is 17 in. * 22 in.
  20091. */
  20092. cSheet= 24,
  20093. /**
  20094. * Specifies the paper size is defined by the user.
  20095. */
  20096. custom= 0,
  20097. /**
  20098. * Specifies the paper size is 110 mm * 220 mm.
  20099. */
  20100. dlEnvelope= 27,
  20101. /**
  20102. * Specifies the paper size is 22 in. * 34 in.
  20103. */
  20104. dSheet= 25,
  20105. /**
  20106. * Specifies the paper size is 34 in. * 44 in.
  20107. */
  20108. eSheet= 26,
  20109. /**
  20110. * Specifies the paper size is 7.25 in. * 10.5 in.
  20111. */
  20112. executive= 7,
  20113. /**
  20114. * Specifies the paper size is 8.5 in. * 13 in.
  20115. */
  20116. folio= 14,
  20117. /**
  20118. * Specifies the paper size is 8.5 in. * 13 in.
  20119. */
  20120. germanLegalFanfold= 41,
  20121. /**
  20122. * Specifies the paper size is 8.5 in. * 12 in.
  20123. */
  20124. germanStandardFanfold= 40,
  20125. /**
  20126. * Specifies the paper size is 220 mm * 220 mm.
  20127. */
  20128. inviteEnvelope= 47,
  20129. /**
  20130. * Specifies the paper size is 250 mm * 353 mm.
  20131. */
  20132. isoB4= 42,
  20133. /**
  20134. * Specifies the paper size is 110 mm * 230 mm.
  20135. */
  20136. italyEnvelope= 36,
  20137. /**
  20138. * Specifies the paper size is 200 mm * 148 mm.
  20139. */
  20140. japaneseDoublePostcard= 69,
  20141. /**
  20142. * Specifies the paper size is 148 mm * 200 mm.
  20143. */
  20144. japaneseDoublePostcardRotated= 82,
  20145. /**
  20146. * Specifies the paper size is Japanese Chou #3 envelope, 120 mm * 235 mm.
  20147. */
  20148. japaneseEnvelopeChouNumber3= 73,
  20149. /**
  20150. * Specifies the paper size is Japanese rotated Chou #3 envelope, 235 mm * 120 mm.
  20151. */
  20152. japaneseEnvelopeChouNumber3Rotated= 86,
  20153. /**
  20154. * Specifies the paper size is Japanese Chou #4 envelope, 90 mm * 205 mm.
  20155. */
  20156. japaneseEnvelopeChouNumber4= 74,
  20157. /**
  20158. * Specifies the paper size is Japanese rotated Chou #4 envelope, 205 mm * 90 mm.
  20159. */
  20160. japaneseEnvelopeChouNumber4Rotated= 87,
  20161. /**
  20162. * Specifies the paper size is Japanese Kaku #2 envelope, 240 mm * 332 mm.
  20163. */
  20164. japaneseEnvelopeKakuNumber2= 71,
  20165. /**
  20166. * Specifies the paper size is Japanese rotated Kaku #2 envelope, 332 mm * 240 mm.
  20167. */
  20168. japaneseEnvelopeKakuNumber2Rotated= 84,
  20169. /**
  20170. * Specifies the paper size is Japanese Kaku #3 envelope, 216 mm * 277 mm.
  20171. */
  20172. japaneseEnvelopeKakuNumber3= 72,
  20173. /**
  20174. * Specifies the paper size is Japanese rotated Kaku #3 envelope, 277 mm * 216 mm.
  20175. */
  20176. japaneseEnvelopeKakuNumber3Rotated= 85,
  20177. /**
  20178. * Specifies the paper size is Japanese You #4 envelope, 235 mm * 105 mm.
  20179. */
  20180. japaneseEnvelopeYouNumber4= 91,
  20181. /**
  20182. * Specifies the paper size is Japanese You #4 rotated envelope, 105 mm * 235 mm.
  20183. */
  20184. japaneseEnvelopeYouNumber4Rotated= 92,
  20185. /**
  20186. * Specifies the paper size is 100 mm * 148 mm.
  20187. */
  20188. japanesePostcard= 43,
  20189. /**
  20190. * Specifies the paper size is 148 mm * 100 mm.
  20191. */
  20192. japanesePostcardRotated= 81,
  20193. /**
  20194. * Specifies the paper size is 17 in. * 11 in.
  20195. */
  20196. ledger= 4,
  20197. /**
  20198. * Specifies the paper size is 8.5 in. * 14 in.
  20199. */
  20200. legal= 5,
  20201. /**
  20202. * Specifies the paper size is legal extra paper (9.275 in. * 15 in.).
  20203. * This value is specific to the PostScript driver and is used only by Linotronic printers in order to conserve paper.
  20204. */
  20205. legalExtra= 51,
  20206. /**
  20207. * Specifies the paper size is 8.5 in. * 11 in.
  20208. */
  20209. letter= 1,
  20210. /**
  20211. * Specifies the paper size is letter extra paper (9.275 in. * 12 in.).
  20212. * This value is specific to the PostScript driver and is used only by Linotronic printers in order to conserve paper.
  20213. */
  20214. letterExtra= 50,
  20215. /**
  20216. * Specifies the paper size 9.275 in. * 12 in.
  20217. */
  20218. letterExtraTransverse= 56,
  20219. /**
  20220. * Specifies the paper size is 8.5 in. * 12.69 in.
  20221. */
  20222. letterPlus= 59,
  20223. /**
  20224. * Specifies the paper size is 11 in. * 8.5 in.
  20225. */
  20226. letterRotated= 75,
  20227. /**
  20228. * Specifies the paper size is 8.5 in. * 11 in.
  20229. */
  20230. letterSmall= 2,
  20231. /**
  20232. * Specifies the paper size is 8.275 in. * 11 in.
  20233. */
  20234. letterTransverse= 54,
  20235. /**
  20236. * Specifies the paper size is 3.875 in. * 7.5 in.
  20237. */
  20238. monarchEnvelope= 37,
  20239. /**
  20240. * Specifies the paper size is 8.5 in. * 11 in.
  20241. */
  20242. note= 18,
  20243. /**
  20244. * Specifies the paper size is 4.125 in. * 9.5 in.
  20245. */
  20246. number10Envelope= 20,
  20247. /**
  20248. * Specifies the paper size is 4.5 in. * 10.375 in.
  20249. */
  20250. number11Envelope= 21,
  20251. /**
  20252. * Specifies the paper size is 4.75 in. * 11 in.
  20253. */
  20254. number12Envelope= 22,
  20255. /**
  20256. * Specifies the paper size is 5 in. * 11.5 in.
  20257. */
  20258. number14Envelope= 23,
  20259. /**
  20260. * Specifies the paper size is 3.875 in. * 8.875 in.
  20261. */
  20262. number9Envelope= 19,
  20263. /**
  20264. * Specifies the paper size is 3.625 in. * 6.5 in.
  20265. */
  20266. personalEnvelope= 38,
  20267. /**
  20268. * Specifies the paper size is 146 mm * 215 mm.
  20269. */
  20270. prc16K= 93,
  20271. /**
  20272. * Specifies the paper size is 146 mm * 215 mm.
  20273. */
  20274. prc16KRotated= 106,
  20275. /**
  20276. * Specifies the paper size is 97 mm * 151 mm.
  20277. */
  20278. prc32K= 94,
  20279. /**
  20280. * Specifies the paper size is 97 mm * 151 mm.
  20281. */
  20282. prc32KBig= 95,
  20283. /**
  20284. * Specifies the paper size is 97 mm * 151 mm.
  20285. */
  20286. prc32KBigRotated= 108,
  20287. /**
  20288. * Specifies the paper size is 97 mm * 151 mm.
  20289. */
  20290. prc32KRotated= 107,
  20291. /**
  20292. * Specifies the paper size is 102 mm * 165 mm.
  20293. */
  20294. prcEnvelopeNumber1= 96,
  20295. /**
  20296. * Specifies the paper size is 324 mm * 458 mm.
  20297. */
  20298. prcEnvelopeNumber10= 105,
  20299. /**
  20300. * Specifies the paper size is 458 mm * 324 mm.
  20301. */
  20302. prcEnvelopeNumber10Rotated= 118,
  20303. /**
  20304. * Specifies the paper size is 165 mm * 102 mm.
  20305. */
  20306. prcEnvelopeNumber1Rotated= 109,
  20307. /**
  20308. * Specifies the paper size is 102 mm * 176 mm.
  20309. */
  20310. prcEnvelopeNumber2= 97,
  20311. /**
  20312. * Specifies the paper size is 176 mm * 102 mm.
  20313. */
  20314. prcEnvelopeNumber2Rotated= 110,
  20315. /**
  20316. * Specifies the paper size is 125 mm * 176 mm.
  20317. */
  20318. prcEnvelopeNumber3= 98,
  20319. /**
  20320. * Specifies the paper size is 176 mm * 125 mm.
  20321. */
  20322. prcEnvelopeNumber3Rotated= 111,
  20323. /**
  20324. * Specifies the paper size is 110 mm * 208 mm.
  20325. */
  20326. prcEnvelopeNumber4= 99,
  20327. /**
  20328. * Specifies the paper size is 208 mm * 110 mm.
  20329. */
  20330. prcEnvelopeNumber4Rotated= 112,
  20331. /**
  20332. * Specifies the paper size is 110 mm * 220 mm.
  20333. */
  20334. prcEnvelopeNumber5= 100,
  20335. /**
  20336. * Specifies the paper size is 220 mm * 110 mm.
  20337. */
  20338. prcEnvelopeNumber5Rotated= 113,
  20339. /**
  20340. * Specifies the paper size is 120 mm * 230 mm.
  20341. */
  20342. prcEnvelopeNumber6= 101,
  20343. /**
  20344. * Specifies the paper size is 230 mm * 120 mm.
  20345. */
  20346. prcEnvelopeNumber6Rotated= 114,
  20347. /**
  20348. * Specifies the paper size is 160 mm * 230 mm.
  20349. */
  20350. prcEnvelopeNumber7= 102,
  20351. /**
  20352. * Specifies the paper size is 230 mm * 160 mm.
  20353. */
  20354. prcEnvelopeNumber7Rotated= 115,
  20355. /**
  20356. * Specifies the paper size is 120 mm * 309 mm.
  20357. */
  20358. prcEnvelopeNumber8= 103,
  20359. /**
  20360. * Specifies the paper size is 309 mm * 120 mm.
  20361. */
  20362. prcEnvelopeNumber8Rotated= 116,
  20363. /**
  20364. * Specifies the paper size is 229 mm * 324 mm.
  20365. */
  20366. prcEnvelopeNumber9= 104,
  20367. /**
  20368. * Specifies the paper size is 324 mm * 229 mm.
  20369. */
  20370. prcEnvelopeNumber9Rotated= 117,
  20371. /**
  20372. * Specifies the paper size is 215 mm * 275 mm.
  20373. */
  20374. quarto= 15,
  20375. /**
  20376. * Specifies the paper size is 10 in. * 11 in.
  20377. */
  20378. standard10x11= 45,
  20379. /**
  20380. * Specifies the paper size is 10 in. * 14 in.
  20381. */
  20382. standard10x14= 16,
  20383. /**
  20384. * Specifies the paper size is 11 in. * 17 in.
  20385. */
  20386. standard11x17= 17,
  20387. /**
  20388. * Specifies the paper size is 12 in. * 11 in.
  20389. */
  20390. standard12x11= 90,
  20391. /**
  20392. * Specifies the paper size is 15 in. * 11 in.
  20393. */
  20394. standard15x11= 46,
  20395. /**
  20396. * Specifies the paper size is 9 in. * 11 in.
  20397. */
  20398. standard9x11= 44,
  20399. /**
  20400. * Specifies the paper size is 5.5 in. * 8.5 in.
  20401. */
  20402. statement= 6,
  20403. /**
  20404. * Specifies the paper size is 11 in. * 17 in.
  20405. */
  20406. tabloid= 3,
  20407. /**
  20408. * Specifies the paper size is 11.69 in. * 18 in.
  20409. */
  20410. tabloidExtra= 52,
  20411. /**
  20412. * Specifies the paper size is 14.875 in. * 11 in.
  20413. */
  20414. usStandardFanfold= 39
  20415. }
  20416. /**
  20417. * Specifics the type of centering for the printed page.
  20418. * @enum {number}
  20419. * @example
  20420. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20421. * printInfo.columnStart(0);
  20422. * printInfo.columnEnd(2);
  20423. * printInfo.centering(GC.Spread.Sheets.Print.PrintCentering.horizontal);
  20424. * activeSheet.printInfo(printInfo);
  20425. * spread.print(0);
  20426. */
  20427. export enum PrintCentering{
  20428. /**
  20429. * Does not center the printed page at all.
  20430. */
  20431. none= 0,
  20432. /**
  20433. * Centers the printed layout horizontally on the page.
  20434. */
  20435. horizontal= 1,
  20436. /**
  20437. * Centers the printed layout vertically on the page.
  20438. */
  20439. vertical= 2,
  20440. /**
  20441. * Centers the printed layout both horizontally and vertically on the page.
  20442. */
  20443. both= 3
  20444. }
  20445. /**
  20446. * Specifies the order in which pages are printed.
  20447. * @enum {number}
  20448. * @example
  20449. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20450. * printInfo.pageOrder(GC.Spread.Sheets.Print.PrintPageOrder.auto);
  20451. * activeSheet.printInfo(printInfo);
  20452. * spread.print(0);
  20453. */
  20454. export enum PrintPageOrder{
  20455. /**
  20456. * Automatically determines the best order for printing pages.
  20457. */
  20458. auto= 0,
  20459. /**
  20460. * Prints pages down then across.
  20461. */
  20462. downThenOver= 1,
  20463. /**
  20464. * Prints pages across then down.
  20465. */
  20466. overThenDown= 2
  20467. }
  20468. /**
  20469. * Specifies the page orientation used for printing.
  20470. * @enum {number}
  20471. * @example
  20472. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20473. * printInfo.bestFitColumns(true);
  20474. * printInfo.orientation(GC.Spread.Sheets.Print.PrintPageOrientation.landscape);
  20475. * printInfo.footerCenter("GrapeCity");
  20476. * activeSheet.printInfo(printInfo);
  20477. * spread.print(0);
  20478. */
  20479. export enum PrintPageOrientation{
  20480. /**
  20481. * Prints portrait orientation.
  20482. */
  20483. portrait= 1,
  20484. /**
  20485. * Prints landscape orientation.
  20486. */
  20487. landscape= 2
  20488. }
  20489. /**
  20490. * Specifies whether the area is visible.
  20491. * @enum {number}
  20492. * @example
  20493. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20494. * printInfo.showColumnHeader(GC.Spread.Sheets.Print.PrintVisibilityType.hide);
  20495. * spread.print(0);
  20496. */
  20497. export enum PrintVisibilityType{
  20498. /**
  20499. * Inherits the setting from the Worksheet class.
  20500. */
  20501. inherit= 0,
  20502. /**
  20503. * Hides the area.
  20504. */
  20505. hide= 1,
  20506. /**
  20507. * Shows in each page.
  20508. */
  20509. show= 2,
  20510. /**
  20511. * Shows once.
  20512. */
  20513. showOnce= 3
  20514. }
  20515. export class PaperSize{
  20516. /**
  20517. * Specifies the paper size.
  20518. * The constructor has 3 modes.
  20519. * If there are 2 parameters, the parameters are width and height with a type of number;
  20520. * If there is 1 parameter, the parameter is kind which is a GC.Spread.Sheets.Print.PaperKind type;
  20521. * If there is no parameter, the result is the same as the second mode and the kind option is GC.Spread.Sheets.Print.PaperKind.letter.
  20522. * @class
  20523. * @param {number|GC.Spread.Sheets.Print.PaperKind} [widthOrKind] The width of the paper, in hundredths of an inch; or the kind of the paper and the type is GC.Spread.Sheets.Print.PaperKind.
  20524. * @param {number} [height] The height of the paper, in hundredths of an inch.
  20525. * @example
  20526. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20527. * printInfo.headerLeft("Header Left");
  20528. * printInfo.paperSize(new GC.Spread.Sheets.Print.PaperSize(GC.Spread.Sheets.Print.PaperKind.a4));
  20529. * spread.print(0);
  20530. */
  20531. constructor(widthOrKind?: number|GC.Spread.Sheets.Print.PaperKind, height?: number);
  20532. /**
  20533. * Gets the paper size, in hundredths of an inch.
  20534. * @param {GC.Spread.Sheets.Print.PaperKind} kind The kind of the paper.
  20535. * @returns {Object} The size which contains width and height of the paper.<br/>
  20536. * size.width {number} The width of the size, in hundredths of an inch.<br/>
  20537. * size.height {number} The height of the size, in hundredths of an inch.
  20538. */
  20539. getPageSize(kind: GC.Spread.Sheets.Print.PaperKind): GC.Spread.Sheets.Print.PrintSize;
  20540. /**
  20541. * Gets or sets the height of the paper, in hundredths of an inch.
  20542. * @param {number} [value] The height of the paper.
  20543. * @returns {number | GC.Spread.Sheets.Print.PaperSize} If no value is set, returns the height of the paper; otherwise, returns the paper size.
  20544. */
  20545. height(value?: number): any;
  20546. /**
  20547. * Gets or sets the kind of the paper.
  20548. * @param {GC.Spread.Sheets.Print.PaperKind} [value] The kind of the paper.
  20549. * @returns {GC.Spread.Sheets.Print.PaperKind | GC.Spread.Sheets.Print.PaperSize} If no value is set, returns the kind of the paper; otherwise, returns the paper size.
  20550. */
  20551. kind(value?: GC.Spread.Sheets.Print.PaperKind): any;
  20552. /**
  20553. * Gets or sets the width of the paper, in hundredths of an inch.
  20554. * @param {number} value The width of the paper.
  20555. * @returns {number | GC.Spread.Sheets.Print.PaperSize} If no value is set, returns the width of the paper; otherwise, returns the paper size.
  20556. */
  20557. width(value?: number): any;
  20558. }
  20559. export class PrintInfo{
  20560. /**
  20561. * Represents the information to use when printing a Worksheet.
  20562. * @class
  20563. */
  20564. constructor();
  20565. /**
  20566. * Gets or sets whether column widths are adjusted to fit the longest text width for printing.
  20567. * @param {boolean} [value] Whether column widths are adjusted to fit the longest text width for printing.
  20568. * @returns {boolean | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns whether column widths are adjusted to fit the longest text width for printing; otherwise, returns the print setting information.
  20569. * @example
  20570. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20571. * printInfo.bestFitColumns(true);
  20572. * printInfo.orientation(GC.Spread.Sheets.Print.PrintPageOrientation.landscape);
  20573. * printInfo.footerCenter("GrapeCity");
  20574. * activeSheet.printInfo(printInfo);
  20575. * spread.print(0);
  20576. */
  20577. bestFitColumns(value?: boolean): any;
  20578. /**
  20579. * Gets or sets whether row heights are adjusted to fit the tallest text height for printing.
  20580. * @param {boolean} [value] Whether row heights are adjusted to fit the tallest text height for printing.
  20581. * @returns {boolean | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns whether row heights are adjusted to fit the tallest text height for printing; otherwise, returns the print setting information.
  20582. * @example
  20583. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20584. * printInfo.bestFitRows(true);
  20585. * activeSheet.printInfo(printInfo);
  20586. * spread.print(0);
  20587. */
  20588. bestFitRows(value?: boolean): any;
  20589. /**
  20590. * Gets or sets whether to print in black and white.
  20591. * @param {boolean} [value] Whether to print in black and white.
  20592. * @returns {boolean | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns whether to print in black and white; otherwise, returns the print setting information.
  20593. * @example
  20594. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20595. * printInfo.blackAndWhite(true);
  20596. * activeSheet.printInfo(printInfo);
  20597. * spread.print(0);
  20598. */
  20599. blackAndWhite(value?: boolean): any;
  20600. /**
  20601. * Gets or sets how the printed page is centered.
  20602. * @param {GC.Spread.Sheets.Print.PrintCentering} [value] How the printed page is centered.
  20603. * @returns {GC.Spread.Sheets.Print.PrintCentering | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns how the printed page is centered; otherwise, returns the print setting information.
  20604. * @example
  20605. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20606. * printInfo.columnStart(0);
  20607. * printInfo.columnEnd(2);
  20608. * printInfo.centering(GC.Spread.Sheets.Print.PrintCentering.horizontal);
  20609. * activeSheet.printInfo(printInfo);
  20610. * spread.print(0);
  20611. */
  20612. centering(value?: GC.Spread.Sheets.Print.PrintCentering): any;
  20613. /**
  20614. * Gets or sets the last column to print when printing a cell range.
  20615. * @param {number} [value] The last column to print when printing a cell range.
  20616. * @returns {number | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the last column to print when printing a cell range; otherwise, returns the print setting information.
  20617. * @example
  20618. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20619. * printInfo.columnStart(0);
  20620. * printInfo.columnEnd(2);
  20621. * printInfo.centering(GC.Spread.Sheets.Print.PrintCentering.horizontal);
  20622. * activeSheet.printInfo(printInfo);
  20623. * spread.print(0);
  20624. */
  20625. columnEnd(value?: number): any;
  20626. /**
  20627. * Gets or sets the first column to print when printing a cell range.
  20628. * @param {number} [value] The first column to print when printing a cell range.
  20629. * @returns {number | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the first column to print when printing a cell range; otherwise, returns the print setting information.
  20630. * @example
  20631. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20632. * printInfo.columnStart(0);
  20633. * printInfo.columnEnd(2);
  20634. * printInfo.centering(GC.Spread.Sheets.Print.PrintCentering.horizontal);
  20635. * activeSheet.printInfo(printInfo);
  20636. * spread.print(0);
  20637. */
  20638. columnStart(value?: number): any;
  20639. /**
  20640. * Gets or sets the page number to print on the first page.
  20641. * @param {number} [value] The page number to print on the first page.
  20642. * @returns {number | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the page number to print on the first page; otherwise, returns the print setting information.
  20643. * @example
  20644. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20645. * printInfo.firstPageNumber(1);
  20646. * activeSheet.printInfo(printInfo);
  20647. * spread.print(0);
  20648. */
  20649. firstPageNumber(value?: number): any;
  20650. /**
  20651. * Gets or sets the number of vertical pages to check when optimizing printing.
  20652. * @param {number} [value] The number of vertical pages to check when optimizing printing.
  20653. * @returns {number | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the number of vertical pages to check; otherwise, returns the print setting information.
  20654. * @example
  20655. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20656. * printInfo.fitPagesTall(1);
  20657. * activeSheet.printInfo(printInfo);
  20658. * spread.print(0);
  20659. */
  20660. fitPagesTall(value?: number): any;
  20661. /**
  20662. * Gets or sets the number of horizontal pages to check when optimizing the printing.
  20663. * @param {number} [value] The number of horizontal pages to check when optimizing the printing.
  20664. * @returns {number | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the number of horizontal pages to check; otherwise, returns the print setting information.
  20665. * @example
  20666. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20667. * printInfo.fitPagesWide(1);
  20668. * activeSheet.printInfo(printInfo);
  20669. * spread.print(0);
  20670. */
  20671. fitPagesWide(value?: number): any;
  20672. /**
  20673. * Gets or sets the text and format of the center footer on printed pages.
  20674. * @param {string} [value] The text and format of the center footer on printed pages.
  20675. * @returns {string | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the text and format of the center footer on printed pages; otherwise, returns the print setting information.
  20676. * @example
  20677. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20678. * printInfo.bestFitColumns(true);
  20679. * printInfo.orientation(GC.Spread.Sheets.Print.PrintPageOrientation.landscape);
  20680. * printInfo.footerCenter("GrapeCity");
  20681. * activeSheet.printInfo(printInfo);
  20682. * spread.print(0);
  20683. */
  20684. footerCenter(value?: string): any;
  20685. /**
  20686. * Gets or sets the image for the center section of the footer.
  20687. * @param {string} [value] The image for the center section of the footer.
  20688. * @returns {string | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the image for the center section of the footer; otherwise, returns the print setting information.
  20689. * @example
  20690. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20691. * printInfo.footerCenter("&amp;G");
  20692. * printInfo.footerCenterImage("tsoutline.png");
  20693. * activeSheet.printInfo(printInfo);
  20694. * spread.print(0);
  20695. */
  20696. footerCenterImage(value?: string): any;
  20697. /**
  20698. * Gets or sets the text and format of the left footer on printed pages.
  20699. * @param {string} [value] The text and format of the left footer on printed pages.
  20700. * @returns {string | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the text and format of the left footer on printed pages; otherwise, returns the print setting information.
  20701. * @example
  20702. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20703. * printInfo.footerLeft("&amp;BFooter");
  20704. * activeSheet.printInfo(printInfo);
  20705. * spread.print(0);
  20706. */
  20707. footerLeft(value?: string): any;
  20708. /**
  20709. * Gets or sets the image for the left section of the footer.
  20710. * @param {string} [value] The image for the left section of the footer.
  20711. * @returns {string | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the image for the left section of the footer; otherwise, returns the print setting information.
  20712. * @example
  20713. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20714. * printInfo.footerLeft("&amp;G");
  20715. * printInfo.footerLeftImage("logo.jpg");
  20716. * activeSheet.printInfo(printInfo);
  20717. * spread.print(0);
  20718. */
  20719. footerLeftImage(value?: string): any;
  20720. /**
  20721. * Gets or sets the text and format of the right footer on printed pages.
  20722. * @param {string} [value] The text and format of the right footer on printed pages.
  20723. * @returns {string | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the text and format of the right footer on printed pages; otherwise, returns the print setting information.
  20724. * @example
  20725. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20726. * printInfo.footerRight("&amp;G");
  20727. * printInfo.footerRightImage("logo.jpg");
  20728. * activeSheet.printInfo(printInfo);
  20729. * spread.print(0);
  20730. */
  20731. footerRight(value?: string): any;
  20732. /**
  20733. * Gets or sets the image for the right section of the footer.
  20734. * @param {string} [value] The image for the right section of the footer.
  20735. * @returns {string | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the image for the right section of the footer; otherwise, returns the print setting information.
  20736. * @example
  20737. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20738. * printInfo.footerRight("&amp;G");
  20739. * printInfo.footerRightImage("logo.jpg");
  20740. * activeSheet.printInfo(printInfo);
  20741. * spread.print(0);
  20742. */
  20743. footerRightImage(value?: string): any;
  20744. /**
  20745. * Gets or sets the text and format of the center header on printed pages.
  20746. * @param {string} [value] The text and format of the center header on printed pages.
  20747. * @returns {string | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the text and format of the center header on printed pages; otherwise, returns the print setting information.
  20748. * @example
  20749. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20750. * printInfo.headerCenter("&amp;SThis is text.");
  20751. * activeSheet.printInfo(printInfo);
  20752. * spread.print(0);
  20753. */
  20754. headerCenter(value?: string): any;
  20755. /**
  20756. * Gets or sets the image for the center section of the header.
  20757. * @param {string} [value] The image for the center section of the header.
  20758. * @returns {string | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the image for the center section of the header; otherwise, returns the print setting information.
  20759. * @example
  20760. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20761. * printInfo.headerCenter("&amp;G");
  20762. * printInfo.headerCenterImage("logo.jpg");
  20763. * activeSheet.printInfo(printInfo);
  20764. * spread.print(0);
  20765. */
  20766. headerCenterImage(value?: string): any;
  20767. /**
  20768. * Gets or sets the text and format of the left header on printed pages.
  20769. * @param {string} [value] The text and format of the left header on printed pages.
  20770. * @returns {string | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the text and format of the left header on printed pages; otherwise, returns the print setting information.
  20771. * @example
  20772. * activeSheet.printInfo().headerLeft("It is &amp;T.");
  20773. * spread.print(0);
  20774. */
  20775. headerLeft(value?: string): any;
  20776. /**
  20777. * Gets or sets the image for the left section of the header.
  20778. * @param {string} [value] The image for the left section of the header.
  20779. * @returns {string | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the image for the left section of the header; otherwise, returns the print setting information.
  20780. * @example
  20781. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20782. * printInfo.headerLeftImage("logo.jpg");
  20783. * activeSheet.printInfo(printInfo);
  20784. * spread.print(0);
  20785. */
  20786. headerLeftImage(value?: string): any;
  20787. /**
  20788. * Gets or sets the text and format of the right header on printed pages.
  20789. * @param {string} [value] The text and format of the right header on printed pages.
  20790. * @returns {string | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the text and format of the right header on printed pages; otherwise, returns the print setting information.
  20791. * @example
  20792. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20793. * printInfo.headerRight("&amp;BHeader");
  20794. * activeSheet.printInfo(printInfo);
  20795. * spread.print(0);
  20796. */
  20797. headerRight(value?: string): any;
  20798. /**
  20799. * Gets or sets the image for the right section of the header.
  20800. * @param {string} [value] The image for the right section of the header.
  20801. * @returns {string | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the image for the right section of the header; otherwise, returns the print setting information.
  20802. * @example
  20803. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20804. * printInfo.headerRight("&amp;G");
  20805. * printInfo.headerRightImage("logo.jpg");
  20806. * activeSheet.printInfo(printInfo);
  20807. * spread.print(0);
  20808. */
  20809. headerRightImage(value?: string): any;
  20810. /**
  20811. * Gets or sets the margins for printing, in hundredths of an inch.
  20812. * @param {Object} [value] The margins for printing.
  20813. * @param {number} [value.top] - The top margin, in hundredths of an inch.
  20814. * @param {number} [value.bottom] - bottom The bottom margin, in hundredths of an inch.
  20815. * @param {number} [value.left] - left The left margin, in hundredths of an inch.
  20816. * @param {number} [value.right] - right The right margin, in hundredths of an inch.
  20817. * @param {number} [value.header] - header The header offset, in hundredths of an inch.
  20818. * @param {number} [value.footer] - footer The footer offset, in hundredths of an inch.
  20819. * @returns {GC.Spread.Sheets.Print.PrintMargins | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the margins for printing; otherwise, returns the print setting information.
  20820. * @example
  20821. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20822. * printInfo.headerLeft("Header Left");
  20823. * printInfo.headerCenter("Header Center");
  20824. * printInfo.headerRight("Header Right");
  20825. * printInfo.footerLeft("Footer Left");
  20826. * printInfo.footerCenter("Footer Center");
  20827. * printInfo.footerRight("Footer Right");
  20828. * printInfo.margin({top:75, bottom:75, left:20, right:20, header:10, footer:20});
  20829. * activeSheet.printInfo(printInfo);
  20830. * spread.print(0);
  20831. */
  20832. margin(value?: GC.Spread.Sheets.Print.PrintMargins): any;
  20833. /**
  20834. * Gets or sets the page orientation used for printing.
  20835. * @param {GC.Spread.Sheets.Print.PrintPageOrientation} [value] The page orientation used for printing.
  20836. * @returns {GC.Spread.Sheets.Print.PrintPageOrientation | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the page orientation used for printing; otherwise, returns the print setting information.
  20837. * @example
  20838. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20839. * printInfo.bestFitColumns(true);
  20840. * printInfo.orientation(GC.Spread.Sheets.Print.PrintPageOrientation.landscape);
  20841. * printInfo.footerCenter("GrapeCity");
  20842. * activeSheet.printInfo(printInfo);
  20843. * spread.print(0);
  20844. */
  20845. orientation(value?: GC.Spread.Sheets.Print.PrintPageOrientation): any;
  20846. /**
  20847. * Gets or sets the order in which pages print.
  20848. * @param {GC.Spread.Sheets.Print.PrintPageOrder} [value] The order in which pages print.
  20849. * @returns {GC.Spread.Sheets.Print.PrintPageOrder | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns a value that specifies the order in which pages print; otherwise, returns the print setting information.
  20850. * @example
  20851. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20852. * printInfo.pageOrder(GC.Spread.Sheets.Print.PrintPageOrder.auto);
  20853. * activeSheet.printInfo(printInfo);
  20854. * spread.print(0);
  20855. */
  20856. pageOrder(value?: GC.Spread.Sheets.Print.PrintPageOrder): any;
  20857. /**
  20858. * Gets or sets the page range for printing.
  20859. * @param {string} [value] The page numbers or page ranges separated by commas counting from the beginning of the document. For example, type "1,3,5-12".
  20860. * @returns {string | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns a string that provides page numbers or page ranges; otherwise, returns the print setting information.}
  20861. * @example
  20862. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20863. * printInfo.pageRange("1-3");
  20864. * activeSheet.printInfo(printInfo);
  20865. * spread.print(0);
  20866. */
  20867. pageRange(value?: string): any;
  20868. /**
  20869. * Gets or sets the paper size for printing.
  20870. * @param {GC.Spread.Sheets.Print.PaperSize} [value] The paper size for printing.
  20871. * @param {number} [value.width] - The width, in hundredths of an inch.
  20872. * @param {number} [value.height] - The height, in hundredths of an inch.
  20873. * @param @returns {GC.Spread.Sheets.Print.PaperSize | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the paper size for printing; otherwise, returns the print setting information.
  20874. * @example
  20875. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20876. * printInfo.headerLeft("Header Left");
  20877. * printInfo.paperSize(new GC.Spread.Sheets.Print.PaperSize(300, 300));
  20878. * activeSheet.printInfo(printInfo);
  20879. * spread.print(0);
  20880. */
  20881. paperSize(value?: GC.Spread.Sheets.Print.PaperSize): any;
  20882. /**
  20883. * Gets or sets the quality factor for printing.
  20884. * @param {number} [value] The quality factor for printing is a positive integer between 1 and 8. The greater the quality factor, the better the printing quality. When the quality factor is bigger, the printing efficiency is affected.
  20885. * @returns {number | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the quality factor for printing; otherwise, returns the print setting information.
  20886. * @example
  20887. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20888. * printInfo.headerLeft("Header Left");
  20889. * printInfo.qualityFactor(6);
  20890. * activeSheet.printInfo(printInfo);
  20891. * spread.print();
  20892. */
  20893. qualityFactor(value?: number): any;
  20894. /**
  20895. * Gets or sets the last column of a range of columns to print on the left of each page.
  20896. * @param {number} [value] The last column of a range of columns to print on the left of each page.
  20897. * @returns {number | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the last column of a range of columns to print on the left of each page; otherwise, returns the print setting information.
  20898. * @example
  20899. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20900. * printInfo.headerLeft("Header Left");
  20901. * printInfo.repeatColumnStart(0);
  20902. * printInfo.repeatColumnEnd(2);
  20903. * printInfo.repeatRowStart(0);
  20904. * printInfo.repeatRowEnd(2);
  20905. * activeSheet.printInfo(printInfo);
  20906. * spread.print();
  20907. */
  20908. repeatColumnEnd(value?: number): any;
  20909. /**
  20910. * Gets or sets the first column of a range of columns to print on the left of each page.
  20911. * @param {number} [value] The first column of a range of columns to print on the left of each page.
  20912. * @returns {number | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the first column of a range of columns to print on the left of each page; otherwise, returns the print setting information.
  20913. * @example
  20914. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20915. * printInfo.headerLeft("Header Left");
  20916. * printInfo.repeatColumnStart(0);
  20917. * printInfo.repeatColumnEnd(2);
  20918. * printInfo.repeatRowStart(0);
  20919. * printInfo.repeatRowEnd(2);
  20920. * activeSheet.printInfo(printInfo);
  20921. * spread.print();
  20922. */
  20923. repeatColumnStart(value?: number): any;
  20924. /**
  20925. * Gets or sets the last row of a range of rows to print at the top of each page.
  20926. * @param {number} [value] The last row of a range of rows to print at the top of each page.
  20927. * @returns {number | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the last row of a range of rows to print at the top of each page; otherwise, returns the print setting information.
  20928. * @example
  20929. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20930. * printInfo.headerLeft("Header Left");
  20931. * printInfo.repeatColumnStart(0);
  20932. * printInfo.repeatColumnEnd(2);
  20933. * printInfo.repeatRowStart(0);
  20934. * printInfo.repeatRowEnd(2);
  20935. * activeSheet.printInfo(printInfo);
  20936. * spread.print();
  20937. */
  20938. repeatRowEnd(value?: number): any;
  20939. /**
  20940. * Gets or sets the first row of a range of rows to print at the top of each page.
  20941. * @param {number} [value] The first row of a range of rows to print at the top of each page.
  20942. * @returns {number | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the first row of a range of rows to print at the top of each page; otherwise, returns the print setting information.
  20943. * @example
  20944. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20945. * printInfo.headerLeft("Header Left");
  20946. * printInfo.repeatColumnStart(0);
  20947. * printInfo.repeatColumnEnd(2);
  20948. * printInfo.repeatRowStart(0);
  20949. * printInfo.repeatRowEnd(2);
  20950. * activeSheet.printInfo(printInfo);
  20951. * spread.print();
  20952. */
  20953. repeatRowStart(value?: number): any;
  20954. /**
  20955. * Gets or sets the last row to print when printing a cell range.
  20956. * @param {number} [value] The last row to print when printing a cell range.
  20957. * @returns {number | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the last row to print when printing a cell range; otherwise, returns the print setting information.
  20958. * @example
  20959. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20960. * printInfo.headerLeft("Header Left");
  20961. * printInfo.rowStart(0);
  20962. * printInfo.rowEnd(2);
  20963. * activeSheet.printInfo(printInfo);
  20964. * spread.print(0);
  20965. */
  20966. rowEnd(value?: number): any;
  20967. /**
  20968. * Gets or sets the first row to print when printing a cell range.
  20969. * @param {number} [value] The first row to print when printing a cell range.
  20970. * @returns {number | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns the first row to print when printing a cell range; otherwise, returns the print setting information.
  20971. * @example
  20972. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20973. * printInfo.headerLeft("Header Left");
  20974. * printInfo.rowStart(0);
  20975. * printInfo.rowEnd(2);
  20976. * activeSheet.printInfo(printInfo);
  20977. * spread.print(0);
  20978. */
  20979. rowStart(value?: number): any;
  20980. /**
  20981. * Gets or sets whether to print an outline border around the entire control.
  20982. * @param {boolean} [value] Whether to print an outline border around the entire control.
  20983. * @returns {boolean | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns whether to print an outline border around the entire control; otherwise, returns the print setting information.
  20984. * @example
  20985. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20986. * printInfo.showBorder(false);
  20987. * activeSheet.printInfo(printInfo);
  20988. * spread.print(0);
  20989. */
  20990. showBorder(value?: boolean): any;
  20991. /**
  20992. * Gets or sets whether to print the column header.
  20993. * @param {GC.Spread.Sheets.Print.PrintVisibilityType} [value] Whether to print the column header.
  20994. * @returns {GC.Spread.Sheets.Print.PrintVisibilityType | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns whether to print the column header; otherwise, returns the print setting information.
  20995. * @example
  20996. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  20997. * printInfo.showColumnHeader(GC.Spread.Sheets.Print.PrintVisibilityType.hide);
  20998. * activeSheet.printInfo(printInfo);
  20999. * spread.print(0);
  21000. */
  21001. showColumnHeader(value?: GC.Spread.Sheets.Print.PrintVisibilityType): any;
  21002. /**
  21003. * Gets or sets whether to print the grid lines.
  21004. * @param {boolean} [value] Whether to print the grid lines.
  21005. * @returns {boolean | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns whether to print the grid lines; otherwise, returns the print setting information.
  21006. * @example
  21007. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  21008. * printInfo.showGridLine(false);
  21009. * activeSheet.printInfo(printInfo);
  21010. * spread.print(0);
  21011. */
  21012. showGridLine(value?: boolean): any;
  21013. /**
  21014. * Gets or sets whether to print the row header.
  21015. * @param {GC.Spread.Sheets.Print.PrintVisibilityType} [value] Whether to print the row header.
  21016. * @returns {GC.Spread.Sheets.Print.PrintVisibilityType | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns whether to print the row header; otherwise, returns the print setting information.
  21017. * @example
  21018. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  21019. * printInfo.showRowHeader(GC.Spread.Sheets.Print.PrintVisibilityType.hide);
  21020. * activeSheet.printInfo(printInfo);
  21021. * spread.print(0);
  21022. */
  21023. showRowHeader(value?: GC.Spread.Sheets.Print.PrintVisibilityType): any;
  21024. /**
  21025. * Gets or sets whether to print only rows and columns that contain data.
  21026. * @param {boolean} [value] Whether to print only rows and columns that contain data.
  21027. * @returns {boolean | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns whether to print only rows and columns that contain data; otherwise, returns the print setting information.
  21028. * @example
  21029. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  21030. * printInfo.useMax(true);
  21031. * activeSheet.printInfo(printInfo);
  21032. * spread.print(0);
  21033. */
  21034. useMax(value?: boolean): any;
  21035. /**
  21036. * Gets or set all watermark.
  21037. * @param {Array.<Object>} [value] The watermark item.
  21038. * @param {number} [value.x] The watermark begin x position.
  21039. * @param {number} [value.y] The watermark begin y position.
  21040. * @param {number} [value.width] The watermark width.
  21041. * @param {number} [value.height] The watermark height.
  21042. * @param {string} [value.imageSrc] The watermark image src.
  21043. * @param {string} [value.page] The watermark page, support "all", "odd", \u201ceven\u201d, "1,3,4,7,8,9,".
  21044. * @return {Array.<Object>} The watermark item.
  21045. * @example
  21046. * // This example shows how to set watermark.
  21047. * var printInfo = activeSheet.printInfo();
  21048. * printInfo.watermark([{x:0, y:0, width:100, height:100, imageSrc:".image/watermark.jpg", page:"all"}]);
  21049. * activeSheet.printInfo(printInfo);
  21050. * spread.print(0);
  21051. */
  21052. watermark(value?: GC.Spread.Sheets.Print.IWatermarkItem[]): GC.Spread.Sheets.Print.IWatermarkItem;
  21053. /**
  21054. * Gets or sets the zoom factor used for printing.
  21055. * @param {number} [value] The zoom factor used for printing.
  21056. * @returns {number | GC.Spread.Sheets.Print.PrintInfo} If no value is set, returns a value that specifies the amount to enlarge or reduce the printed worksheet; otherwise, returns the print setting information.
  21057. * @example
  21058. * var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
  21059. * printInfo.zoomFactor(2);
  21060. * activeSheet.printInfo(printInfo);
  21061. * spread.print(0);
  21062. */
  21063. zoomFactor(value?: number): any;
  21064. }
  21065. }
  21066. module Search{
  21067. /**
  21068. * Specifies the type of search flags.
  21069. * @enum {number}
  21070. * @example
  21071. * //This example uses the SearchFlags enumeration.
  21072. * activeSheet.getCell(2,3).value("testSearch");
  21073. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21074. * searchCondition.searchString = "testSearch";
  21075. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21076. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21077. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21078. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21079. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.ignoreCase| GC.Spread.Sheets.Search.SearchFlags.useWildCards;
  21080. * var searchresult= activeSheet.search(searchCondition);
  21081. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" +
  21082. * searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundSheetIndex+"]";
  21083. * alert(str);
  21084. */
  21085. export enum SearchFlags{
  21086. /** Specifies no search flags.
  21087. * @type {number}
  21088. */
  21089. none= 0,
  21090. /** Determines whether the search considers the case of the letters in the search string.
  21091. * @type {number}
  21092. */
  21093. ignoreCase= 1,
  21094. /** Determines whether the search considers only an exact match.
  21095. * @type {number}
  21096. */
  21097. exactMatch= 2,
  21098. /** Determines whether the search considers wildcard characters (*, ?) in the search string.
  21099. * @type {number}
  21100. */
  21101. useWildCards= 4,
  21102. /** Determines whether to search within a cell range.
  21103. * @type {number}
  21104. */
  21105. blockRange= 8
  21106. }
  21107. /**
  21108. * Specifies where the search string is found.
  21109. * @enum {number}
  21110. * @example
  21111. * //This example uses the SearchFlags enumeration.
  21112. * activeSheet.getCell(2,3).value("testSearch");
  21113. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21114. * searchCondition.searchString = "testSearch";
  21115. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21116. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21117. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21118. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21119. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.ignoreCase| GC.Spread.Sheets.Search.SearchFlags.useWildCards;
  21120. * var searchresult= activeSheet.search(searchCondition);
  21121. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" +
  21122. * searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundSheetIndex+"]";
  21123. * alert(str);
  21124. */
  21125. export enum SearchFoundFlags{
  21126. /**
  21127. * Indicates that no string is found.
  21128. * @type {number}
  21129. */
  21130. none= 0,
  21131. /**
  21132. * Indicates that the string is found in the cell text.
  21133. * @type {number}
  21134. */
  21135. cellText= 1,
  21136. /**
  21137. * Indicates that the string is found in the cell tag.
  21138. * @type {number}
  21139. */
  21140. cellTag= 4,
  21141. /**
  21142. * Indicates that the string is found in the cell formula.
  21143. * @type {number}
  21144. */
  21145. cellFormula= 8
  21146. }
  21147. /**
  21148. * Specifies the type of search direction.
  21149. * @enum {number}
  21150. * @example
  21151. * //This example uses the SearchFlags enumeration.
  21152. * activeSheet.getCell(2,3).value("testSearch");
  21153. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21154. * searchCondition.searchString = "testSearch";
  21155. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21156. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21157. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21158. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21159. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.ignoreCase| GC.Spread.Sheets.Search.SearchFlags.useWildCards;
  21160. * var searchresult= activeSheet.search(searchCondition);
  21161. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" +
  21162. * searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundSheetIndex+"]";
  21163. * alert(str);
  21164. */
  21165. export enum SearchOrder{
  21166. /** Determines whether the search goes by column, row coordinates.
  21167. * @type {number}
  21168. */
  21169. zOrder= 0,
  21170. /** Determines whether the search goes by row, column coordinates.
  21171. * @type {number}
  21172. */
  21173. nOrder= 1
  21174. }
  21175. export class SearchCondition{
  21176. /**
  21177. * Defines the search condition.
  21178. * @class
  21179. * @example
  21180. * activeSheet.getCell(5,4).text("testSearch");
  21181. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21182. * searchCondition.searchString = "testSearch";
  21183. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21184. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21185. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21186. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21187. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.ignoreCase| GC.Spread.Sheets.Search.SearchFlags.useWildCards;
  21188. * var searchresult= spread.search(searchCondition);
  21189. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" + searchresult.foundRowIndex+", * foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundString+"]";
  21190. * alert(str);
  21191. */
  21192. constructor();
  21193. /** The index of the column at which to end.
  21194. * @type {number}
  21195. * @example
  21196. * //This example searches a block of cells.
  21197. * activeSheet.getCell(0,0).text("testSearch");
  21198. * activeSheet.getCell(5,4).text("testSearch");
  21199. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21200. * searchCondition.searchString = "testSearch";
  21201. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21202. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21203. * searchCondition.columnStart = 1;
  21204. * searchCondition.columnEnd = 10;
  21205. * searchCondition.rowStart = 1;
  21206. * searchCondition.rowEnd = 10;
  21207. * searchCondition.sheetArea = GC.Spread.Sheets.SheetArea.viewport;
  21208. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21209. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21210. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.blockRange;
  21211. * var searchresult= spread.search(searchCondition);
  21212. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" + searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundString+"]";
  21213. * alert(str);
  21214. */
  21215. columnEnd: number;
  21216. /** The index of the column at which to start.
  21217. * @type {number}
  21218. * @example
  21219. * //This example searches a block of cells.
  21220. * activeSheet.getCell(0,0).text("testSearch");
  21221. * activeSheet.getCell(5,4).text("testSearch");
  21222. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21223. * searchCondition.searchString = "testSearch";
  21224. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21225. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21226. * searchCondition.columnStart = 1;
  21227. * searchCondition.columnEnd = 10;
  21228. * searchCondition.rowStart = 1;
  21229. * searchCondition.rowEnd = 10;
  21230. * searchCondition.sheetArea = GC.Spread.Sheets.SheetArea.viewport;
  21231. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21232. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21233. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.blockRange;
  21234. * var searchresult= spread.search(searchCondition);
  21235. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" + searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundString+"]";
  21236. * alert(str);
  21237. */
  21238. columnStart: number;
  21239. /** Index of the sheet on which to end searching.
  21240. * @type {number}
  21241. * @example
  21242. * activeSheet.getCell(5,4).text("testSearch");
  21243. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21244. * searchCondition.searchString = "testSearch";
  21245. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21246. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21247. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21248. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21249. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.ignoreCase| GC.Spread.Sheets.Search.SearchFlags.useWildCards;
  21250. * var searchresult= spread.search(searchCondition);
  21251. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" + searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundString+"]";
  21252. * alert(str);
  21253. */
  21254. endSheetIndex: number;
  21255. /** The index of the row at which to end.
  21256. * @type {number}
  21257. * @example
  21258. * //This example searches a block of cells.
  21259. * activeSheet.getCell(0,0).text("testSearch");
  21260. * activeSheet.getCell(5,4).text("testSearch");
  21261. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21262. * searchCondition.searchString = "testSearch";
  21263. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21264. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21265. * searchCondition.columnStart = 1;
  21266. * searchCondition.columnEnd = 10;
  21267. * searchCondition.rowStart = 1;
  21268. * searchCondition.rowEnd = 10;
  21269. * searchCondition.sheetArea = GC.Spread.Sheets.SheetArea.viewport;
  21270. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21271. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21272. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.blockRange;
  21273. * var searchresult= spread.search(searchCondition);
  21274. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" + searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundString+"]";
  21275. * alert(str);
  21276. */
  21277. rowEnd: number;
  21278. /** The index of the row at which to start.
  21279. * @type {number}
  21280. * @example
  21281. * //This example searches a block of cells.
  21282. * activeSheet.getCell(0,0).text("testSearch");
  21283. * activeSheet.getCell(5,4).text("testSearch");
  21284. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21285. * searchCondition.searchString = "testSearch";
  21286. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21287. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21288. * searchCondition.columnStart = 1;
  21289. * searchCondition.columnEnd = 10;
  21290. * searchCondition.rowStart = 1;
  21291. * searchCondition.rowEnd = 10;
  21292. * searchCondition.sheetArea = GC.Spread.Sheets.SheetArea.viewport;
  21293. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21294. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21295. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.blockRange;
  21296. * var searchresult= spread.search(searchCondition);
  21297. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" + searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundString+"]";
  21298. * alert(str);
  21299. */
  21300. rowStart: number;
  21301. /** The enumeration that specifies the options of the search.
  21302. * @type {GC.Spread.Sheets.Search.SearchFlags}
  21303. * @example
  21304. * //This example sets the searchFlags property.
  21305. * activeSheet.getCell(5,4).text("testSearch");
  21306. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21307. * searchCondition.searchString = "testSearch";
  21308. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21309. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21310. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21311. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21312. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.ignoreCase| GC.Spread.Sheets.Search.SearchFlags.useWildCards;
  21313. * var searchresult= spread.search(searchCondition);
  21314. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" + searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundString+"]";
  21315. * alert(str);
  21316. */
  21317. searchFlags: GC.Spread.Sheets.Search.SearchFlags;
  21318. /** The enumeration that specifies whether the search goes by coordinates of (column, row) or (row, column).
  21319. * @type {GC.Spread.Sheets.Search.SearchOrder}
  21320. * @example
  21321. * //This example sets the searchFlags property.
  21322. * activeSheet.getCell(5,4).text("testSearch");
  21323. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21324. * searchCondition.searchString = "testSearch";
  21325. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21326. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21327. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21328. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21329. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.ignoreCase| GC.Spread.Sheets.Search.SearchFlags.useWildCards;
  21330. * var searchresult= spread.search(searchCondition);
  21331. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" + searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundString+"]";
  21332. * alert(str);
  21333. */
  21334. searchOrder: GC.Spread.Sheets.Search.SearchOrder;
  21335. /** The string for which to search.
  21336. * @type {string}
  21337. * @example
  21338. * //This example sets the searchFlags property.
  21339. * activeSheet.getCell(5,4).text("testSearch");
  21340. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21341. * searchCondition.searchString = "testSearch";
  21342. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21343. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21344. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21345. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21346. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.ignoreCase| GC.Spread.Sheets.Search.SearchFlags.useWildCards;
  21347. * var searchresult= spread.search(searchCondition);
  21348. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" + searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundString+"]";
  21349. * alert(str);
  21350. */
  21351. searchString: string;
  21352. /** The enumeration that indicates whether the search includes the content in the cell notes, tags, or text.
  21353. * @type {GC.Spread.Sheets.Search.SearchFoundFlags}
  21354. * @example
  21355. * //This example sets the searchFlags property.
  21356. * activeSheet.getCell(5,4).text("testSearch");
  21357. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21358. * searchCondition.searchString = "testSearch";
  21359. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21360. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21361. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21362. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21363. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.ignoreCase| GC.Spread.Sheets.Search.SearchFlags.useWildCards;
  21364. * var searchresult= spread.search(searchCondition);
  21365. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" + searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundString+"]";
  21366. * alert(str);
  21367. */
  21368. searchTarget: GC.Spread.Sheets.Search.SearchFoundFlags;
  21369. /** The area of the sheet for search.
  21370. * @type {GC.Spread.Sheets.SheetArea}
  21371. * @example
  21372. * //This example searches a block of cells.
  21373. * activeSheet.getCell(0,0).text("testSearch");
  21374. * activeSheet.getCell(5,4).text("testSearch");
  21375. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21376. * searchCondition.searchString = "testSearch";
  21377. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21378. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21379. * searchCondition.columnStart = 1;
  21380. * searchCondition.columnEnd = 10;
  21381. * searchCondition.rowStart = 1;
  21382. * searchCondition.rowEnd = 10;
  21383. * searchCondition.sheetArea = GC.Spread.Sheets.SheetArea.viewport;
  21384. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21385. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21386. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.blockRange;
  21387. * var searchresult= spread.search(searchCondition);
  21388. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" + searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundString+"]";
  21389. * alert(str);
  21390. */
  21391. sheetArea: GC.Spread.Sheets.SheetArea;
  21392. /** Index of the sheet on which to start searching.
  21393. * @type {number}
  21394. * @example
  21395. * //This example searches a block of cells.
  21396. * activeSheet.getCell(0,0).text("testSearch");
  21397. * activeSheet.getCell(5,4).text("testSearch");
  21398. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21399. * searchCondition.searchString = "testSearch";
  21400. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21401. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21402. * searchCondition.columnStart = 1;
  21403. * searchCondition.columnEnd = 10;
  21404. * searchCondition.rowStart = 1;
  21405. * searchCondition.rowEnd = 10;
  21406. * searchCondition.sheetArea = GC.Spread.Sheets.SheetArea.viewport;
  21407. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21408. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21409. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.blockRange;
  21410. * var searchresult= spread.search(searchCondition);
  21411. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" + searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundString+"]";
  21412. * alert(str);
  21413. */
  21414. startSheetIndex: number;
  21415. }
  21416. export class SearchResult{
  21417. /**
  21418. * Defines the search result.
  21419. * @class
  21420. */
  21421. constructor();
  21422. /** The index of the column at which a match is found.
  21423. * @type {number}
  21424. * @example
  21425. * //This example gets the foundColumnIndex property.
  21426. * activeSheet.getCell(5,4).text("testSearch");
  21427. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21428. * searchCondition.searchString = "testSearch";
  21429. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21430. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21431. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21432. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21433. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.ignoreCase| GC.Spread.Sheets.Search.SearchFlags.useWildCards;
  21434. * var searchresult= spread.search(searchCondition);
  21435. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" + searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundString+"]";
  21436. * alert(str);
  21437. */
  21438. foundColumnIndex: number;
  21439. /** The index of the row at which a match is found.
  21440. * @type {number}
  21441. * @example
  21442. * //This example gets the foundColumnIndex property.
  21443. * activeSheet.getCell(5,4).text("testSearch");
  21444. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21445. * searchCondition.searchString = "testSearch";
  21446. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21447. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21448. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21449. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21450. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.ignoreCase| GC.Spread.Sheets.Search.SearchFlags.useWildCards;
  21451. * var searchresult= spread.search(searchCondition);
  21452. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" + searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundString+"]";
  21453. * alert(str);
  21454. */
  21455. foundRowIndex: number;
  21456. /** The index of the sheet in which a match is found.
  21457. * @type {number}
  21458. * @example
  21459. * //This example gets the foundColumnIndex property.
  21460. * activeSheet.getCell(5,4).text("testSearch");
  21461. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21462. * searchCondition.searchString = "testSearch";
  21463. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21464. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21465. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21466. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21467. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.ignoreCase| GC.Spread.Sheets.Search.SearchFlags.useWildCards;
  21468. * var searchresult= spread.search(searchCondition);
  21469. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" + searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundString+"]";
  21470. * alert(str);
  21471. */
  21472. foundSheetIndex: number;
  21473. /** The found string.
  21474. * @type {object}
  21475. * @example
  21476. * //This example gets the foundColumnIndex property.
  21477. * activeSheet.getCell(5,4).text("testSearch");
  21478. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21479. * searchCondition.searchString = "testSearch";
  21480. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21481. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21482. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21483. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21484. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.ignoreCase| GC.Spread.Sheets.Search.SearchFlags.useWildCards;
  21485. * var searchresult= spread.search(searchCondition);
  21486. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" + searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundString+"]";
  21487. * alert(str);
  21488. */
  21489. foundString: Object;
  21490. /**
  21491. * An enumeration that specifies what is matched.
  21492. * @type {GC.Spread.Sheets.Search.SearchFoundFlags}
  21493. * @example
  21494. * //This example gets the foundColumnIndex property.
  21495. * activeSheet.getCell(5,4).text("testSearch");
  21496. * var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
  21497. * searchCondition.searchString = "testSearch";
  21498. * searchCondition.startSheetIndex = spread.getActiveSheetIndex();
  21499. * searchCondition.endSheetIndex = spread.getActiveSheetIndex();
  21500. * searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
  21501. * searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
  21502. * searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.ignoreCase| GC.Spread.Sheets.Search.SearchFlags.useWildCards;
  21503. * var searchresult= spread.search(searchCondition);
  21504. * var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" + searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundString+"]";
  21505. * alert(str);
  21506. */
  21507. searchFoundFlag: GC.Spread.Sheets.Search.SearchFoundFlags;
  21508. }
  21509. }
  21510. module Shapes{
  21511. export interface IControlInfo{
  21512. x: number | string; // A number value or a formula string (starts with =) will get a number value
  21513. y: number | string; // A number value or a formula string (starts with =) will get a number value
  21514. xBehavior: 0 | 1; // 0 if can do adjust in x (horizontal), otherwise 1
  21515. yBehavior: 0 | 1; // 0 if can do adjust in y (vertical), otherwise 1
  21516. }
  21517. export interface IPointInfo{
  21518. x: number | string; // A number value or a formula string (starts with =) will get a number value
  21519. y: number | string; // A number value or a formula string (starts with =) will get a number value
  21520. }
  21521. export interface IShapeBorder{
  21522. color: string;
  21523. lineStyle: GC.Spread.Sheets.Shapes.PresetLineDashStyle;
  21524. width: number;
  21525. capType: GC.Spread.Sheets.Shapes.LineCapStyle;
  21526. joinType: GC.Spread.Sheets.Shapes.LineJoinStyle;
  21527. }
  21528. export interface IShapeConnector{
  21529. name: string;
  21530. index: number;
  21531. shape?: GC.Spread.Sheets.Shapes.Shape;
  21532. }
  21533. export interface IShapeFill{
  21534. color?: string;
  21535. transparency?: number | string;
  21536. }
  21537. export interface IShapeFillOption{
  21538. type: GC.Spread.Sheets.Shapes.ShapeFillType;
  21539. color?: string;
  21540. transparency?: number; // 0 ~ 1
  21541. }
  21542. export interface IShapeLine{
  21543. color?: string;
  21544. lineStyle?: GC.Spread.Sheets.Shapes.PresetLineDashStyle | string;
  21545. width?: number | string;
  21546. capType?: GC.Spread.Sheets.Shapes.LineCapStyle | string;
  21547. joinType?: GC.Spread.Sheets.Shapes.LineJoinStyle | string;
  21548. transparency?: number | string;
  21549. beginArrowheadStyle?: GC.Spread.Sheets.Shapes.ArrowheadStyle;
  21550. beginArrowheadWidth?: GC.Spread.Sheets.Shapes.ArrowheadWidth;
  21551. beginArrowheadLength?: GC.Spread.Sheets.Shapes.ArrowheadLength;
  21552. endArrowheadStyle?: GC.Spread.Sheets.Shapes.ArrowheadStyle;
  21553. endArrowheadWidth?: GC.Spread.Sheets.Shapes.ArrowheadWidth;
  21554. endArrowheadLength?: GC.Spread.Sheets.Shapes.ArrowheadLength;
  21555. }
  21556. export interface IShapeLineArrowConfig{
  21557. type: GC.Spread.Sheets.Shapes.ArrowheadStyle;
  21558. widthType: GC.Spread.Sheets.Shapes.ArrowheadWidth;
  21559. lengthType: GC.Spread.Sheets.Shapes.ArrowheadLength;
  21560. }
  21561. export interface IShapeLineArrowOption{
  21562. beginArrow?: GC.Spread.Sheets.Shapes.IShapeLineArrowConfig;
  21563. endArrow?: GC.Spread.Sheets.Shapes.IShapeLineArrowConfig;
  21564. }
  21565. export interface IShapeModel{
  21566. id?: string;
  21567. left?: number | string; // A number value or a formula string (starts with =) will get a number value
  21568. top?: number | string; // A number value or a formula string (starts with =) will get a number value
  21569. width?: number | string; // A number value or a formula string (starts with =) will get a number value
  21570. height?: number | string; // A number value or a formula string (starts with =) will get a number value
  21571. angle?: number | string; // A number value or a formula string (starts with =) will get a number value
  21572. options?: GC.Spread.Sheets.Shapes.IShapeOptions;
  21573. path: string[][];
  21574. controls?: GC.Spread.Sheets.Shapes.IControlInfo[];
  21575. connectionPoints?: GC.Spread.Sheets.Shapes.IPointInfo[];
  21576. variables?: Object; // a key-value pairs object, value can be a number or formula string (starts with =), can be referred by variables[key] in formula
  21577. textRect?: {left: number, top: number, bottom: number, right: number }; // specify the rectangle for shape text
  21578. }
  21579. export interface IShapeOptions{
  21580. fill?: GC.Spread.Sheets.Shapes.IShapeFillOption;
  21581. textFormatOptions?: GC.Spread.Sheets.Shapes.IShapeTextFormatOption;
  21582. stroke?: GC.Spread.Sheets.Shapes.IShapeStrokeOption;
  21583. endPoints?: GC.Spread.Sheets.Shapes.IShapeLineArrowOption
  21584. }
  21585. export interface IShapeStrokeOption{
  21586. type: 0 | 1; // 0: none, 1: solid
  21587. color?: string;
  21588. width?: number;
  21589. capType?: 0 | 1 | 2; // 0: round, 1: square, 2: butt
  21590. joinType?: 0 | 1 | 2; // 0: round, 1: miter, 2: bevel
  21591. lineStyle?: GC.Spread.Sheets.Shapes.PresetLineDashStyle;
  21592. }
  21593. export interface IShapeTextEffect{
  21594. color?: string;
  21595. transparency?: number | string;
  21596. font?: string;
  21597. }
  21598. export interface IShapeTextFormatOption{
  21599. text?: string;
  21600. fill?: GC.Spread.Sheets.Shapes.IShapeFillOption;
  21601. font?: string; // css font string
  21602. margins?: [number, number, number, number];
  21603. textDirection?: "horizontal" | "vertical" | "rotate90" | "rotate270";
  21604. horizontalAlignment?: 0 | 1 | 2; // 0: left, 1: center, 2: right
  21605. verticalAlignment?: 0 | 1 | 2; // 0: top, 1: center, 2: bottom
  21606. wrapTextInShape?: boolean;
  21607. allowTextToOverflowShape?: boolean;
  21608. }
  21609. export interface IShapeTextFrame{
  21610. vAlign?: GC.Spread.Sheets.VerticalAlign | string;
  21611. hAlign?: GC.Spread.Sheets.HorizontalAlign | string;
  21612. }
  21613. /**
  21614. * Specifies the length of the arrowhead at the end of a line.
  21615. * @enum {number}
  21616. */
  21617. export enum ArrowheadLength{
  21618. /**
  21619. * Short
  21620. */
  21621. short= 0,
  21622. /**
  21623. * Medium
  21624. */
  21625. medium= 1,
  21626. /**
  21627. * Long
  21628. */
  21629. long= 2
  21630. }
  21631. /**
  21632. * Specifies the style of the arrowhead at the end of a line.
  21633. * @enum {number}
  21634. */
  21635. export enum ArrowheadStyle{
  21636. /**
  21637. * No arrowhead
  21638. */
  21639. none= 0,
  21640. /**
  21641. * Triangular
  21642. */
  21643. triangle= 1,
  21644. /**
  21645. * Stealth-shaped
  21646. */
  21647. stealth= 2,
  21648. /**
  21649. * Diamond-shaped
  21650. */
  21651. diamond= 3,
  21652. /**
  21653. * Oval-shaped
  21654. */
  21655. oval= 4,
  21656. /**
  21657. * Open
  21658. */
  21659. open= 5
  21660. }
  21661. /**
  21662. * Specifies the width of the arrowhead at the end of a line.
  21663. * @enum {number}
  21664. */
  21665. export enum ArrowheadWidth{
  21666. /**
  21667. * Narrow
  21668. */
  21669. narrow= 0,
  21670. /**
  21671. * Medium
  21672. */
  21673. medium= 1,
  21674. /**
  21675. * Wide
  21676. */
  21677. wide= 2
  21678. }
  21679. /**
  21680. * Defines all the types of build-in shapes.
  21681. * @enum {number}
  21682. */
  21683. export enum AutoShapeType{
  21684. /**
  21685. * Specifies a rectangle.
  21686. */
  21687. rectangle= 1,
  21688. /**
  21689. * Specifies a parallelogram.
  21690. */
  21691. parallelogram= 2,
  21692. /**
  21693. * Specifies a trapezoid.
  21694. */
  21695. trapezoid= 3,
  21696. /**
  21697. * Specifies a diamond.
  21698. */
  21699. diamond= 4,
  21700. /**
  21701. * Specifies a rounded rectangle.
  21702. */
  21703. roundedRectangle= 5,
  21704. /**
  21705. * Specifies an octagon.
  21706. */
  21707. octagon= 6,
  21708. /**
  21709. * Specifies an isosceles triangle.
  21710. */
  21711. isoscelesTriangle= 7,
  21712. /**
  21713. * Specifies a right triangle.
  21714. */
  21715. rightTriangle= 8,
  21716. /**
  21717. * Specifies an oval.
  21718. */
  21719. oval= 9,
  21720. /**
  21721. * Specifies a hexagon.
  21722. */
  21723. hexagon= 10,
  21724. /**
  21725. * Specifies a cross.
  21726. */
  21727. cross= 11,
  21728. /**
  21729. * Specifies a pentagon.
  21730. */
  21731. regularPentagon= 12,
  21732. /**
  21733. * Specifies a can.
  21734. */
  21735. can= 13,
  21736. /**
  21737. * Specifies a cube.
  21738. */
  21739. cube= 14,
  21740. /**
  21741. * Specifies a bevel.
  21742. */
  21743. bevel= 15,
  21744. /**
  21745. * Specifies a folded corner.
  21746. */
  21747. foldedCorner= 16,
  21748. /**
  21749. * Specifies a smiley face.
  21750. */
  21751. smileyFace= 17,
  21752. /**
  21753. * Specifies a donut.
  21754. */
  21755. donut= 18,
  21756. /**
  21757. * Specifies the "No" symbol.
  21758. */
  21759. noSymbol= 19,
  21760. /**
  21761. * Specifies a block arc.
  21762. */
  21763. blockArc= 20,
  21764. /**
  21765. * Specifies a heart.
  21766. */
  21767. heart= 21,
  21768. /**
  21769. * Specifies a lightning bolt.
  21770. */
  21771. lightningBolt= 22,
  21772. /**
  21773. * Specifies a sun.
  21774. */
  21775. sun= 23,
  21776. /**
  21777. * Specifies a moon.
  21778. */
  21779. moon= 24,
  21780. /**
  21781. * Specifies an arc.
  21782. */
  21783. arc= 25,
  21784. /**
  21785. * Specifies a double bracket.
  21786. */
  21787. doubleBracket= 26,
  21788. /**
  21789. * Specifies a double brace.
  21790. */
  21791. doubleBrace= 27,
  21792. /**
  21793. * Specifies a plaque.
  21794. */
  21795. plaque= 28,
  21796. /**
  21797. * Specifies the left bracket.
  21798. */
  21799. leftBracket= 29,
  21800. /**
  21801. * Specifies the right bracket.
  21802. */
  21803. rightBracket= 30,
  21804. /**
  21805. * Specifies the left brace.
  21806. */
  21807. leftBrace= 31,
  21808. /**
  21809. * Specifies the right brace.
  21810. */
  21811. rightBrace= 32,
  21812. /**
  21813. * Specifies a block arrow that points right.
  21814. */
  21815. rightArrow= 33,
  21816. /**
  21817. * Specifies a block arrow that points left.
  21818. */
  21819. leftArrow= 34,
  21820. /**
  21821. * Specifies a block arrow that points up.
  21822. */
  21823. upArrow= 35,
  21824. /**
  21825. * Specifies a block arrow that points down.
  21826. */
  21827. downArrow= 36,
  21828. /**
  21829. * Specifies a block arrow with arrowheads that point both left and right.
  21830. */
  21831. leftRightArrow= 37,
  21832. /**
  21833. * Specifies a block arrow that points up and down.
  21834. */
  21835. upDownArrow= 38,
  21836. /**
  21837. * Specifies block arrows that point up, down, left, and right.
  21838. */
  21839. quadArrow= 39,
  21840. /**
  21841. * Specifies a block arrow with arrowheads that point left, right, and up.
  21842. */
  21843. leftRightUpArrow= 40,
  21844. /**
  21845. * Specifies a block arrow that follows a curved 90-degree angle.
  21846. */
  21847. bentArrow= 41,
  21848. /**
  21849. * Specifies a block arrow forming a U shape.
  21850. */
  21851. uTurnArrow= 42,
  21852. /**
  21853. * Specifies a block arrow with arrowheads that point left and up.
  21854. */
  21855. leftUpArrow= 43,
  21856. /**
  21857. * Specifies a block arrow that follows a sharp 90-degree angle. Points up by default.
  21858. */
  21859. bentUpArrow= 44,
  21860. /**
  21861. * Specifies a block arrow that curves right
  21862. */
  21863. curvedRightArrow= 45,
  21864. /**
  21865. * Specifies a block arrow that curves left.
  21866. */
  21867. curvedLeftArrow= 46,
  21868. /**
  21869. * Specifies a block arrow that curves up.
  21870. */
  21871. curvedUpArrow= 47,
  21872. /**
  21873. * Specifies a block arrow that curves down.
  21874. */
  21875. curvedDownArrow= 48,
  21876. /**
  21877. * Specifies a block arrow that points right with stripes at the tail.
  21878. */
  21879. stripedRightArrow= 49,
  21880. /**
  21881. * Specifies a notched block arrow that points right
  21882. */
  21883. notchedRightArrow= 50,
  21884. /**
  21885. * Specifies a pentagon.
  21886. */
  21887. pentagon= 51,
  21888. /**
  21889. * Specifies a chevron.
  21890. */
  21891. chevron= 52,
  21892. /**
  21893. * Specifies a callout with an arrow that points right.
  21894. */
  21895. rightArrowCallout= 53,
  21896. /**
  21897. * Specifies a callout with an arrow that points left.
  21898. */
  21899. leftArrowCallout= 54,
  21900. /**
  21901. * Specifies a callout with an arrow that points up.
  21902. */
  21903. upArrowCallout= 55,
  21904. /**
  21905. * Specifies a callout with an arrow that points down.
  21906. */
  21907. downArrowCallout= 56,
  21908. /**
  21909. * Specifies a callout with arrowheads that point both left and right.
  21910. */
  21911. leftRightArrowCallout= 57,
  21912. /**
  21913. * Specifies a callout with arrows that point up and down.
  21914. */
  21915. upDownArrowCallout= 58,
  21916. /**
  21917. * Specifies a callout with arrows that point up, down, left, and right.
  21918. */
  21919. quadArrowCallout= 59,
  21920. /**
  21921. * Specifies a block arrow that follows a curved 180-degree angle.
  21922. */
  21923. circularArrow= 60,
  21924. /**
  21925. * Specifies a process flowchart symbol.
  21926. */
  21927. flowchartProcess= 61,
  21928. /**
  21929. * Specifies an alternate process flowchart symbol.
  21930. */
  21931. flowchartAlternateProcess= 62,
  21932. /**
  21933. * Specifies a decision flowchart symbol.
  21934. */
  21935. flowchartDecision= 63,
  21936. /**
  21937. * Specifies a data flowchart symbol.
  21938. */
  21939. flowchartData= 64,
  21940. /**
  21941. * Specifies a predefined process flowchart symbol.
  21942. */
  21943. flowchartPredefinedProcess= 65,
  21944. /**
  21945. * Specifies an internal storage flowchart symbol.
  21946. */
  21947. flowchartInternalStorage= 66,
  21948. /**
  21949. * Specifies a document flowchart symbol.
  21950. */
  21951. flowchartDocument= 67,
  21952. /**
  21953. * Specifies a multi-document flowchart symbol.
  21954. */
  21955. flowchartMultidocument= 68,
  21956. /**
  21957. * Specifies a terminator flowchart symbol.
  21958. */
  21959. flowchartTerminator= 69,
  21960. /**
  21961. * Specifies a preparation flowchart symbol.
  21962. */
  21963. flowchartPreparation= 70,
  21964. /**
  21965. * Specifies a manual input flowchart symbol.
  21966. */
  21967. flowchartManualInput= 71,
  21968. /**
  21969. * Specifies a manual operation flowchart symbol.
  21970. */
  21971. flowchartManualOperation= 72,
  21972. /**
  21973. * Specifies a connector flowchart symbol.
  21974. */
  21975. flowchartConnector= 73,
  21976. /**
  21977. * Specifies an off-page connector flowchart symbol.
  21978. */
  21979. flowchartOffpageConnector= 74,
  21980. /**
  21981. * Specifies a card flowchart symbol.
  21982. */
  21983. flowchartCard= 75,
  21984. /**
  21985. * Specifies a punched tape flowchart symbol.
  21986. */
  21987. flowchartPunchedTape= 76,
  21988. /**
  21989. * Specifies a summing junction flowchart symbol.
  21990. */
  21991. flowchartSummingJunction= 77,
  21992. /**
  21993. * Specifies the "Or" flowchart symbol.
  21994. */
  21995. flowchartOr= 78,
  21996. /**
  21997. * Specifies a collate flowchart symbol.
  21998. */
  21999. flowchartCollate= 79,
  22000. /**
  22001. * Specifies a sort flowchart symbol.
  22002. */
  22003. flowchartSort= 80,
  22004. /**
  22005. * Specifies an extract flowchart symbol.
  22006. */
  22007. flowchartExtract= 81,
  22008. /**
  22009. * Specifies a merge flowchart symbol.
  22010. */
  22011. flowchartMerge= 82,
  22012. /**
  22013. * Specifies a stored data flowchart symbol.
  22014. */
  22015. flowchartStoredData= 83,
  22016. /**
  22017. * Specifies a delay flowchart symbol.
  22018. */
  22019. flowchartDelay= 84,
  22020. /**
  22021. * Specifies a sequential access storage flowchart symbol.
  22022. */
  22023. flowchartSequentialAccessStorage= 85,
  22024. /**
  22025. * Specifies a magnetic disk flowchart symbol.
  22026. */
  22027. flowchartMagneticDisk= 86,
  22028. /**
  22029. * Specifies a direct access storage flowchart symbol.
  22030. */
  22031. flowchartDirectAccessStorage= 87,
  22032. /**
  22033. * Specifies a display flowchart symbol.
  22034. */
  22035. flowchartDisplay= 88,
  22036. /**
  22037. * Specifies an explosion.
  22038. */
  22039. explosion1= 89,
  22040. /**
  22041. * Specifies an explosion.
  22042. */
  22043. explosion2= 90,
  22044. /**
  22045. * Specifies a 4-point star.
  22046. */
  22047. shape4pointStar= 91,
  22048. /**
  22049. * Specifies a 5-point star.
  22050. */
  22051. shape5pointStar= 92,
  22052. /**
  22053. * Specifies an 8-point star.
  22054. */
  22055. shape8pointStar= 93,
  22056. /**
  22057. * Specifies a 16-point star.
  22058. */
  22059. shape16pointStar= 94,
  22060. /**
  22061. * Specifies a 24-point star.
  22062. */
  22063. shape24pointStar= 95,
  22064. /**
  22065. * Specifies a 32-point star.
  22066. */
  22067. shape32pointStar= 96,
  22068. /**
  22069. * Specifies a ribbon banner with a center area above the ribbon ends.
  22070. */
  22071. upRibbon= 97,
  22072. /**
  22073. * Specifies a ribbon banner with a center area below the ribbon ends.
  22074. */
  22075. downRibbon= 98,
  22076. /**
  22077. * Specifies a ribbon banner that curves up.
  22078. */
  22079. curvedUpRibbon= 99,
  22080. /**
  22081. * Specifies a ribbon banner that curves down.
  22082. */
  22083. curvedDownRibbon= 100,
  22084. /**
  22085. * Specifies a vertical scroll shape.
  22086. */
  22087. verticalScroll= 101,
  22088. /**
  22089. * Specifies a horizontal scroll shape.
  22090. */
  22091. horizontalScroll= 102,
  22092. /**
  22093. * Specifies a wave shape.
  22094. */
  22095. wave= 103,
  22096. /**
  22097. * Specifies a double wave shape.
  22098. */
  22099. doubleWave= 104,
  22100. /**
  22101. * Specifies a rectangular callout.
  22102. */
  22103. rectangularCallout= 105,
  22104. /**
  22105. * Specifies a rounded rectangle-shaped callout.
  22106. */
  22107. roundedRectangularCallout= 106,
  22108. /**
  22109. * Specifies an oval-shaped callout.
  22110. */
  22111. ovalCallout= 107,
  22112. /**
  22113. * Specifies a cloud callout.
  22114. */
  22115. cloudCallout= 108,
  22116. /**
  22117. * Specifies a callout with border and horizontal callout lines.
  22118. */
  22119. lineCallout1= 109,
  22120. /**
  22121. * Specifies a callout with a diagonal straight line.
  22122. */
  22123. lineCallout2= 110,
  22124. /**
  22125. * Specifies a callout with an angled line.
  22126. */
  22127. lineCallout3= 111,
  22128. /**
  22129. * Specifies a callout with callout line segments forming a U-shape.
  22130. */
  22131. lineCallout4= 112,
  22132. /**
  22133. * Specifies a callout with a horizontal accent bar.
  22134. */
  22135. lineCallout1AccentBar= 113,
  22136. /**
  22137. * Specifies a callout with a diagonal callout line and accent bar.
  22138. */
  22139. lineCallout2AccentBar= 114,
  22140. /**
  22141. * Specifies a callout with an angled callout line and accent bar.
  22142. */
  22143. lineCallout3AccentBar= 115,
  22144. /**
  22145. * Specifies a callout with an accent bar and callout line segments forming a U-shape.
  22146. */
  22147. lineCallout4AccentBar= 116,
  22148. /**
  22149. * Specifies a callout with a horizontal line.
  22150. */
  22151. lineCallout1NoBorder= 117,
  22152. /**
  22153. * Specifies a callout with no border and a diagonal callout line.
  22154. */
  22155. lineCallout2NoBorder= 118,
  22156. /**
  22157. * Specifies a callout with no border and an angled callout line.
  22158. */
  22159. lineCallout3NoBorder= 119,
  22160. /**
  22161. * Specifies a callout with no border and callout line segments forming a U-shape.
  22162. */
  22163. lineCallout4NoBorder= 120,
  22164. /**
  22165. * Specifies a callout with a border and horizontal accent bar.
  22166. */
  22167. lineCallout1BorderandAccentBar= 121,
  22168. /**
  22169. * Specifies a callout with border, diagonal straight line, and accent bar.
  22170. */
  22171. lineCallout2BorderandAccentBar= 122,
  22172. /**
  22173. * Specifies a callout with border, angled callout line, and accent bar.
  22174. */
  22175. lineCallout3BorderandAccentBar= 123,
  22176. /**
  22177. * Specifies a callout with border, accent bar, and callout line segments forming a U-shape.
  22178. */
  22179. lineCallout4BorderandAccentBar= 124,
  22180. /**
  22181. * Specifies a button with no default picture or text. Supports mouse-click and mouse-over actions.
  22182. */
  22183. actionButtonCustom= 125,
  22184. /**
  22185. * Specifies the Home button. Supports mouse-click and mouse-over actions.
  22186. */
  22187. actionButtonHome= 126,
  22188. /**
  22189. * Specifies the Help button. Supports mouse-click and mouse-over actions.
  22190. */
  22191. actionButtonHelp= 127,
  22192. /**
  22193. * Specifies the Information button. Supports mouse-click and mouse-over actions.
  22194. */
  22195. actionButtonInformation= 128,
  22196. /**
  22197. * Specifies the Back or Previous button. Supports mouse-click and mouse-over actions.
  22198. */
  22199. actionButtonBackorPrevious= 129,
  22200. /**
  22201. * Specifies the Forward or Next button. Supports mouse-click and mouse-over actions.
  22202. */
  22203. actionButtonForwardorNext= 130,
  22204. /**
  22205. * Specifies the Beginning button. Supports mouse-click and mouse-over actions.
  22206. */
  22207. actionButtonBeginning= 131,
  22208. /**
  22209. * Specifies the End button. Supports mouse-click and mouse-over actions.
  22210. */
  22211. actionButtonEnd= 132,
  22212. /**
  22213. * Specifies the Return button. Supports mouse-click and mouse-over actions.
  22214. */
  22215. actionButtonReturn= 133,
  22216. /**
  22217. * Specifies the Document button. Supports mouse-click and mouse-over actions.
  22218. */
  22219. actionButtonDocument= 134,
  22220. /**
  22221. * Specifies the Sound button. Supports mouse-click and mouse-over actions.
  22222. */
  22223. actionButtonSound= 135,
  22224. /**
  22225. * Specifies the Movie button. Supports mouse-click and mouse-over actions.
  22226. */
  22227. actionButtonMovie= 136,
  22228. /**
  22229. * Specifies a balloon.
  22230. */
  22231. balloon= 137,
  22232. /**
  22233. * Specifies an offline storage flowchart symbol.
  22234. */
  22235. flowchartOfflineStorage= 138,
  22236. /**
  22237. * Specifies a ribbon with an arrow at both ends.
  22238. */
  22239. leftRightRibbon= 139,
  22240. /**
  22241. * Specifies a rectangle with two triangle-shapes removed; a diagonal stripe.
  22242. */
  22243. diagonalStripe= 140,
  22244. /**
  22245. * Specifies a circle (\u2018pie\u2019) with a portion missing.
  22246. */
  22247. pie= 141,
  22248. /**
  22249. * Specifies a trapezoid with asymmetrical non-parallel sides.
  22250. */
  22251. nonIsoscelesTrapezoid= 142,
  22252. /**
  22253. * Specifies a decagon.
  22254. */
  22255. decagon= 143,
  22256. /**
  22257. * Specifies a heptagon.
  22258. */
  22259. heptagon= 144,
  22260. /**
  22261. * Specifies a dodecagon
  22262. */
  22263. dodecagon= 145,
  22264. /**
  22265. * Specifies a 6-point star.
  22266. */
  22267. star6Point= 146,
  22268. /**
  22269. * Specifies a 7-point star.
  22270. */
  22271. star7Point= 147,
  22272. /**
  22273. * Specifies a 10-point star.
  22274. */
  22275. star10Point= 148,
  22276. /**
  22277. * Specifies a 12-point star.
  22278. */
  22279. star12Point= 149,
  22280. /**
  22281. * Specifies a rectangle with one rounded corner.
  22282. */
  22283. round1Rectangle= 150,
  22284. /**
  22285. * Specifies a rectangle with two-rounded corners that share a side.
  22286. */
  22287. round2SameRectangle= 151,
  22288. /**
  22289. * Specifies a rectangle with two rounded corners, diagonally-opposed.
  22290. */
  22291. round2DiagRectangle= 152,
  22292. /**
  22293. * Specifies a rectangle with one snipped corner and one rounded corner.
  22294. */
  22295. snipRoundRectangle= 153,
  22296. /**
  22297. * Specifies a rectangle with one snipped corner.
  22298. */
  22299. snip1Rectangle= 154,
  22300. /**
  22301. * Specifies a rectangle with two snipped corners that share a side.
  22302. */
  22303. snip2SameRectangle= 155,
  22304. /**
  22305. * Specifies a rectangle with two snipped corners, diagonally-opposed.
  22306. */
  22307. snip2DiagRectangle= 156,
  22308. /**
  22309. * Specifies a rectangular picture frame.
  22310. */
  22311. frame= 157,
  22312. /**
  22313. * Specifies half of a rectangular picture frame.
  22314. */
  22315. halfFrame= 158,
  22316. /**
  22317. * Specifies a water droplet.
  22318. */
  22319. tear= 159,
  22320. /**
  22321. * Specifies a circle with a line connecting two points on the perimeter through the interior of the circle; a circle with a chord.
  22322. */
  22323. chord= 160,
  22324. /**
  22325. * Specifies a rectangle with a rectangular-shaped hole.
  22326. */
  22327. corner= 161,
  22328. /**
  22329. * Specifies the addition symbol \u2018+\u2019.
  22330. */
  22331. mathPlus= 162,
  22332. /**
  22333. * Specifies the subtraction symbol \u2018-\u2018.
  22334. */
  22335. mathMinus= 163,
  22336. /**
  22337. * Specifies the multiplication symbol \u2018x\u2019.
  22338. */
  22339. mathMultiply= 164,
  22340. /**
  22341. * Specifies the division symbol \u2018\xf7\u2019.
  22342. */
  22343. mathDivide= 165,
  22344. /**
  22345. * Specifies the equivalence symbol \u2018=\u2019.
  22346. */
  22347. mathEqual= 166,
  22348. /**
  22349. * Specifies the non-equivalence symbol \u2018\u2260\u2019.
  22350. */
  22351. mathNotEqual= 167,
  22352. /**
  22353. * Specifies four right triangles aligning along a rectangular path with four \u2018snipped\u2019 corners.
  22354. */
  22355. cornerTabs= 168,
  22356. /**
  22357. * Specifies four small squares that define a rectangular shape.
  22358. */
  22359. squareTabs= 169,
  22360. /**
  22361. * Specifies four quarter-circles defining a rectangular shape.
  22362. */
  22363. plaqueTabs= 170,
  22364. /**
  22365. * Specifies a gear with six teeth.
  22366. */
  22367. gear6= 171,
  22368. /**
  22369. * Specifies a gear with nine teeth
  22370. */
  22371. gear9= 172,
  22372. /**
  22373. * Specifies a funnel.
  22374. */
  22375. funnel= 173,
  22376. /**
  22377. * Specifies a quarter of a circular shape.
  22378. */
  22379. pieWedge= 174,
  22380. /**
  22381. * Specifies a circular arrow pointing counter-clockwise.
  22382. */
  22383. leftCircularArrow= 175,
  22384. /**
  22385. * Specifies a circular arrow pointing clockwise and counter-clockwise; a curved arrow with points at both ends.
  22386. */
  22387. leftRightCircularArrow= 176,
  22388. /**
  22389. * Specifies a curved arrow.
  22390. */
  22391. swooshArrow= 177,
  22392. /**
  22393. * Specifies a cloud shape.
  22394. */
  22395. cloud= 178,
  22396. /**
  22397. * Specifies a square divided into four parts along diagonal lines.
  22398. */
  22399. chartX= 179,
  22400. /**
  22401. * Specifies a square divided six parts along vertical and diagonal lines.
  22402. */
  22403. chartStar= 180,
  22404. /**
  22405. * Specifies a square divided vertically and horizontally into four quarters.
  22406. */
  22407. chartPlus= 181,
  22408. /**
  22409. * Specifies an inverse line.
  22410. */
  22411. lineInverse= 182,
  22412. /**
  22413. * Specifies an inverse line.
  22414. */
  22415. line= 183
  22416. }
  22417. /**
  22418. * Defines the type of Connector.
  22419. * @enum {number}
  22420. */
  22421. export enum ConnectorType{
  22422. /**
  22423. * Specifies a straight line connector.
  22424. */
  22425. straight= 0,
  22426. /**
  22427. * Specifies an elbow connector.
  22428. */
  22429. elbow= 1
  22430. }
  22431. /**
  22432. * Specifies the cap type for a line.
  22433. * @enum {number}
  22434. */
  22435. export enum LineCapStyle{
  22436. /**
  22437. * Specifies the end of the line is flat.
  22438. */
  22439. flat= 2,
  22440. /**
  22441. * Specifies the end of the line is capped with a square shape.
  22442. */
  22443. square= 1,
  22444. /**
  22445. * Specifies the end of the line is rounded.
  22446. */
  22447. round= 0
  22448. }
  22449. /**
  22450. * Specifies the corners style of two intersecting lines.
  22451. * @enum {number}
  22452. */
  22453. export enum LineJoinStyle{
  22454. /**
  22455. * Specifies the corners where the two lines intersect are rounded.
  22456. */
  22457. round= 0,
  22458. /**
  22459. * Specifies the corners where the two lines intersect are squared off.
  22460. */
  22461. miter= 1,
  22462. /**
  22463. * Specifies the corners where the two lines intersect are cut off at a 45 degree angle.
  22464. */
  22465. bevel= 2
  22466. }
  22467. /**
  22468. * Specifies the dash style for a line.
  22469. * @enum {number}
  22470. */
  22471. export enum PresetLineDashStyle{
  22472. /**
  22473. * Line is solid.
  22474. */
  22475. solid= 0,
  22476. /**
  22477. * Line is made up of square dots.
  22478. */
  22479. squareDot= 1,
  22480. /**
  22481. * Line consists of dashes only.
  22482. */
  22483. dash= 2,
  22484. /**
  22485. * Line consists of long dashes.
  22486. */
  22487. longDash= 3,
  22488. /**
  22489. * Line is a dash-dot pattern.
  22490. */
  22491. dashDot= 4,
  22492. /**
  22493. * Line is a long dash-dot pattern.
  22494. */
  22495. longDashDot= 5,
  22496. /**
  22497. * Line is a long dash-dot-dot pattern.
  22498. */
  22499. longDashDotDot= 6,
  22500. /**
  22501. * Line is a system dash pattern.
  22502. */
  22503. sysDash= 7,
  22504. /**
  22505. * Line is a system dot pattern.
  22506. */
  22507. sysDot= 8,
  22508. /**
  22509. * Line is a system dash-dot pattern.
  22510. */
  22511. sysDashDot= 9,
  22512. /**
  22513. * Line is a dash-dot-dot pattern.
  22514. */
  22515. dashDotDot= 10
  22516. }
  22517. /**
  22518. * Defines fill type of shape.
  22519. * @enum {number}
  22520. */
  22521. export enum ShapeFillType{
  22522. /**
  22523. * No Fill
  22524. */
  22525. none= 0,
  22526. /**
  22527. * Solid Fill
  22528. */
  22529. solid= 1
  22530. }
  22531. export class ConnectorShape extends GC.Spread.Sheets.Shapes.ShapeBase{
  22532. /**
  22533. * Represents a ConnectorShape.
  22534. * @param {GC.Spread.Sheets.Worksheet} worksheet The host sheet of the shape.
  22535. * @param {string} name The name of shape.
  22536. * @param {GC.Spread.Sheets.Shapes.ConnectorType} connectorType The type of the connector shape.
  22537. * @param {number} beginX The <i>x</i> location of the start point for the connector shape.
  22538. * @param {number} beginY The <i>y</i> location of the start point for the connector shape.
  22539. * @param {number} endX The <i>x</i> location of the end point for the connector shape.
  22540. * @param {number} endY The <i>y</i> location of the end point for the connector shape.
  22541. */
  22542. constructor(worksheet: GC.Spread.Sheets.Worksheet, name: string, connectorType?: GC.Spread.Sheets.Shapes.ConnectorType, beginX?: number, beginY?: number, endX?: number, endY?: number);
  22543. /**
  22544. * Gets or sets the adjustment values of the connector shape.
  22545. * @param {number[]} arrayValue The adjustment values in array.
  22546. * @return {number[] | void} if no value is set, returns the current adjustment values of the shape.
  22547. * @example
  22548. * var myConnector = sheet.shapes.addConnector("myConnector", GC.Spread.Sheets.Shapes.ConnectorType.elbow, 50, 50, 200, 500);
  22549. * var adjustments = myConnector.adjustments();
  22550. * console.log(adjustments);
  22551. * adjustments = [-0.8];
  22552. * myConnector.adjustments(adjustments);
  22553. */
  22554. adjustments(arrayValue?: number[]): any;
  22555. /**
  22556. * Gets or sets the end connector info of the connectorShape.
  22557. * @param {object} connector The end connector info of the connectorShape.
  22558. * @param {string} connector.name The name of the end connector.
  22559. * @param {number} connector.index The connect point index of the end connector.
  22560. * @returns {object} connectorInfo - If no value is set, returns the end connector info of the connectorShape. When the connectorShape has no end connector returns null.
  22561. * connectorInfo.name {string} The name of the end connector.
  22562. * connectorInfo.index {number} The connect point index of the end connector.
  22563. * connectorInfo.shape {GC.Spread.Sheets.Shapes.Shape} The end connector.
  22564. * @example
  22565. * var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 62 * 9, 0, 200, 200);
  22566. * var shape2 = sheet.shapes.addConnector("myShape", GC.Spread.Sheets.Shapes.ConnectorType.straight, 220, 120, 300, 120);
  22567. * var endConnector = shape.endConnector();
  22568. * shape2.endConnector({name: shape1.name(), index: 2});
  22569. */
  22570. endConnector(connector?: GC.Spread.Sheets.Shapes.IShapeConnector): GC.Spread.Sheets.Shapes.IShapeConnector;
  22571. /**
  22572. * Gets the formula string from the shape by the path.
  22573. * @param {string} path The path which can accept a formula string, it could be one of "x", "y", "width", "height",
  22574. * "style.line.color", "style.line.lineStyle", "style.line.width", "style.line.capType", "style.line.joinType", "style.line.transparency".
  22575. * @returns {string} Returns the formula string from the shape by the path.
  22576. * @example
  22577. * sheet.name("Sheet1");
  22578. * sheet.setValue(0, 1, "red");
  22579. * var myConnector = sheet.shapes.addConnector("myConnector", GC.Spread.Sheets.Shapes.ConnectorType.elbow, 50, 50, 200, 500);
  22580. * myConnector.setFormula("style.line.color", "=Sheet1!B1");
  22581. * myConnector.getFormula("style.line.color");//returns "=Sheet1!B1"
  22582. */
  22583. getFormula(path: string): string;
  22584. /**
  22585. * Sets the formula string to the shape by the path.
  22586. * @param {string} path The path which can accept a formula string, it could be one of "x", "y", "width", "height",
  22587. * "style.line.color", "style.line.lineStyle", "style.line.width", "style.line.capType", "style.line.joinType", "style.line.transparency".
  22588. * @param {string} formula The formula string.
  22589. * @example
  22590. * sheet.name("Sheet1");
  22591. * sheet.setValue(0, 1, "red");
  22592. * var myConnector = sheet.shapes.addConnector("myConnector", GC.Spread.Sheets.Shapes.ConnectorType.elbow, 50, 50, 200, 500);
  22593. * myConnector.setFormula("style.line.color", "=Sheet1!B1");
  22594. */
  22595. setFormula(path: string, formula: string): void;
  22596. /**
  22597. * Gets or sets the start connector info of the connectorShape.
  22598. * @param {object} connector The start connector info of the connectorShape.
  22599. * @param {string} connector.name The name of the start connector.
  22600. * @param {number} connector.index The connect point index of the start connector.
  22601. * @returns {object} connectorInfo - If no value is set, returns the start connector info of the connectorShape. When the connectorShape has no start connector returns return null.
  22602. * connectorInfo.name {string} The name of the start connector.
  22603. * connectorInfo.index {number} The connect point index of the start connector.
  22604. * connectorInfo.shape {GC.Spread.Sheets.Shapes.Shape} The start connector.
  22605. * @example
  22606. * var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 62 * 9, 0, 200, 200);
  22607. * var shape2 = sheet.shapes.addConnector("myShape", GC.Spread.Sheets.Shapes.ConnectorType.straight, 220, 120, 300, 120);
  22608. * var startConnector = shape.startConnector();
  22609. * shape2.startConnector({name: shape1.name(), index: 2});
  22610. */
  22611. startConnector(connector?: GC.Spread.Sheets.Shapes.IShapeConnector): GC.Spread.Sheets.Shapes.IShapeConnector;
  22612. /**
  22613. * Gets or sets the style of the connector shape.
  22614. * @param {GC.Spread.Sheets.Shapes.ShapeStyle} value The connector shape style.
  22615. * @return {GC.Spread.Sheets.Shapes.ShapeStyle | void} If no value is set, returns the current style of the connector shape.
  22616. *
  22617. * @example
  22618. * //This sample sets style for the connector shape.
  22619. * var shape = sheet.shapes.addConnector("Shape1", GC.Spread.Sheets.Shapes.ConnectorType.straight, 100, 60, 200, 160);
  22620. * var oldStyle = shape.style();
  22621. * oldStyle.line.color = "red";
  22622. * oldStyle.line.lineStyle = GC.Spread.Sheets.Shapes.PresetLineDashStyle.dashDot;
  22623. * oldStyle.line.width = 5;
  22624. * oldStyle.line.capType = GC.Spread.Sheets.Shapes.LineCapStyle.square;
  22625. * oldStyle.line.joinType = GC.Spread.Sheets.Shapes.LineJoinStyle.miter;
  22626. * oldStyle.line.transparency = 0.5;
  22627. * oldStyle.line.beginArrowheadStyle = GC.Spread.Sheets.Shapes.ArrowheadStyle.triangle;
  22628. * oldStyle.line.beginArrowheadWidth = GC.Spread.Sheets.Shapes.ArrowheadWidth.narrow;
  22629. * oldStyle.line.beginArrowheadLength = GC.Spread.Sheets.Shapes.ArrowheadLength.short;
  22630. * oldStyle.line.endArrowheadStyle = GC.Spread.Sheets.Shapes.ArrowheadStyle.diamond;
  22631. * oldStyle.line.endArrowheadWidth = GC.Spread.Sheets.Shapes.ArrowheadWidth.wide;
  22632. * oldStyle.line.endArrowheadLength = GC.Spread.Sheets.Shapes.ArrowheadLength.long;
  22633. * shape.style(oldStyle);
  22634. */
  22635. style(value?: GC.Spread.Sheets.Shapes.ShapeStyle): GC.Spread.Sheets.Shapes.ShapeStyle | void;
  22636. /**
  22637. * Gets the connector type of the connectorShape.
  22638. * @returns {GC.Spread.Sheets.Shapes.ConnectorType} returns the connector type of the shape.
  22639. * @example
  22640. * var shape = sheet.shapes.addConnector("myShape", GC.Spread.Sheets.Shapes.ConnectorType.straight, 220, 120, 300, 120);
  22641. * var shapeName = shape.type();
  22642. */
  22643. type(): GC.Spread.Sheets.Shapes.ConnectorType;
  22644. }
  22645. export class GroupShape extends GC.Spread.Sheets.Shapes.ShapeBase{
  22646. /**
  22647. * Represents a groupShape.
  22648. * @class
  22649. * @param {GC.Spread.Sheets.Worksheet} worksheet The host sheet of the groupShape.
  22650. * @param {string} [name] The name of groupShape
  22651. */
  22652. constructor(worksheet: GC.Spread.Sheets.Worksheet, name?: string);
  22653. /**
  22654. * add a shape to groupShape.
  22655. * @param {GC.Spread.Sheets.Shapes.Shape} shape The shape which added to groupShape.
  22656. * @returns {void}
  22657. */
  22658. add(value?: GC.Spread.Sheets.Shapes.Shape): void;
  22659. /**
  22660. * get all shapes of group shape.
  22661. * @returns {Array.<GC.Spread.Sheets.Shapes.Shape>} all shapes
  22662. * @example
  22663. * // This sample shows how to get all shapes in group shape.
  22664. * var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 62 * 9, 0, 200, 200);
  22665. * var shape2 = sheet.shapes.add("myShape2", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 20, 20, 200, 200);
  22666. * var groupShape = sheet.shapes.group([shape1, shape2]);
  22667. * var shapes = groupShape.all();
  22668. */
  22669. all(): GC.Spread.Sheets.Shapes.Shape[];
  22670. /**
  22671. * Get shape of shapes in groupShape by name.
  22672. * @param {string} name The name of shape in groupShape.
  22673. * @return {GC.Spread.Sheets.Shapes.Shape} The Shape instance if the name belongs to a shape of group shapes; otherwise, <c>null</c>.
  22674. */
  22675. find(name?: string): GC.Spread.Sheets.Shapes.Shape;
  22676. /**
  22677. * Gets the formula string from the shape by the path.
  22678. * @param {string} path The path which can accept a formula string, it could be one of "x", "y", "width", "height", "rotate".
  22679. * @returns {string} Returns the formula string from the shape by the path.
  22680. * @example
  22681. * sheet.name("Sheet1");
  22682. * sheet.setValue(0, 1, 30);
  22683. * var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 62 * 9, 0, 200, 200);
  22684. * var shape2 = sheet.shapes.add("myShape2", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 20, 20, 200, 200);
  22685. * var shape = sheet.shapes.group([shape1, shape2]);
  22686. * shape.setFormula("rotate", "=Sheet1!B1");
  22687. * shape.getFormula("rotate");//returns "=Sheet1!B1"
  22688. */
  22689. getFormula(path: string): string;
  22690. /**
  22691. * remove a shape from groupShape.
  22692. * @param {GC.Spread.Sheets.Shapes.Shape} shape The shape which remove to groupShape.
  22693. * @returns {void}
  22694. */
  22695. remove(value?: GC.Spread.Sheets.Shapes.Shape): void;
  22696. /**
  22697. * Gets or sets the rotate of groupShape.
  22698. * @param {number|string} value The rotate of the groupShape.The unit of measurement is the angle.
  22699. * @return {number | void} If the parameter 'value' is null or undefined,it will return the rotate of the groupShape.
  22700. * @example
  22701. * var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 62 * 9, 0, 200, 200);
  22702. * var shape2 = sheet.shapes.add("myShape2", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 20, 20, 200, 200);
  22703. * var shape = sheet.shapes.group([shape1, shape2]);
  22704. * shape.rotate(60);
  22705. * var angle = shape.rotate();
  22706. */
  22707. rotate(value?: number | string): number | void;
  22708. /**
  22709. * Sets the formula string to the shape by the path.
  22710. * @param {string} path The path which can accept a formula string, it could be one of "x", "y", "width", "height", "rotate".
  22711. * @param {string} formula The formula string.
  22712. * @example
  22713. * sheet.name("Sheet1");
  22714. * sheet.setValue(0, 1, 30);
  22715. * var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 62 * 9, 0, 200, 200);
  22716. * var shape2 = sheet.shapes.add("myShape2", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 20, 20, 200, 200);
  22717. * var shape = sheet.shapes.group([shape1, shape2]);
  22718. * shape.setFormula("rotate", "=Sheet1!B1");
  22719. */
  22720. setFormula(path: string, formula: string): void;
  22721. /**
  22722. * Get or set the z-index for a shape in a groupShape.
  22723. * @param shapeName {string} The name of the shape.
  22724. * @param zIndex {number} The z-index for the shape. The zIndex should be between 0 to all shapes length(not contains). A shape with greater zIndex is always in front of a shape with a lower zIndex.
  22725. * @returns {number|void}
  22726. * @example
  22727. * //This is a sample shows how to use zIndex in groupShape.
  22728. * var shape1 = activeSheet.shapes.add("shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 50, 100, 150);
  22729. * var shape2 = activeSheet.shapes.add("shape2", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 150, 50, 100, 150);
  22730. * var style = shape1.style();
  22731. * style.fill.color = "red";
  22732. * shape1.style(style);
  22733. * var myGroup = activeSheet.shapes.group([shape1, shape2]);
  22734. * myGroup.zIndex("shape2"); // 1
  22735. * myGroup.zIndex("shape2", 0);
  22736. */
  22737. zIndex(shapeName: string, zIndex?: number): any;
  22738. }
  22739. export class Shape extends GC.Spread.Sheets.Shapes.ShapeBase{
  22740. /**
  22741. *
  22742. * @param {GC.Spread.Sheets.Worksheet} worksheet The host worksheet of the shape.
  22743. * @param {string} name The name of the shape. If leave blank an unique name will be generated.
  22744. * @param {GC.Spread.Sheets.Shapes.AutoShapeType | Object} autoShapeTypeOrModel The type of the shape (for one of the buildin types) or the model for custom shape.
  22745. * @param {number} left The <i>x</i> location of the shape.
  22746. * @param {number} top The <i>y</i> location of the shape.
  22747. * @param {number} width The width of the shape.
  22748. * @param {number} height The height of the shape.
  22749. */
  22750. constructor(worksheet: GC.Spread.Sheets.Worksheet, name: string, autoShapeTypeOrModel: GC.Spread.Sheets.Shapes.AutoShapeType | GC.Spread.Sheets.Shapes.IShapeModel, left?: number, top?: number, width?: number, height?: number);
  22751. /**
  22752. * Gets or sets the adjustment values of the shape.
  22753. * @param {Array.<number>} arrayValue The adjustment values in array.
  22754. * @return {Array.<number> | void} if no value is set, returns the current adjustment values of the shape.
  22755. * @example
  22756. * var blockArc = sheet.shapes.add("", GC.Spread.Sheets.Shapes.AutoShapeType.blockArc, 100, 60, 200, 160);
  22757. * var adjustments = blockArc.adjustments();
  22758. * console.log(adjustments);
  22759. * adjustments[0] = 150;
  22760. * adjustments[1] = 15;
  22761. * adjustments[2] = 0.35;
  22762. * blockArc.adjustments(adjustments);
  22763. * blockArc.isSelected(true);
  22764. */
  22765. adjustments(arrayValue?: number[]): number[] | void;
  22766. /**
  22767. * Gets the formula string from the shape by the path.
  22768. * @param {string} path The path which can accept a formula string, it could be one of "x", "y", "width", "height", "rotate", "text",
  22769. * "style.fill.color", "style.fill.transparency",
  22770. * "style.line.color", "style.line.lineStyle", "style.line.width", "style.line.capType", "style.line.joinType", "style.line.transparency",
  22771. * "style.textEffect.color", "style.textEffect.transparency", "style.textEffect.font",
  22772. * "style.textFrame.vAlign", "style.textFrame.hAlign".
  22773. * @returns {string} Returns the formula string from the shape by the path.
  22774. * @example
  22775. * sheet.name("Sheet1");
  22776. * sheet.setValue(0, 1, "This is a rectangle.");
  22777. * var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 100, 100, 200, 200);
  22778. * shape1.setFormula("text", "=Sheet1!B1");
  22779. * shape1.getFormula("text");//returns "=Sheet1!B1"
  22780. */
  22781. getFormula(path: string): string;
  22782. /**
  22783. * Gets or sets the rotated angle of the shape (unit in degree).
  22784. * @param {number | string} value The rotated angle of the shape (unit in degree) specified by a number or formula (starts with =) can get a number value.
  22785. * @returns {number | void} If no value is set, returns the rotated angle of the shape (unit in degree).
  22786. * @example
  22787. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  22788. * var n = heart.rotate();
  22789. * heart.rotate(n + 30);
  22790. */
  22791. rotate(value?: number | string): number | void;
  22792. /**
  22793. * Sets the formula string to the shape by the path.
  22794. * @param {string} path The path which can accept a formula string, it could be one of "x", "y", "width", "height", "rotate", "text",
  22795. * "style.fill.color", "style.fill.transparency",
  22796. * "style.line.color", "style.line.lineStyle", "style.line.width", "style.line.capType", "style.line.joinType", "style.line.transparency",
  22797. * "style.textEffect.color", "style.textEffect.transparency", "style.textEffect.font",
  22798. * "style.textFrame.vAlign", "style.textFrame.hAlign".
  22799. * @param {string} formula The formula string.
  22800. * @example
  22801. * sheet.name("Sheet1");
  22802. * sheet.setValue(0, 1, "This is a rectangle.");
  22803. * var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 100, 100, 200, 200);
  22804. * shape1.setFormula("text", "=Sheet1!B1");
  22805. */
  22806. setFormula(path: string, formula: string): void;
  22807. /**
  22808. * Gets or sets the style of the shape.
  22809. * @param {GC.Spread.Sheets.Shapes.ShapeStyle} value The shape style.
  22810. * @return {GC.Spread.Sheets.Shapes.ShapeStyle | void} If no value is set, returns the current style of the shape.
  22811. * @example
  22812. * //This sample sets style for the shape.
  22813. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  22814. * var oldStyle = heart.style();
  22815. * oldStyle.fill.color = "red";
  22816. * oldStyle.fill.transparency = 0.5;
  22817. * oldStyle.line.color = "green";
  22818. * oldStyle.line.lineStyle = GC.Spread.Sheets.Shapes.PresetLineDashStyle.dashDot;
  22819. * oldStyle.line.width = 5;
  22820. * oldStyle.line.capType = GC.Spread.Sheets.Shapes.LineCapStyle.square;
  22821. * oldStyle.line.joinType = GC.Spread.Sheets.Shapes.LineJoinStyle.miter;
  22822. * oldStyle.line.transparency = 0.5;
  22823. * oldStyle.textEffect.color = "yellow";
  22824. * oldStyle.textEffect.transparency = 0.5;
  22825. * oldStyle.textEffect.font = "20px Arial";
  22826. * oldStyle.textFrame.vAlign = GC.Spread.Sheets.VerticalAlign.center;
  22827. * oldStyle.textFrame.hAlign = GC.Spread.Sheets.HorizontalAlign.center;
  22828. * heart.style(oldStyle);
  22829. * heart.text("Heart");
  22830. */
  22831. style(value?: GC.Spread.Sheets.Shapes.ShapeStyle): any;
  22832. /**
  22833. * Gets or sets the text of the shape.
  22834. * @param {string} value The text of the shape specified by a string or formula (starts with =) can get a string.
  22835. * @returns {string | void} If no value is set, returns the text of the shape.
  22836. * @example
  22837. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  22838. * heart.text("My Shape");
  22839. * var s = heart.text();
  22840. */
  22841. text(value?: string): any;
  22842. /**
  22843. * Gets or sets the type of the shape.
  22844. * @param {GC.Spread.Sheets.Shapes.AutoShapeType} value The type of the shape.
  22845. * @returns {GC.Spread.Sheets.Shapes.AutoShapeType | void} If no value is set, returns the type of the shape.
  22846. * @example
  22847. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  22848. * var n = heart.type();
  22849. * heart.type(GC.Spread.Sheets.Shapes.AutoShapeType.cloud);
  22850. */
  22851. type(value?: GC.Spread.Sheets.Shapes.AutoShapeType): any;
  22852. }
  22853. export class ShapeBase{
  22854. /**
  22855. * Represents the base class for Shape, GroupShape and ConnectorShape.
  22856. * @class
  22857. */
  22858. constructor();
  22859. /**
  22860. * Gets or sets whether to disable moving the shape.
  22861. * @param {boolean} value The setting for whether to disable moving the shape.
  22862. * @returns {boolean | void} If no value is set, returns the setting for whether to disable moving the shape.
  22863. * @example
  22864. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  22865. * var state = heart.allowMove();
  22866. * heart.allowMove(!state);
  22867. */
  22868. allowMove(value?: boolean): any;
  22869. /**
  22870. * Gets or sets whether to disable resizing the shape.
  22871. * @param {boolean} value The setting for whether to disable resizing the shape.
  22872. * @returns {boolean | void} If no value is set, returns the setting for whether to disable resizing the shape.
  22873. * @example
  22874. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  22875. * var state = heart.allowResize();
  22876. * heart.allowResize(!state);
  22877. */
  22878. allowResize(value?: boolean): any;
  22879. /**
  22880. * Gets or sets whether this shape is printable.
  22881. * @param {boolean} value The value that indicates whether this shape is printable.
  22882. * @returns {boolean | void} If no value is set, returns whether this shape is printable.
  22883. * @example
  22884. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  22885. * var state = heart.canPrint();
  22886. * heart.canPrint(!state);
  22887. */
  22888. canPrint(value?: boolean): any;
  22889. /**
  22890. * Gets or sets whether the shape moves when hiding or showing, resizing, or moving rows or columns.
  22891. * @param {boolean} value The value indicates whether the shape moves when hiding or showing, resizing, or moving rows or columns.
  22892. * @returns {boolean | void} If no value is set, returns whether this shape dynamically moves.
  22893. * @example
  22894. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  22895. * var state = heart.dynamicMove();
  22896. * heart.dynamicMove(!state);
  22897. */
  22898. dynamicMove(value?: boolean): any;
  22899. /**
  22900. * Gets or sets whether the size of the shape changes when hiding or showing, resizing, or moving rows or columns.
  22901. * @param {boolean} value The value indicates whether the size of the shape changes when hiding or showing, resizing, or moving rows or columns.
  22902. * @returns {boolean | void} If no value is set, returns whether this shape dynamically changes size.
  22903. * @example
  22904. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  22905. * var state = heart.dynamicSize();
  22906. * heart.dynamicSize(!state);
  22907. */
  22908. dynamicSize(value?: boolean): any;
  22909. /**
  22910. * Gets or sets the end column index of the shape position.
  22911. * @param {number} value The end column index of the shape position.
  22912. * @returns {number | void} If no value is set, returns the end column index of the shape position.
  22913. * @example
  22914. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  22915. * var n = heart.endColumn();
  22916. * heart.endColumn(n + 1);
  22917. */
  22918. endColumn(value?: number): any;
  22919. /**
  22920. * Gets or sets the offset relative to the end column of the shape.
  22921. * @param {number} value The offset relative to the end column of the shape.
  22922. * @returns {number | void} If no value is set, returns the offset relative to the end column of the shape.
  22923. * @example
  22924. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  22925. * var n = heart.endColumnOffset();
  22926. * heart.endColumnOffset(0);
  22927. */
  22928. endColumnOffset(value?: number): any;
  22929. /**
  22930. * Gets or sets the end row index of the shape position.
  22931. * @param {number} value The end row index of the shape position.
  22932. * @returns {number | void} If no value is set, returns the end row index of the shape position.
  22933. * @example
  22934. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  22935. * var n = heart.endRow();
  22936. * heart.endRow(n + 2);
  22937. */
  22938. endRow(value?: number): any;
  22939. /**
  22940. * Gets or sets the offset relative to the end row of the shape.
  22941. * @param {number} value The offset relative to the end row of the shape.
  22942. * @returns {number | void} If no value is set, returns the offset relative to the end row of the shape.
  22943. * @example
  22944. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  22945. * var n = heart.endRowOffset();
  22946. * heart.endRowOffset(0);
  22947. */
  22948. endRowOffset(value?: number): any;
  22949. /**
  22950. * Gets the formula string from the shape by the path.
  22951. * @param {string} path The path which can accept a formula string, it could be one of "x", "y", "width", "height".
  22952. * @returns {string} Returns the formula string from the shape by the path.
  22953. * @example
  22954. * sheet.name("Sheet1");
  22955. * sheet.setValue(0, 1, 150);
  22956. * var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 100, 100, 200, 200);
  22957. * shape1.setFormula("x", "=Sheet1!B1");
  22958. * shape1.getFormula("x");//returns "=Sheet1!B1"
  22959. */
  22960. getFormula(path: string): string;
  22961. /**
  22962. * Gets or sets the height of the shape.
  22963. * @param {number | string} value The height of the shape specified by a number or formula (starts with =) can get a number value.
  22964. * @returns {number | void} If no value is set, returns the height of the shape.
  22965. * @example
  22966. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  22967. * var n = heart.height();
  22968. * heart.height(n + 50);
  22969. */
  22970. height(value?: number | string): any;
  22971. /**
  22972. * Gets or sets whether this shape is locked.
  22973. * @param {boolean} value The value that indicates whether this shape is locked.
  22974. * @returns {boolean | void} If no value is set, returns whether this shape is locked.
  22975. * @example
  22976. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  22977. * var state = heart.isLocked();
  22978. * heart.isLocked(!state);
  22979. */
  22980. isLocked(value?: boolean): any;
  22981. /**
  22982. * Gets or sets whether this shape is selected.
  22983. * @param {boolean} value The value that indicates whether this shape is selected.
  22984. * @returns {boolean | void} If no value is set, returns whether this shape is selected.
  22985. * @example
  22986. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  22987. * var state = heart.isSelected();
  22988. * heart.isSelected(!state);
  22989. */
  22990. isSelected(value?: boolean): any;
  22991. /**
  22992. * Gets or sets whether this shape is visible.
  22993. * @param {boolean} value The value that indicates whether this shape is visible.
  22994. * @returns {boolean | void} If no value is set, returns whether this shape is visible.
  22995. * @example
  22996. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  22997. * var state = heart.isVisible();
  22998. * heart.isVisible(!state);
  22999. */
  23000. isVisible(value?: boolean): any;
  23001. /**
  23002. * Gets or sets the name of the shape.
  23003. * @param {string} value The name of the shape.
  23004. * @returns {string | void} If no value is set, returns the name of the shape.
  23005. * @example
  23006. * var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 62 * 9, 0, 200, 200);
  23007. * var shape2 = sheet.shapes.add("myShape2", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 20, 20, 200, 200);
  23008. * var shape = sheet.shapes.group([shape1, shape2]);
  23009. * shape.name("myGroupShape");
  23010. * var shapeName = shape.name();
  23011. */
  23012. name(value?: string): any;
  23013. /**
  23014. * Sets the formula string to the shape by the path.
  23015. * @param {string} path The path which can accept a formula string, it could be one of "x", "y", "width", "height".
  23016. * @param {string} formula The formula string.
  23017. * @example
  23018. * sheet.name("Sheet1");
  23019. * sheet.setValue(0, 1, 150);
  23020. * var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 100, 100, 200, 200);
  23021. * shape1.setFormula("x", "=Sheet1!B1");
  23022. */
  23023. setFormula(path: string, formula: string): void;
  23024. /**
  23025. * Gets or sets the starting column index of the shape position.
  23026. * @param {number} value The starting column index of the shape position.
  23027. * @returns {number | void} If no value is set, returns the starting column index of the shape position.
  23028. * @example
  23029. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  23030. * var n = heart.startColumn();
  23031. * heart.startColumn(n + 2);
  23032. */
  23033. startColumn(value?: number): any;
  23034. /**
  23035. * Gets or sets the offset relative to the start column of the shape.
  23036. * @param {number} value The offset relative to the start column of the shape.
  23037. * @returns {number | void} If no value is set, returns the offset relative to the start column of the shape.
  23038. * @example
  23039. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  23040. * var n = heart.startColumnOffset();
  23041. * heart.startColumnOffset(0);
  23042. */
  23043. startColumnOffset(value?: number): any;
  23044. /**
  23045. * Gets or sets the starting row index of the shape position.
  23046. * @param {number} value The starting row index of the shape position.
  23047. * @returns {number | void} If no value is set, returns the starting row index of the shape.
  23048. * @example
  23049. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  23050. * var n = heart.startRow();
  23051. * heart.startRow(n + 2);
  23052. */
  23053. startRow(value?: number): any;
  23054. /**
  23055. * Gets or sets the offset relative to the start row of the shape.
  23056. * @param {number} value The offset relative to the start row of the shape.
  23057. * @returns {number | void} If no value is set, returns the offset relative to the start row of the shape.
  23058. * @example
  23059. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  23060. * var n = heart.startRowOffset();
  23061. * heart.startRowOffset(0);
  23062. */
  23063. startRowOffset(value?: number): any;
  23064. /**
  23065. * Gets or sets the width of the shape.
  23066. * @param {number | string} value The width of the shape specified by a number or formula (starts with =) can get a number value.
  23067. * @returns {number | void} If no value is set, returns the width of the shape.
  23068. * @example
  23069. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  23070. * var n = heart.width();
  23071. * heart.width(n + 50);
  23072. */
  23073. width(value?: number | string): any;
  23074. /**
  23075. * Gets or sets the horizontal location of the shape.
  23076. * @param {number | string} value The horizontal location of the shape specified by a number or formula (starts with =) can get a number value.
  23077. * @return {number | void} If no value is set, returns the horizontal location of the shape.
  23078. * @example
  23079. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  23080. * var n = heart.x();
  23081. * heart.x(n + 50);
  23082. */
  23083. x(value?: number | string): number | void;
  23084. /**
  23085. * Gets or sets the vertical location of the shape.
  23086. * @param {number | string} value The vertical location of the shape specified by a number or formula (starts with =) can get a number value.
  23087. * @return {number | void} If no value is set, returns the vertical location of the shape.
  23088. * @example
  23089. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  23090. * var n = heart.y();
  23091. * heart.y(n + 50);
  23092. */
  23093. y(value?: number | string): any;
  23094. }
  23095. export class ShapeCollection{
  23096. /**
  23097. * Represents a shape manager that managers all shapes in a sheet.
  23098. * @class
  23099. * @param {GC.Spread.Sheets.Worksheet} sheet The worksheet.
  23100. */
  23101. constructor(sheet: GC.Spread.Sheets.Worksheet);
  23102. /**
  23103. * Add a new shape to shape collection
  23104. * @param {string} name The name of the shape. If leave blank an unique name will be generated.
  23105. * @param {GC.Spread.Sheets.Shapes.AutoShapeType | Object} autoShapeTypeOrModel The type of the shape (for one of the buildin types) or the model for custom shape.
  23106. * @param {number} left The <i>x</i> location of the shape.
  23107. * @param {number} top The <i>y</i> location of the shape.
  23108. * @param {number} width The width of the shape.
  23109. * @param {number} height The height of the shape.
  23110. * @return {GC.Spread.Sheets.Shapes.Shape} The shape that has been added to the sheet.
  23111. * @example
  23112. * // This example shows how to add a new shape
  23113. * var shape = activeSheet.shapes.add("shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 50, 100, 150);
  23114. */
  23115. add(name: string, autoShapeTypeOrModel: GC.Spread.Sheets.Shapes.AutoShapeType | GC.Spread.Sheets.Shapes.IShapeModel, left?: number, top?: number, width?: number, height?: number): GC.Spread.Sheets.Shapes.Shape;
  23116. /**
  23117. * Add a Connector Shape to shape collection
  23118. * @param {string} name The name of the shape. If leave blank an unique name will be generated.
  23119. * @param {GC.Spread.Sheets.Shapes.ConnectorType} connectorType The type of the connector.
  23120. * @param {number} beginX The <i>x</i> location of the start point for the connector shape.
  23121. * @param {number} beginY The <i>y</i> location of the start point for the connector shape.
  23122. * @param {number} endX The <i>x</i> location of the end point for the connector shape.
  23123. * @param {number} endY The <i>y</i> location of the end point for the connector shape.
  23124. * @return {GC.Spread.Sheets.Shapes.ConnectorShape} The connector shape that has been added to the sheet.
  23125. * @example
  23126. * //This example shows how to add a connector shape
  23127. * var shape1 = activeSheet.shapes.addConnector("shape1", GC.Spread.Sheets.Shapes.ConnectorType.elbow, 200, 50, 300, 200);
  23128. */
  23129. addConnector(name: string, connectorType: GC.Spread.Sheets.Shapes.ConnectorType, beginX?: number, beginY?: number, endX?: number, endY?: number): GC.Spread.Sheets.Shapes.ConnectorShape;
  23130. /**
  23131. * get all shapes
  23132. * @returns {Array.<GC.Spread.Sheets.Shapes.Shape>} all shapes
  23133. * @example
  23134. * // This sample shows how to get all shapes in shape collection
  23135. * activeSheet.shapes.add("shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 50, 100, 150);
  23136. * activeSheet.shapes.addConnector("shape2", GC.Spread.Sheets.Shapes.ConnectorType.elbow, 200, 50, 300, 200);
  23137. * var shapes = activeSheet.shapes.all();
  23138. */
  23139. all(): GC.Spread.Sheets.Shapes.Shape[];
  23140. /**
  23141. * clear all shapes
  23142. * @example
  23143. * //This example shows how to clear all shapes in shape collection
  23144. * activeSheet.shapes.add("shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 50, 100, 150);
  23145. * activeSheet.shapes.addConnector("shape2", GC.Spread.Sheets.Shapes.ConnectorType.elbow, 200, 50, 300, 200);
  23146. * activeSheet.shapes.clear();
  23147. */
  23148. clear(): void;
  23149. /**
  23150. * Get a shape with name
  23151. * @param {string} name The name of the shape.
  23152. * @returns {GC.Spread.Sheets.Shapes.Shape} The Shape
  23153. * @example
  23154. * //This example shows how to get a shape with name.
  23155. * activeSheet.shapes.add("shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 50, 100, 150);
  23156. * activeSheet.shapes.get("shape1");
  23157. */
  23158. get(name: string): GC.Spread.Sheets.Shapes.Shape;
  23159. /**
  23160. * Groups the Shapes.
  23161. * @param {Array.<GC.Spread.Sheets.Shapes.Shape>} shapes The shapes to group.
  23162. * @returns {GC.Spread.Sheets.Shapes.Shape} The Shape group.
  23163. * @example
  23164. * //This sample shows how to group some shapes
  23165. * var shape1 = activeSheet.shapes.add("shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 50, 100, 150);
  23166. * var shape2 = activeSheet.shapes.addConnector("shape2", GC.Spread.Sheets.Shapes.ConnectorType.elbow, 200, 50, 300, 200);
  23167. * var shapes = [shape1, shape2];
  23168. * var groupShape = activeSheet.shapes.group(shapes)
  23169. */
  23170. group(shapes: GC.Spread.Sheets.Shapes.Shape[]): GC.Spread.Sheets.Shapes.GroupShape;
  23171. /**
  23172. * remove a shape
  23173. * @param {string} name The name of the shape.
  23174. * @example
  23175. * //This example shows how to remove a shape
  23176. * activeSheet.shapes.add("shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 50, 100, 150);
  23177. * activeSheet.shapes.remove("shape1");
  23178. */
  23179. remove(name: string): void;
  23180. /**
  23181. * Separate a groupShape to some shapes
  23182. * @param {GC.Spread.Sheets.Shapes.GroupShape} groupShape The groupShape to separate.
  23183. * @example
  23184. * //This sample shows how to separate a groupShape to some shapes
  23185. * var shape1 = activeSheet.shapes.add("shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 50, 100, 150);
  23186. * var shape2 = activeSheet.shapes.addConnector("shape2", GC.Spread.Sheets.Shapes.ConnectorType.elbow, 200, 50, 300, 200);
  23187. * var shapes = [shape1, shape2];
  23188. * var groupShape = activeSheet.shapes.group(shapes);
  23189. * activeSheet.shapes.ungroup(groupShape);
  23190. */
  23191. ungroup(groupShape: GC.Spread.Sheets.Shapes.GroupShape): void;
  23192. /**
  23193. * Get or set the z-index for a shape
  23194. * @param shapeName {string} The name of the shape
  23195. * @param zIndex {number} The z-index for the shape. The zIndex should be between 0 to all shapes length(not contains). A shape with greater zIndex is always in front of a shape with a lower zIndex.
  23196. * @example
  23197. * //This is a sample shows how to use zIndex.
  23198. * var shape1 = activeSheet.shapes.add("shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 50, 100, 150);
  23199. * var style = shape1.style();
  23200. * style.fill.color = "red";
  23201. * shape1.style(style);
  23202. * var shape2 = activeSheet.shapes.addConnector("shape2", GC.Spread.Sheets.Shapes.ConnectorType.elbow, 100, 50, 200, 200);
  23203. * activeSheet.shapes.zIndex("shape2"); // 1
  23204. * activeSheet.shapes.zIndex("shape2", 0);
  23205. */
  23206. zIndex(shapeName: string, zIndex: number): number;
  23207. }
  23208. export class ShapeStyle{
  23209. /**
  23210. * Represents a shape style.
  23211. * @param {Object} style The style is an object that has same structure with a ShapeStyle instance, it is optional.
  23212. * @class
  23213. */
  23214. constructor(style?: Object);
  23215. /**
  23216. * Indicates the fill options.
  23217. * @property {string} [color] - The background color, it is a color string or formula(starts with =).
  23218. * @property {number | string} [transparency] - The background color transparency, it is a number that is between 0 and 1 or formula(starts with =).
  23219. * @type {Object}
  23220. * @example
  23221. * //This sample sets background color and background color transparency for the shape.
  23222. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  23223. * var oldStyle = heart.style();
  23224. * oldStyle.fill.color = "red";
  23225. * oldStyle.fill.transparency = 0.5;
  23226. * heart.style(oldStyle);
  23227. *
  23228. * //This sample sets background color and background color transparency with formula for the shape.
  23229. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  23230. * sheet.setValue(0, 1, "red");
  23231. * sheet.setValue(1, 1, 0.5);
  23232. * var oldStyle = heart.style();
  23233. * oldStyle.fill.color = "=Sheet1!B1";
  23234. * oldStyle.fill.transparency = "=Sheet1!B2";
  23235. * heart.style(oldStyle);
  23236. */
  23237. fill: GC.Spread.Sheets.Shapes.IShapeFill;
  23238. /**
  23239. * Indicates the line options.
  23240. * @property {string} [color] - The line color, it is a color string or formula(starts with =).
  23241. * @property {GC.Spread.Sheets.Shapes.PresetLineDashStyle | string} [lineStyle] - The line style, it is PresetLineDashStyle enum or formula(starts with =).
  23242. * @property {number | string} [width] - The line width, it is a number or formula(starts with =).
  23243. * @property {GC.Spread.Sheets.Shapes.LineCapStyle | string} [capType] - The line cap type, it is LineCapStyle enum or formula(starts with =).
  23244. * @property {GC.Spread.Sheets.Shapes.LineJoinStyle | string} [joinType] - The line join type, it is LineJoinStyle enum or formula(starts with =).
  23245. * @property {number | string} [transparency] - The line color transparency, it is a number that is between 0 and 1 or formula(starts with =).
  23246. * @property {GC.Spread.Sheets.Shapes.ArrowheadStyle} [beginArrowheadStyle] - The begin arrowhead style, it is ArrowheadStyle enum.
  23247. * @property {GC.Spread.Sheets.Shapes.ArrowheadWidth} [beginArrowheadWidth] - The begin arrowhead width, it is ArrowheadWidth enum.
  23248. * @property {GC.Spread.Sheets.Shapes.ArrowheadLength} [beginArrowheadLength] - The begin arrowhead length, it is ArrowheadLength enum.
  23249. * @property {GC.Spread.Sheets.Shapes.ArrowheadStyle} [endArrowheadStyle] - The end arrowhead style, it is ArrowheadStyle enum.
  23250. * @property {GC.Spread.Sheets.Shapes.ArrowheadWidth} [endArrowheadWidth] - The end arrowhead width, it is ArrowheadWidth enum.
  23251. * @property {GC.Spread.Sheets.Shapes.ArrowheadLength} [endArrowheadLength] - The end arrowhead length, it is ArrowheadLength enum.
  23252. * @type {Object}
  23253. * @example
  23254. * //This sample sets line color, line style, line width, cap type, join type and line color transparency for the shape.
  23255. * var shape = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  23256. * //var shape = sheet.shapes.addConnector("Shape1", GC.Spread.Sheets.Shapes.ConnectorType.straight, 100, 60, 200, 160);
  23257. * var oldStyle = shape.style();
  23258. * oldStyle.line.color = "red";
  23259. * oldStyle.line.lineStyle = GC.Spread.Sheets.Shapes.PresetLineDashStyle.dashDot;
  23260. * oldStyle.line.width = 5;
  23261. * oldStyle.line.capType = GC.Spread.Sheets.Shapes.LineCapStyle.square;
  23262. * oldStyle.line.joinType = GC.Spread.Sheets.Shapes.LineJoinStyle.miter;
  23263. * oldStyle.line.transparency = 0.5;
  23264. * shape.style(oldStyle);
  23265. *
  23266. * //This sample sets line color, line style, line width, cap type, join type and line color transparency with formula for the shape.
  23267. * var shape = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  23268. * //var shape = sheet.shapes.addConnector("Shape1", GC.Spread.Sheets.Shapes.ConnectorType.straight, 100, 60, 200, 160);
  23269. * sheet.setValue(0, 1, "red");
  23270. * sheet.setValue(1, 1, 4);
  23271. * sheet.setValue(2, 1, 5);
  23272. * sheet.setValue(3, 1, 1);
  23273. * sheet.setValue(4, 1, 1);
  23274. * sheet.setValue(5, 1, 0.5);
  23275. * var oldStyle = shape.style();
  23276. * oldStyle.line.color = "=Sheet1!B1";
  23277. * oldStyle.line.lineStyle = "=Sheet1!B2";
  23278. * oldStyle.line.width = "=Sheet1!B3";
  23279. * oldStyle.line.capType = "=Sheet1!B4";
  23280. * oldStyle.line.joinType = "=Sheet1!B5";
  23281. * oldStyle.line.transparency = "=Sheet1!B6";
  23282. * shape.style(oldStyle);
  23283. *
  23284. * //This sample sets line's begin arrowhead style, width, length and end arrowhead style, width, height for the shape.
  23285. * var shape = sheet.shapes.addConnector("Shape1", GC.Spread.Sheets.Shapes.ConnectorType.straight, 100, 60, 200, 160);
  23286. * var oldStyle = shape.style();
  23287. * oldStyle.line.beginArrowheadStyle = GC.Spread.Sheets.Shapes.ArrowheadStyle.triangle;
  23288. * oldStyle.line.beginArrowheadWidth = GC.Spread.Sheets.Shapes.ArrowheadWidth.narrow;
  23289. * oldStyle.line.beginArrowheadLength = GC.Spread.Sheets.Shapes.ArrowheadLength.short;
  23290. * oldStyle.line.endArrowheadStyle = GC.Spread.Sheets.Shapes.ArrowheadStyle.diamond;
  23291. * oldStyle.line.endArrowheadWidth = GC.Spread.Sheets.Shapes.ArrowheadWidth.wide;
  23292. * oldStyle.line.endArrowheadLength = GC.Spread.Sheets.Shapes.ArrowheadLength.long;
  23293. * shape.style(oldStyle);
  23294. */
  23295. line: GC.Spread.Sheets.Shapes.IShapeLine;
  23296. /**
  23297. * Indicates the text effect options.
  23298. * @property {string} [color] - The font color, it is a color string or formula(starts with =).
  23299. * @property {number | string} [transparency] - The font color transparency, it is a number that is between 0 and 1 or formula(starts with =).
  23300. * @property {string} [font] - The font, it is a font string or formula(starts with =).
  23301. * @type {Object}
  23302. * @example
  23303. * //This sample sets the font color, font color transparency and font for the shape.
  23304. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  23305. * var oldStyle = heart.style();
  23306. * oldStyle.textEffect.color = "red";
  23307. * oldStyle.textEffect.transparency = 0.5;
  23308. * oldStyle.textEffect.font = "20px Arial";
  23309. * heart.style(oldStyle);
  23310. * heart.text("Heart");
  23311. *
  23312. * //This sample sets the font color, font color transparency and font with formula for the shape.
  23313. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  23314. * sheet.setValue(0, 1, "red");
  23315. * sheet.setValue(1, 1, 0.5);
  23316. * sheet.setValue(2, 1, "20px Arial");
  23317. * var oldStyle = heart.style();
  23318. * oldStyle.textEffect.color = "=Sheet1!B1";
  23319. * oldStyle.textEffect.transparency = "=Sheet1!B2";
  23320. * oldStyle.textEffect.font = "=Sheet1!B3";
  23321. * heart.style(oldStyle);
  23322. * heart.text("Heart");
  23323. */
  23324. textEffect: GC.Spread.Sheets.Shapes.IShapeTextEffect;
  23325. /**
  23326. * Indicates the text frame options.
  23327. * @property {GC.Spread.Sheets.VerticalAlign | string} [vAlign] - The text vertical alignment, it is VerticalAlign enum or formula(starts with =).
  23328. * @property {GC.Spread.Sheets.HorizontalAlign | string} [hAlign] - The text horizontal alignment, it is HorizontalAlign enum or formula(starts with =).
  23329. * @type {Object}
  23330. * @example
  23331. * //This sample sets the text horizontal alignment and vertical alignment for the shape.
  23332. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  23333. * var oldStyle = heart.style();
  23334. * oldStyle.textFrame.vAlign = GC.Spread.Sheets.VerticalAlign.center;
  23335. * oldStyle.textFrame.hAlign = GC.Spread.Sheets.HorizontalAlign.center;
  23336. * heart.style(oldStyle);
  23337. * heart.text("Heart");
  23338. *
  23339. * //This sample sets the text horizontal alignment and vertical alignment with formula for the shape.
  23340. * var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
  23341. * sheet.setValue(0, 1, 1);
  23342. * sheet.setValue(1, 1, 1);
  23343. * var oldStyle = heart.style();
  23344. * oldStyle.textFrame.vAlign = "=Sheet1!B1";
  23345. * oldStyle.textFrame.hAlign = "=Sheet1!B2";
  23346. * heart.style(oldStyle);
  23347. * heart.text("Heart");
  23348. */
  23349. textFrame: GC.Spread.Sheets.Shapes.IShapeTextFrame;
  23350. }
  23351. }
  23352. module Slicers{
  23353. export class ItemSlicer{
  23354. /**
  23355. * Represents an item slicer.
  23356. * @param {string} name The name of the item slicer.
  23357. * @param {GC.Spread.Slicers.GeneralSlicerData} slicerData An instance of the GeneralSlicerData or TableSlicerData.
  23358. * @param {string} columnName The column name that relates to the item slicer.
  23359. * @class GC.Spread.Sheets.Slicers.ItemSlicer
  23360. * @example
  23361. * //This example creates an item slicer.
  23362. * //create table
  23363. * var dataSource = [
  23364. * { Name: "Bob", City: "NewYork", Birthday: "1968/6/8" },
  23365. * { Name: "Betty", City: "NewYork", Birthday: "1972/7/3" },
  23366. * { Name: "Alice", City: "Washington", Birthday: "2012/2/15" },
  23367. * ];
  23368. * var table = activeSheet.tables.addFromDataSource("table1", 1, 1, dataSource);
  23369. * var slicerData = new GC.Spread.Sheets.Slicers.TableSlicerData(table)
  23370. * //Set slicer data to item slicer.
  23371. * var slicer = new GC.Spread.Sheets.Slicers.ItemSlicer("slicer", slicerData, "Name");
  23372. * //Add the item slicer to the dom tree.
  23373. * //The "slicerHost" is the div you want to add the slicer's dom to.
  23374. * $("#slicerHost").append(slicer.getDOMElement());
  23375. */
  23376. constructor(name: string, slicerData: GC.Spread.Slicers.GeneralSlicerData, columnName: string);
  23377. /**
  23378. * Gets or sets the caption name of the item slicer.
  23379. * @param {string} [value] The caption name of the item slicer.
  23380. * @returns {string | GC.Spread.Sheets.Slicers.ItemSlicer} If no value is set, returns the caption name of the item slicer; otherwise, returns the item slicer.
  23381. */
  23382. captionName(value?: string): any;
  23383. /**
  23384. * Gets or sets the column count of the item slicer.
  23385. * @param {number} [value] The column count of the item slicer.
  23386. * @returns {number | GC.Spread.Sheets.Slicers.ItemSlicer} If no value is set, returns the column count of the item slicer; otherwise, returns the item slicer.
  23387. */
  23388. columnCount(value?: number): any;
  23389. /**
  23390. * Gets the dom element of the item slicer.
  23391. * @returns {HTMLElement} The dom element of the item slicer.
  23392. */
  23393. getDOMElement(): HTMLElement;
  23394. /**
  23395. * Gets or sets the height of the item slicer.
  23396. * @param {number} [value] The height of the item slicer.
  23397. * @returns {number | GC.Spread.Sheets.Slicers.ItemSlicer} If no value is set, returns the height of the item slicer; otherwise, returns the item slicer.
  23398. */
  23399. height(value?: number): any;
  23400. /**
  23401. * Gets or sets the item height of the item slicer.
  23402. * @param {number} [value] The item height of the item slicer.
  23403. * @returns {number | GC.Spread.Sheets.Slicers.ItemSlicer} If no value is set, returns the item height of the item slicer; otherwise, returns the item slicer.
  23404. */
  23405. itemHeight(value?: number): any;
  23406. /**
  23407. * Gets or sets the name of the item slicer.
  23408. * @param {string} [value] The name of the item slicer.
  23409. * @returns {string | GC.Spread.Sheets.Slicers.ItemSlicer} If no value is set, returns the name of the item slicer; otherwise, returns the item slicer.
  23410. */
  23411. name(value?: string): any;
  23412. /**
  23413. * Gets or sets whether to show the header of the item slicer.
  23414. * @param {boolean} [value] The show header setting of the item slicer.
  23415. * @returns {boolean | GC.Spread.Sheets.Slicers.ItemSlicer} If no value is set, returns whether to show the header of the item slicer; otherwise, returns the item slicer.
  23416. */
  23417. showHeader(value?: boolean): any;
  23418. /**
  23419. * Gets or sets whether to show the no data items of the item slicer.
  23420. * @param {boolean} [value] The show no data items setting of the slicer.
  23421. * @returns {boolean | GC.Spread.Sheets.Slicers.ItemSlicer} If no value is set, returns whether to show the no data items of the item slicer; otherwise, returns the item slicer.
  23422. */
  23423. showNoDataItems(value?: boolean): any;
  23424. /**
  23425. * Gets or sets whether to show the no data items last.
  23426. * @param {boolean} [value] The show no data items in last setting of the slicer.
  23427. * @returns {boolean | GC.Spread.Sheets.Slicers.ItemSlicer} If no value is set, returns whether to show the no data items last; otherwise, returns the item slicer.
  23428. */
  23429. showNoDataItemsInLast(value?: boolean): any;
  23430. /**
  23431. * Gets or sets the sort state of the item slicer.
  23432. * @param {GC.Spread.Sheets.SortState} [value] The sort state of the item slicer.
  23433. * @returns {GC.Spread.Sheets.SortState | GC.Spread.Sheets.Slicers.ItemSlicer} If no value is set, returns the sort state of the item slicer; otherwise, returns the item slicer.
  23434. */
  23435. sortState(value?: GC.Spread.Sheets.SortState): any;
  23436. /**
  23437. * Gets or sets the style of the item slicer.
  23438. * @param {Object} value The style of the item slicer.
  23439. * @returns {Object | GC.Spread.Sheets.Slicers.ItemSlicer} If no value is set, returns The style of the item slicer; otherwise, returns the item slicer.
  23440. * @example
  23441. * The style is json data, its json schema is as follows:
  23442. * {
  23443. * "$schema" : "http://json-schema.org/draft-04/schema#",
  23444. * "title" : "style",
  23445. * "type" : "object",
  23446. * "properties" : {
  23447. * "wholeSlicerStyle" : {
  23448. * "$ref" : "#/definitions/StyleInfo"
  23449. * },
  23450. * "headerStyle" : {
  23451. * "$ref" : "#/definitions/StyleInfo"
  23452. * },
  23453. * "selectedItemWithDataStyle" : {
  23454. * "$ref" : "#/definitions/StyleInfo"
  23455. * },
  23456. * "selectedItemWithNoDataStyle" : {
  23457. * "$ref" : "#/definitions/StyleInfo"
  23458. * },
  23459. * "unSelectedItemWithDataStyle" : {
  23460. * "$ref" : "#/definitions/StyleInfo"
  23461. * },
  23462. * "unSelectedItemWithNoDataStyle" : {
  23463. * "$ref" : "#/definitions/StyleInfo"
  23464. * },
  23465. * "hoveredSelectedItemWithDataStyle" : {
  23466. * "$ref" : "#/definitions/StyleInfo"
  23467. * },
  23468. * "hoveredSelectedItemWithNoDataStyle" : {
  23469. * "$ref" : "#/definitions/StyleInfo"
  23470. * },
  23471. * "hoveredUnSelectedItemWithDataStyle" : {
  23472. * "$ref" : "#/definitions/StyleInfo"
  23473. * },
  23474. * "hoveredUnSelectedItemWithNoDataStyle" : {
  23475. * "$ref" : "#/definitions/StyleInfo"
  23476. * }
  23477. * },
  23478. * "definitions" : {
  23479. * "StyleInfo" : {
  23480. * "type" : "object",
  23481. * "properties" : {
  23482. * "backColor" : {
  23483. * "type" : "string"
  23484. * },
  23485. * "foreColor" : {
  23486. * "type" : "string"
  23487. * },
  23488. * "font" : {
  23489. * "type" : "string"
  23490. * },
  23491. * "borderLeft" : {
  23492. * "$ref" : "#/definitions/SlicerBorder"
  23493. * },
  23494. * "borderTop" : {
  23495. * "$ref" : "#/definitions/SlicerBorder"
  23496. * },
  23497. * "borderRight" : {
  23498. * "$ref" : "#/definitions/SlicerBorder"
  23499. * },
  23500. * "borderBottom" : {
  23501. * "$ref" : "#/definitions/SlicerBorder"
  23502. * },
  23503. * "textDecoration":{
  23504. * "type" : "string"
  23505. * }
  23506. * }
  23507. * },
  23508. * "SlicerBorder":{
  23509. * "type":"object",
  23510. * "properties":{
  23511. * "borderWidth":{
  23512. * "type":"number"
  23513. * },
  23514. * "borderStyle":{
  23515. * "type":"string"
  23516. * },
  23517. * "borderColor":{
  23518. * "type":"string"
  23519. * }
  23520. * }
  23521. * }
  23522. * }
  23523. * }
  23524. */
  23525. style(value?: any): any;
  23526. /**
  23527. * Gets or sets whether to visually distinguish the items with no data.
  23528. * @param {boolean} [value] The setting for items with no data.
  23529. * @returns {boolean | GC.Spread.Sheets.Slicers.ItemSlicer} If no value is set, returns whether to visually distinguish the items with no data; otherwise, returns the item slicer.
  23530. */
  23531. visuallyNoDataItems(value?: boolean): any;
  23532. /**
  23533. * Gets or sets the width of the item slicer.
  23534. * @param {number} [value] The width of the item slicer.
  23535. * @returns {number | GC.Spread.Sheets.Slicers.ItemSlicer} If no value is set, returns the width of the item slicer; otherwise, returns the item slicer.
  23536. */
  23537. width(value?: number): any;
  23538. }
  23539. export class Slicer extends GC.Spread.Sheets.FloatingObjects.FloatingObject{
  23540. /**
  23541. * Represents a slicer.
  23542. * @class GC.Spread.Sheets.Slicer
  23543. * @param {string} name The slicer name.
  23544. * @param {GC.Spread.Sheets.Tables.Table} table The table that relates to the slicer.
  23545. * @param {string} columnName The name of the table's column.
  23546. */
  23547. constructor(name: string, table: GC.Spread.Sheets.Tables.Table, columnName: string);
  23548. /**
  23549. * Gets or sets the caption name of the slicer.
  23550. * @param {string} [value] The caption name of the slicer.
  23551. * @returns {string | GC.Spread.Sheets.Slicers.Slicer} If no value is set, returns the caption name of the slicer; otherwise, returns the slicer.
  23552. * @example
  23553. * //This example uses the captionName method.
  23554. * //create a table
  23555. * datas = [
  23556. * ["1", "NewYork", "1968/6/8", "80", "180"],
  23557. * ["4", "NewYork", "1972/7/3", "72", "168"],
  23558. * ["4", "NewYork", "1964/3/2", "71", "179"],
  23559. * ["5", "Washington", "1972/8/8","80", "171"],
  23560. * ["6", "Washington", "1986/2/2", "89", "161"],
  23561. * ["7", "Washington", "2012/2/15", "71", "240"]];
  23562. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  23563. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  23564. * table.setColumnName(0, dataColumns[0]);
  23565. * table.setColumnName(1, dataColumns[1]);
  23566. * table.setColumnName(2, dataColumns[2]);
  23567. * table.setColumnName(3, dataColumns[3]);
  23568. * table.setColumnName(4, dataColumns[4]);
  23569. * //slicer style
  23570. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light4();
  23571. * //add a slicer to the sheet and return the slicer instance.
  23572. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
  23573. * //change the slicer properties.
  23574. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  23575. * slicer.captionName("S1");
  23576. * slicer.style(style1);
  23577. */
  23578. captionName(value?: string): any;
  23579. /**
  23580. * Gets or sets the column count for the slicer.
  23581. * @param {number} [value] The column count of the slicer.
  23582. * @returns {number | GC.Spread.Sheets.Slicers.Slicer} If no value is set, returns the column count for the slicer; otherwise, returns the slicer.
  23583. */
  23584. columnCount(value?: number): any;
  23585. /**
  23586. * Gets or sets whether to disable resizing and moving the slicer.
  23587. * @param {boolean} [value] The setting for whether to disable resizing and moving the slicer.
  23588. * @returns {boolean | GC.Spread.Sheets.Slicers.Slicer} If no value is set, returns whether to disable resizing and moving the slicer; otherwise, returns the slicer.
  23589. * @example
  23590. * //This example prevents moving or resizing the slicer.
  23591. * //create a table
  23592. * datas = [
  23593. * ["1", "NewYork", "1968/6/8", "80", "180"],
  23594. * ["4", "NewYork", "1972/7/3", "72", "168"],
  23595. * ["4", "NewYork", "1964/3/2", "71", "179"],
  23596. * ["5", "Washington", "1972/8/8","80", "171"],
  23597. * ["6", "Washington", "1986/2/2", "89", "161"],
  23598. * ["7", "Washington", "2012/2/15", "71", "240"]];
  23599. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  23600. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  23601. * table.setColumnName(0, dataColumns[0]);
  23602. * table.setColumnName(1, dataColumns[1]);
  23603. * table.setColumnName(2, dataColumns[2]);
  23604. * table.setColumnName(3, dataColumns[3]);
  23605. * table.setColumnName(4, dataColumns[4]);
  23606. * //slicer style
  23607. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light4();
  23608. * //add a slicer to the sheet and return the slicer instance.
  23609. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Height");
  23610. * //change the slicer properties.
  23611. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  23612. * slicer.disableResizingAndMoving(true);
  23613. * slicer.style(style1);
  23614. */
  23615. disableResizingAndMoving(value?: boolean): any;
  23616. /**
  23617. * Gets or sets the item height for the slicer.
  23618. * @param {number} [value] The item height of the slicer.
  23619. * @returns {number | GC.Spread.Sheets.Slicers.Slicer} If no value is set, returns the item height for the slicer; otherwise, returns the slicer.
  23620. */
  23621. itemHeight(value?: number): any;
  23622. /**
  23623. * Gets or sets the name of the slicer.
  23624. * @param {string} [value] The name of the slicer.
  23625. * @returns {string | GC.Spread.Sheets.Slicers.Slicer} If no value is set, returns the name of the slicer; otherwise, returns the slicer.
  23626. */
  23627. name(value?: string): any;
  23628. /**
  23629. * Gets or sets whether to show the slicer header.
  23630. * @param {boolean} [value] The show header setting of the slicer.
  23631. * @returns {boolean | GC.Spread.Sheets.Slicers.Slicer} If no value is set, returns whether to show the slicer header; otherwise, returns the slicer.
  23632. * @example
  23633. * //This example hides the slicer header.
  23634. * //create a table
  23635. * datas = [
  23636. * ["1", "NewYork", "1968/6/8", "80", "180"],
  23637. * ["4", "NewYork", "1972/7/3", "72", "168"],
  23638. * ["4", "NewYork", "1964/3/2", "71", "179"],
  23639. * ["5", "Washington", "1972/8/8","80", "171"],
  23640. * ["6", "Washington", "1986/2/2", "89", "161"],
  23641. * ["7", "Washington", "2012/2/15", "71", "240"]];
  23642. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  23643. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  23644. * table.setColumnName(0, dataColumns[0]);
  23645. * table.setColumnName(1, dataColumns[1]);
  23646. * table.setColumnName(2, dataColumns[2]);
  23647. * table.setColumnName(3, dataColumns[3]);
  23648. * table.setColumnName(4, dataColumns[4]);
  23649. * //slicer style
  23650. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light4();
  23651. * //add a slicer to the sheet and return the slicer instance.
  23652. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Height");
  23653. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  23654. * slicer.showHeader(false);
  23655. * slicer.style(style1);
  23656. * //add the slicer to the sheet
  23657. * activeSheet.slicers.add(slicer);
  23658. */
  23659. showHeader(value?: boolean): any;
  23660. /**
  23661. * Gets or sets whether to show the no data items of the slicer.
  23662. * @param {boolean} [value] The show no data items setting of the slicer.
  23663. * @returns {boolean | GC.Spread.Sheets.Slicers.Slicer} If no value is set, returns whether to show the no data items of the slicer; otherwise, returns the slicer.
  23664. */
  23665. showNoDataItems(value?: boolean): any;
  23666. /**
  23667. * Gets or sets whether to show the no data items last.
  23668. * @param {boolean} [value] The show no data items last setting of the slicer.
  23669. * @returns {boolean | GC.Spread.Sheets.Slicers.Slicer} If no value is set, returns whether to show the no data items last; otherwise, returns the slicer.
  23670. */
  23671. showNoDataItemsInLast(value?: boolean): any;
  23672. /**
  23673. * Gets or sets the sort state of the slicer.
  23674. * @param {GC.Spread.Sheets.SortState} [value] The sort state of the slicer.
  23675. * @returns {GC.Spread.Sheets.SortState | GC.Spread.Sheets.Slicers.Slicer} If no value is set, returns the sort state of the slicer; otherwise, returns the slicer.
  23676. * @example
  23677. * //This example sets the sort order of the items in the slicer.
  23678. * //create a table
  23679. * datas = [
  23680. * ["1", "NewYork", "1968/6/8", "80", "180"],
  23681. * ["4", "NewYork", "1972/7/3", "72", "168"],
  23682. * ["4", "NewYork", "1964/3/2", "71", "179"],
  23683. * ["5", "Washington", "1972/8/8","80", "171"],
  23684. * ["6", "Washington", "1986/2/2", "89", "161"],
  23685. * ["7", "Washington", "2012/2/15", "71", "240"]];
  23686. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  23687. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  23688. * table.setColumnName(0, dataColumns[0]);
  23689. * table.setColumnName(1, dataColumns[1]);
  23690. * table.setColumnName(2, dataColumns[2]);
  23691. * table.setColumnName(3, dataColumns[3]);
  23692. * table.setColumnName(4, dataColumns[4]);
  23693. * // slicer style
  23694. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light4();
  23695. * //add a slicer to the sheet and return the slicer instance
  23696. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Height");
  23697. * //set slicer properties
  23698. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  23699. * slicer.sortState(GC.Spread.Sheets.SortState.descending);
  23700. * slicer.style(style1);
  23701. */
  23702. sortState(value?: GC.Spread.Sheets.SortState): any;
  23703. /**
  23704. * Gets or sets the style of the slicer.
  23705. * @param {GC.Spread.Sheets.Slicers.SlicerStyle} value The style of the slicer.
  23706. * @returns {GC.Spread.Sheets.Slicers.SlicerStyle | GC.Spread.Sheets.Slicers.Slicer} If no value is set, returns The style of the slicer; otherwise, returns the slicer.
  23707. * @example
  23708. * //This example uses a built-in style.
  23709. * //create a table
  23710. * datas = [
  23711. * ["1", "NewYork", "1968/6/8", "80", "180"],
  23712. * ["4", "NewYork", "1972/7/3", "72", "168"],
  23713. * ["4", "NewYork", "1964/3/2", "71", "179"],
  23714. * ["5", "Washington", "1972/8/8","80", "171"],
  23715. * ["6", "Washington", "1986/2/2", "89", "161"],
  23716. * ["7", "Washington", "2012/2/15", "71", "240"]];
  23717. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  23718. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  23719. * table.setColumnName(0, dataColumns[0]);
  23720. * table.setColumnName(1, dataColumns[1]);
  23721. * table.setColumnName(2, dataColumns[2]);
  23722. * table.setColumnName(3, dataColumns[3]);
  23723. * table.setColumnName(4, dataColumns[4]);
  23724. * // slicer style
  23725. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light4();
  23726. * //add a slicer to the sheet and return the slicer instance.
  23727. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
  23728. * //change the slicer properties.
  23729. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  23730. * slicer.style(style1);
  23731. */
  23732. style(value?: GC.Spread.Sheets.Slicers.SlicerStyle): any;
  23733. /**
  23734. * Gets or sets whether to visually distinguish the items with no data.
  23735. * @param {boolean} [value] The setting for items with no data.
  23736. * @returns {boolean | GC.Spread.Sheets.Slicers.Slicer} If no value is set, returns whether to visually distinguish the items with no data; otherwise, returns the slicer.
  23737. */
  23738. visuallyNoDataItems(value?: boolean): any;
  23739. }
  23740. export class SlicerBorder{
  23741. /**
  23742. * Represents the slicer border.
  23743. * @param {number} borderWidth The border width.
  23744. * @param {string} borderStyle The border style.
  23745. * @param {string} borderColor The border color.
  23746. * @class
  23747. * @example
  23748. * //This example sets a border style.
  23749. * //create a table
  23750. * datas = [
  23751. * ["1", "NewYork", "1968/6/8", "80", "180"],
  23752. * ["4", "NewYork", "1972/7/3", "72", "168"],
  23753. * ["4", "NewYork", "1964/3/2", "71", "179"],
  23754. * ["5", "Washington", "1972/8/8","80", "171"],
  23755. * ["6", "Washington", "1986/2/2", "89", "161"],
  23756. * ["7", "Washington", "2012/2/15", "71", "240"]];
  23757. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  23758. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  23759. * table.setColumnName(0, dataColumns[0]);
  23760. * table.setColumnName(1, dataColumns[1]);
  23761. * table.setColumnName(2, dataColumns[2]);
  23762. * table.setColumnName(3, dataColumns[3]);
  23763. * table.setColumnName(4, dataColumns[4]);
  23764. * //style info
  23765. * var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  23766. * hstyle.backColor("red");
  23767. * hstyle.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
  23768. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
  23769. * style1.hoveredSelectedItemWithDataStyle(hstyle);
  23770. * //add a slicer to the sheet and return the slicer instance.
  23771. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
  23772. * //change the slicer properties.
  23773. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  23774. * slicer.style(style1);
  23775. */
  23776. constructor(borderWidth: number, borderStyle: string, borderColor: string);
  23777. /**
  23778. * Gets or sets the border color.
  23779. * @param {string} [value] The border color.
  23780. * @returns {string | GC.Spread.Sheets.Slicers.SlicerBorder} If no value is set, returns the border color; otherwise, returns the slicer border.
  23781. */
  23782. borderColor(value?: string): any;
  23783. /**
  23784. * Gets or sets the border style.
  23785. * @param {string} [value] The border style.
  23786. * @returns {string | GC.Spread.Sheets.Slicers.SlicerBorder} If no value is set, returns the border style; otherwise, returns the slicer border.
  23787. */
  23788. borderStyle(value?: string): any;
  23789. /**
  23790. * Gets or sets the border width.
  23791. * @param {number} [value] The border width.
  23792. * @returns {number | GC.Spread.Sheets.Slicers.SlicerBorder} If no value is set, returns the border width; otherwise, returns the slicer border.
  23793. */
  23794. borderWidth(value?: number): any;
  23795. }
  23796. export class SlicerCollection{
  23797. /**
  23798. * Represents a slicer manager that managers all slicers in a sheet.
  23799. * @class
  23800. * @param {GC.Spread.Sheets.Worksheet} sheet The worksheet.
  23801. */
  23802. constructor(sheet: GC.Spread.Sheets.Worksheet);
  23803. /**
  23804. * Adds a slicer to the sheet.
  23805. * @param {string} name The name of the slicer.
  23806. * @param {string} tableName The name of the table that relates to the slicer.
  23807. * @param {string} columnName The name of the table column that relates to the slicer.
  23808. * @param {GC.Spread.Sheets.Slicers.SlicerStyle} style The style of the slicer.
  23809. * @return {GC.Spread.Sheets.Slicers.Slicer} The slicer that has been added to the sheet.
  23810. * @example
  23811. * //This example uses the add method.
  23812. * //create a table
  23813. * datas = [
  23814. * ["1", "NewYork", "1968/6/8", "80", "180"],
  23815. * ["4", "NewYork", "1972/7/3", "72", "168"],
  23816. * ["4", "NewYork", "1964/3/2", "71", "179"],
  23817. * ["5", "Washington", "1972/8/8","80", "171"],
  23818. * ["6", "Washington", "1986/2/2", "89", "161"],
  23819. * ["7", "Washington", "2012/2/15", "71", "240"]];
  23820. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  23821. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  23822. * table.setColumnName(0, dataColumns[0]);
  23823. * table.setColumnName(1, dataColumns[1]);
  23824. * table.setColumnName(2, dataColumns[2]);
  23825. * table.setColumnName(3, dataColumns[3]);
  23826. * table.setColumnName(4, dataColumns[4]);
  23827. * //add a slicer to the sheet and return the slicer instance.
  23828. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
  23829. * //change the slicer properties.
  23830. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  23831. */
  23832. add(name: string, tableName: string, columnName: string, style: GC.Spread.Sheets.Slicers.SlicerStyle): GC.Spread.Sheets.Slicers.Slicer;
  23833. /**
  23834. * Gets all of the slicers in the sheet with the indicated table name and column name.
  23835. * @param {string} tableName The name of the table.
  23836. * @param {string} columnName The name of the column.
  23837. * @returns {Array.<GC.Spread.Sheets.Slicers.Slicer>} The slicer collection.
  23838. */
  23839. all(tableName: string, columnName: string): GC.Spread.Sheets.Slicers.Slicer[];
  23840. /**
  23841. * Removes all of the slicers from the sheet.
  23842. */
  23843. clear(): void;
  23844. /**
  23845. * Gets a slicer in the sheet by the name.
  23846. * @param {string} name The name of the slicer.
  23847. * @returns {GC.Spread.Sheets.Slicers.Slicer} The slicer that has the indicated name.
  23848. */
  23849. get(name: string): GC.Spread.Sheets.Slicers.Slicer;
  23850. /**
  23851. * Removes a slicer from the sheet using the indicated slicer name.
  23852. * @param {string} name The name of the slicer.
  23853. */
  23854. remove(name: string): void;
  23855. }
  23856. export class SlicerStyle{
  23857. /**
  23858. * Represents the slicer style settings.
  23859. * @class
  23860. */
  23861. constructor();
  23862. /**
  23863. * Gets or sets the style of the slicer header.
  23864. * @param {GC.Spread.Sheets.Slicers.SlicerStyleInfo} [value] The style of the slicer header.
  23865. * @returns {GC.Spread.Sheets.Slicers.SlicerStyleInfo | GC.Spread.Sheets.Slicers.SlicerStyle} If no value is set, returns the style of the slicer header; otherwise, returns the slicer style.
  23866. * @example
  23867. * //This example sets the header backcolor.
  23868. * //create a table
  23869. * datas = [
  23870. * ["1", "NewYork", "1968/6/8", "80", "180"],
  23871. * ["4", "NewYork", "1972/7/3", "72", "168"],
  23872. * ["4", "NewYork", "1964/3/2", "71", "179"],
  23873. * ["5", "Washington", "1972/8/8","80", "171"],
  23874. * ["6", "Washington", "1986/2/2", "89", "161"],
  23875. * ["7", "Washington", "2012/2/15", "71", "240"]];
  23876. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  23877. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  23878. * table.setColumnName(0, dataColumns[0]);
  23879. * table.setColumnName(1, dataColumns[1]);
  23880. * table.setColumnName(2, dataColumns[2]);
  23881. * table.setColumnName(3, dataColumns[3]);
  23882. * table.setColumnName(4, dataColumns[4]);
  23883. * //slicer info
  23884. * var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  23885. * hstyle.backColor("red");
  23886. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
  23887. * style1.headerStyle(hstyle);
  23888. * //add a slicer to the sheet and return the slicer instance.
  23889. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
  23890. * //change the slicer properties.
  23891. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  23892. * slicer.style(style1);
  23893. */
  23894. headerStyle(value?: GC.Spread.Sheets.Slicers.SlicerStyleInfo): any;
  23895. /**
  23896. * Gets or sets the style of the hovered selected item with data.
  23897. * @param {GC.Spread.Sheets.Slicers.SlicerStyleInfo} [value] The style of the hovered selected item with data.
  23898. * @returns {GC.Spread.Sheets.Slicers.SlicerStyleInfo | GC.Spread.Sheets.Slicers.SlicerStyle} If no value is set, returns the style of the hovered selected item with data; otherwise, returns the slicer style.
  23899. * @example
  23900. * //This example sets the hoveredSelectedItemWithDataStyle method.
  23901. * //create a table
  23902. * datas = [
  23903. * ["1", "NewYork", "1968/6/8", "80", "180"],
  23904. * ["4", "NewYork", "1972/7/3", "72", "168"],
  23905. * ["4", "NewYork", "1964/3/2", "71", "179"],
  23906. * ["5", "Washington", "1972/8/8","80", "171"],
  23907. * ["6", "Washington", "1986/2/2", "89", "161"],
  23908. * ["7", "Washington", "2012/2/15", "71", "240"]];
  23909. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  23910. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  23911. * table.setColumnName(0, dataColumns[0]);
  23912. * table.setColumnName(1, dataColumns[1]);
  23913. * table.setColumnName(2, dataColumns[2]);
  23914. * table.setColumnName(3, dataColumns[3]);
  23915. * table.setColumnName(4, dataColumns[4]);
  23916. * // slicer info
  23917. * var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  23918. * hstyle.backColor("red");
  23919. * hstyle.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
  23920. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
  23921. * style1.hoveredSelectedItemWithDataStyle(hstyle);
  23922. * //add a slicer to the sheet and return the slicer instance.
  23923. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
  23924. * //change the slicer properties.
  23925. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  23926. * slicer.style(style1);
  23927. */
  23928. hoveredSelectedItemWithDataStyle(value?: GC.Spread.Sheets.Slicers.SlicerStyleInfo): any;
  23929. /**
  23930. * Gets or sets the style of the hovered selected item with no data.
  23931. * @param {GC.Spread.Sheets.Slicers.SlicerStyleInfo} [value] The style of the hovered selected item with no data.
  23932. * @returns {GC.Spread.Sheets.Slicers.SlicerStyleInfo | GC.Spread.Sheets.Slicers.SlicerStyle} If no value is set, returns the style of the hovered selected item with no data; otherwise, returns the slicer style.
  23933. * @example
  23934. * //This example uses the hoveredSelectedItemWithNoDataStyle method.
  23935. * var datasource = [
  23936. * { Name: "Apple", Category: "Fruit" },
  23937. * { Name: "Orange", Category: "Fruit" },
  23938. * { Name: "Broccoli", Category: "Vegetable" },
  23939. * { Name: "Kiwi", Category: "Fruit" },
  23940. * { Name: "Rice", Category: "Cereal" },
  23941. * { Name: "Strawberry", Category: "Fruit" },
  23942. * { Name: "Yogurt", Category: "Dairy" },
  23943. * { Name: "Plum", Category: "Fruit" },
  23944. * { Name: "Celery", Category: "Vegetable" },
  23945. * { Name: "Grape", Category: "Fruit" },
  23946. * { Name: "Oats", Category: "Cereal" },
  23947. * { Name: "Quinoa", Category: "Cereal" },
  23948. * { Name: "Maize", Category: "Cereal" },
  23949. * { Name: "Okra", Category: "Vegetable" },
  23950. * { Name: "Corn", Category: "Vegetable" },
  23951. * { Name: "Wheat", Category: "Cereal" },
  23952. * { Name: "Barley", Category: "Cereal" },
  23953. * { Name: "Cream", Category: "Dairy" },
  23954. * { Name: "Millet", Category: "Cereal" },
  23955. * { Name: "Rye", Category: "Cereal" },
  23956. * { Name: "Artichoke", Category: "Vegetable" },
  23957. * { Name: "Buckwheat", Category: "Cereal" },
  23958. * { Name: "Gooseberry", Category: "Fruit" },
  23959. * { Name: "Amaranth", Category: "Cereal" },
  23960. * { Name: "Carrot", Category: "Vegetable" },
  23961. * { Name: "Cheese", Category: "Dairy" },
  23962. * { Name: "Fig", Category: "Fruit" },
  23963. * { Name: "Milk", Category: "Dairy" },
  23964. * { Name: "Butter", Category: "Dairy" },
  23965. * ];
  23966. * //add table
  23967. * var table = activeSheet.tables.addFromDataSource("table1", 1, 1, datasource);
  23968. * //add a slicer to the sheet and return the slicer instance.
  23969. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Category");
  23970. * //change the slicer properties.
  23971. * slicer.width(200);
  23972. * slicer.height(200);
  23973. * slicer.position(new GC.Spread.Sheets.Point(300, 50));
  23974. * var slicer2 = activeSheet.slicers.add("slicer2", table.name(), "Name");
  23975. * var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  23976. * hstyle.backColor("red");
  23977. * hstyle.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
  23978. * var hstyle1 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  23979. * hstyle1.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "dashed", "blue"));
  23980. * hstyle1.backColor("yellow");
  23981. * var hstyle2 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  23982. * hstyle2.backColor("green");
  23983. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
  23984. * style1.hoveredSelectedItemWithDataStyle(hstyle);
  23985. * style1.hoveredUnSelectedItemWithDataStyle(hstyle);
  23986. * style1.unSelectedItemWithDataStyle(hstyle1);
  23987. * style1.selectedItemWithDataStyle(hstyle2);
  23988. * slicer.style(style1);
  23989. * // slicer style
  23990. * var hstyle2nd = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  23991. * hstyle2nd.backColor("red");
  23992. * hstyle2nd.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "double", "orange"));
  23993. * var hstyle12nd = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  23994. * hstyle12nd.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "double", "blue"));
  23995. * hstyle12nd.backColor("yellow");
  23996. * var hstyle22nd = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  23997. * hstyle22nd.backColor("magenta");
  23998. * var style1two = new GC.Spread.Sheets.Slicers.SlicerStyle();
  23999. * style1two.hoveredSelectedItemWithNoDataStyle(hstyle2nd);
  24000. * style1two.hoveredUnSelectedItemWithNoDataStyle(hstyle2nd);
  24001. * style1two.unSelectedItemWithNoDataStyle(hstyle12nd);
  24002. * style1two.selectedItemWithNoDataStyle(hstyle22nd);
  24003. * slicer2.style(style1two);
  24004. * activeSheet.getColumn(1).width(100);
  24005. * activeSheet.getColumn(2).width(100);
  24006. * activeSheet.getColumn(3).width(100);
  24007. */
  24008. hoveredSelectedItemWithNoDataStyle(value?: GC.Spread.Sheets.Slicers.SlicerStyleInfo): any;
  24009. /**
  24010. * Gets or sets the style of the hovered unselected item with data.
  24011. * @param {GC.Spread.Sheets.Slicers.SlicerStyleInfo} [value] The style of the hovered unselected item with data.
  24012. * @returns {GC.Spread.Sheets.Slicers.SlicerStyleInfo | GC.Spread.Sheets.Slicers.SlicerStyle} If no value is set, returns the style of the hovered unselected item with data; otherwise, returns the slicer style.
  24013. * @example
  24014. * //This example uses the hoveredUnSelectedItemWithDataStyle method.
  24015. * //create a table
  24016. * datas = [
  24017. * ["1", "NewYork", "1968/6/8", "80", "180"],
  24018. * ["4", "NewYork", "1972/7/3", "72", "168"],
  24019. * ["4", "NewYork", "1964/3/2", "71", "179"],
  24020. * ["5", "Washington", "1972/8/8","80", "171"],
  24021. * ["6", "Washington", "1986/2/2", "89", "161"],
  24022. * ["7", "Washington", "2012/2/15", "71", "240"]];
  24023. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  24024. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  24025. * table.setColumnName(0, dataColumns[0]);
  24026. * table.setColumnName(1, dataColumns[1]);
  24027. * table.setColumnName(2, dataColumns[2]);
  24028. * table.setColumnName(3, dataColumns[3]);
  24029. * table.setColumnName(4, dataColumns[4]);
  24030. * // slicer style
  24031. * var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24032. * hstyle.backColor("red");
  24033. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24034. * style1.hoveredUnSelectedItemWithDataStyle(hstyle);
  24035. * //add a slicer to the sheet and return the slicer instance.
  24036. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
  24037. * //change the slicer properties.
  24038. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  24039. * slicer.style(style1);
  24040. */
  24041. hoveredUnSelectedItemWithDataStyle(value?: GC.Spread.Sheets.Slicers.SlicerStyleInfo): any;
  24042. /**
  24043. * Gets or sets the style of the hovered unselected item with no data.
  24044. * @param {GC.Spread.Sheets.Slicers.SlicerStyleInfo} [value] The style of the hovered unselected item with no data.
  24045. * @returns {GC.Spread.Sheets.Slicers.SlicerStyleInfo | GC.Spread.Sheets.Slicers.SlicerStyle} If no value is set, returns the style of the hovered unselected item with no data; otherwise, returns the slicer style.
  24046. * @example
  24047. * //This example uses the hoveredUnSelectedItemWithNoDataStyle method.
  24048. * var datasource = [
  24049. * { Name: "Apple", Category: "Fruit" },
  24050. * { Name: "Orange", Category: "Fruit" },
  24051. * { Name: "Broccoli", Category: "Vegetable" },
  24052. * { Name: "Kiwi", Category: "Fruit" },
  24053. * { Name: "Rice", Category: "Cereal" },
  24054. * { Name: "Strawberry", Category: "Fruit" },
  24055. * { Name: "Yogurt", Category: "Dairy" },
  24056. * { Name: "Plum", Category: "Fruit" },
  24057. * { Name: "Celery", Category: "Vegetable" },
  24058. * { Name: "Grape", Category: "Fruit" },
  24059. * { Name: "Oats", Category: "Cereal" },
  24060. * { Name: "Quinoa", Category: "Cereal" },
  24061. * { Name: "Maize", Category: "Cereal" },
  24062. * { Name: "Okra", Category: "Vegetable" },
  24063. * { Name: "Corn", Category: "Vegetable" },
  24064. * { Name: "Wheat", Category: "Cereal" },
  24065. * { Name: "Barley", Category: "Cereal" },
  24066. * { Name: "Cream", Category: "Dairy" },
  24067. * { Name: "Millet", Category: "Cereal" },
  24068. * { Name: "Rye", Category: "Cereal" },
  24069. * { Name: "Artichoke", Category: "Vegetable" },
  24070. * { Name: "Buckwheat", Category: "Cereal" },
  24071. * { Name: "Gooseberry", Category: "Fruit" },
  24072. * { Name: "Amaranth", Category: "Cereal" },
  24073. * { Name: "Carrot", Category: "Vegetable" },
  24074. * { Name: "Cheese", Category: "Dairy" },
  24075. * { Name: "Fig", Category: "Fruit" },
  24076. * { Name: "Milk", Category: "Dairy" },
  24077. * { Name: "Butter", Category: "Dairy" },
  24078. * ];
  24079. * var table = activeSheet.tables.addFromDataSource("table1", 1, 1, datasource);
  24080. * //add a slicer to the sheet and return the slicer instance.
  24081. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Category");
  24082. * //change the slicer properties.
  24083. * slicer.width(200);
  24084. * slicer.height(200);
  24085. * slicer.position(new GC.Spread.Sheets.Point(300, 50));
  24086. * var slicer2 = activeSheet.slicers.add("slicer2", table.name(), "Name");
  24087. * var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24088. * hstyle.backColor("red");
  24089. * hstyle.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
  24090. * var hstyle1 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24091. * hstyle1.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "dashed", "blue"));
  24092. * hstyle1.backColor("yellow");
  24093. * var hstyle2 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24094. * hstyle2.backColor("green");
  24095. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24096. * style1.hoveredSelectedItemWithDataStyle(hstyle);
  24097. * style1.hoveredUnSelectedItemWithDataStyle(hstyle);
  24098. * style1.unSelectedItemWithDataStyle(hstyle1);
  24099. * style1.selectedItemWithDataStyle(hstyle2);
  24100. * slicer.style(style1);
  24101. * var hstyle2nd = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24102. * hstyle2nd.backColor("red");
  24103. * hstyle2nd.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "double", "orange"));
  24104. * var hstyle12nd = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24105. * hstyle12nd.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "double", "blue"));
  24106. * hstyle12nd.backColor("yellow");
  24107. * var hstyle22nd = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24108. * hstyle22nd.backColor("magenta");
  24109. * var style1two = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24110. * style1two.hoveredSelectedItemWithNoDataStyle(hstyle2nd);
  24111. * style1two.hoveredUnSelectedItemWithNoDataStyle(hstyle2nd);
  24112. * style1two.unSelectedItemWithNoDataStyle(hstyle12nd);
  24113. * style1two.selectedItemWithNoDataStyle(hstyle22nd);
  24114. * slicer2.style(style1two);
  24115. * activeSheet.getColumn(1).width(100);
  24116. * activeSheet.getColumn(2).width(100);
  24117. * activeSheet.getColumn(3).width(100);
  24118. */
  24119. hoveredUnSelectedItemWithNoDataStyle(value?: GC.Spread.Sheets.Slicers.SlicerStyleInfo): any;
  24120. /**
  24121. * Gets or sets the name of the style.
  24122. * @param {string} [value] The slicer style name.
  24123. * @returns {string | GC.Spread.Sheets.Slicers.SlicerStyle} If no value is set, returns the name of the style; otherwise, returns the slicer style.
  24124. */
  24125. name(value?: string): any;
  24126. /**
  24127. * Gets or sets the style of the selected item with data.
  24128. * @param {GC.Spread.Sheets.Slicers.SlicerStyleInfo} [value] The style of the selected item with data.
  24129. * @returns {GC.Spread.Sheets.Slicers.SlicerStyleInfo | GC.Spread.Sheets.Slicers.SlicerStyle} If no value is set, returns the style of the selected item with data; otherwise, returns the slicer style.
  24130. * @example
  24131. * //This example uses the hoveredUnSelectedItemWithNoDataStyle method.
  24132. * var datasource = [
  24133. * { Name: "Apple", Category: "Fruit" },
  24134. * { Name: "Orange", Category: "Fruit" },
  24135. * { Name: "Broccoli", Category: "Vegetable" },
  24136. * { Name: "Kiwi", Category: "Fruit" },
  24137. * { Name: "Rice", Category: "Cereal" },
  24138. * { Name: "Strawberry", Category: "Fruit" },
  24139. * { Name: "Yogurt", Category: "Dairy" },
  24140. * { Name: "Plum", Category: "Fruit" },
  24141. * { Name: "Celery", Category: "Vegetable" },
  24142. * { Name: "Grape", Category: "Fruit" },
  24143. * { Name: "Oats", Category: "Cereal" },
  24144. * { Name: "Quinoa", Category: "Cereal" },
  24145. * { Name: "Maize", Category: "Cereal" },
  24146. * { Name: "Okra", Category: "Vegetable" },
  24147. * { Name: "Corn", Category: "Vegetable" },
  24148. * { Name: "Wheat", Category: "Cereal" },
  24149. * { Name: "Barley", Category: "Cereal" },
  24150. * { Name: "Cream", Category: "Dairy" },
  24151. * { Name: "Millet", Category: "Cereal" },
  24152. * { Name: "Rye", Category: "Cereal" },
  24153. * { Name: "Artichoke", Category: "Vegetable" },
  24154. * { Name: "Buckwheat", Category: "Cereal" },
  24155. * { Name: "Gooseberry", Category: "Fruit" },
  24156. * { Name: "Amaranth", Category: "Cereal" },
  24157. * { Name: "Carrot", Category: "Vegetable" },
  24158. * { Name: "Cheese", Category: "Dairy" },
  24159. * { Name: "Fig", Category: "Fruit" },
  24160. * { Name: "Milk", Category: "Dairy" },
  24161. * { Name: "Butter", Category: "Dairy" },
  24162. * ];
  24163. * var table = activeSheet.tables.addFromDataSource("table1", 1, 1, datasource);
  24164. * //add a slicer to the sheet and return the slicer instance.
  24165. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Category");
  24166. * //change the slicer properties.
  24167. * slicer.width(200);
  24168. * slicer.height(200);
  24169. * slicer.position(new GC.Spread.Sheets.Point(300, 50));
  24170. * var slicer2 = activeSheet.slicers.add("slicer2", table.name(), "Name");
  24171. * var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24172. * hstyle.backColor("red");
  24173. * hstyle.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
  24174. * var hstyle1 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24175. * hstyle1.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "dashed", "blue"));
  24176. * hstyle1.backColor("yellow");
  24177. * var hstyle2 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24178. * hstyle2.backColor("green");
  24179. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24180. * style1.hoveredSelectedItemWithDataStyle(hstyle);
  24181. * style1.hoveredUnSelectedItemWithDataStyle(hstyle);
  24182. * style1.unSelectedItemWithDataStyle(hstyle1);
  24183. * style1.selectedItemWithDataStyle(hstyle2);
  24184. * slicer.style(style1);
  24185. * var hstyle2nd = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24186. * hstyle2nd.backColor("red");
  24187. * hstyle2nd.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "double", "orange"));
  24188. * var hstyle12nd = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24189. * hstyle12nd.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "double", "blue"));
  24190. * hstyle12nd.backColor("yellow");
  24191. * var hstyle22nd = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24192. * hstyle22nd.backColor("magenta");
  24193. * var style1two = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24194. * style1two.hoveredSelectedItemWithNoDataStyle(hstyle2nd);
  24195. * style1two.hoveredUnSelectedItemWithNoDataStyle(hstyle2nd);
  24196. * style1two.unSelectedItemWithNoDataStyle(hstyle12nd);
  24197. * style1two.selectedItemWithNoDataStyle(hstyle22nd);
  24198. * slicer2.style(style1two);
  24199. * activeSheet.getColumn(1).width(100);
  24200. * activeSheet.getColumn(2).width(100);
  24201. * activeSheet.getColumn(3).width(100);
  24202. */
  24203. selectedItemWithDataStyle(value?: GC.Spread.Sheets.Slicers.SlicerStyleInfo): any;
  24204. /**
  24205. * Gets or sets the style of the selected item with no data.
  24206. * @param {GC.Spread.Sheets.Slicers.SlicerStyleInfo} [value] The style of the selected item with no data.
  24207. * @returns {GC.Spread.Sheets.Slicers.SlicerStyleInfo | GC.Spread.Sheets.Slicers.SlicerStyle} If no value is set, returns the style of the selected item with no data; otherwise, returns the slicer style.
  24208. * @example
  24209. * //This example uses the hoveredUnSelectedItemWithNoDataStyle method.
  24210. * var datasource = [
  24211. * { Name: "Apple", Category: "Fruit" },
  24212. * { Name: "Orange", Category: "Fruit" },
  24213. * { Name: "Broccoli", Category: "Vegetable" },
  24214. * { Name: "Kiwi", Category: "Fruit" },
  24215. * { Name: "Rice", Category: "Cereal" },
  24216. * { Name: "Strawberry", Category: "Fruit" },
  24217. * { Name: "Yogurt", Category: "Dairy" },
  24218. * { Name: "Plum", Category: "Fruit" },
  24219. * { Name: "Celery", Category: "Vegetable" },
  24220. * { Name: "Grape", Category: "Fruit" },
  24221. * { Name: "Oats", Category: "Cereal" },
  24222. * { Name: "Quinoa", Category: "Cereal" },
  24223. * { Name: "Maize", Category: "Cereal" },
  24224. * { Name: "Okra", Category: "Vegetable" },
  24225. * { Name: "Corn", Category: "Vegetable" },
  24226. * { Name: "Wheat", Category: "Cereal" },
  24227. * { Name: "Barley", Category: "Cereal" },
  24228. * { Name: "Cream", Category: "Dairy" },
  24229. * { Name: "Millet", Category: "Cereal" },
  24230. * { Name: "Rye", Category: "Cereal" },
  24231. * { Name: "Artichoke", Category: "Vegetable" },
  24232. * { Name: "Buckwheat", Category: "Cereal" },
  24233. * { Name: "Gooseberry", Category: "Fruit" },
  24234. * { Name: "Amaranth", Category: "Cereal" },
  24235. * { Name: "Carrot", Category: "Vegetable" },
  24236. * { Name: "Cheese", Category: "Dairy" },
  24237. * { Name: "Fig", Category: "Fruit" },
  24238. * { Name: "Milk", Category: "Dairy" },
  24239. * { Name: "Butter", Category: "Dairy" },
  24240. * ];
  24241. * var table = activeSheet.tables.addFromDataSource("table1", 1, 1, datasource);
  24242. * //add a slicer to the sheet and return the slicer instance.
  24243. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Category");
  24244. * //change the slicer properties.
  24245. * slicer.width(200);
  24246. * slicer.height(200);
  24247. * slicer.position(new GC.Spread.Sheets.Point(300, 50));
  24248. * var slicer2 = activeSheet.slicers.add("slicer2", table.name(), "Name");
  24249. * var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24250. * hstyle.backColor("red");
  24251. * hstyle.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
  24252. * var hstyle1 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24253. * hstyle1.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "dashed", "blue"));
  24254. * hstyle1.backColor("yellow");
  24255. * var hstyle2 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24256. * hstyle2.backColor("green");
  24257. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24258. * style1.hoveredSelectedItemWithDataStyle(hstyle);
  24259. * style1.hoveredUnSelectedItemWithDataStyle(hstyle);
  24260. * style1.unSelectedItemWithDataStyle(hstyle1);
  24261. * style1.selectedItemWithDataStyle(hstyle2);
  24262. * slicer.style(style1);
  24263. * var hstyle2nd = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24264. * hstyle2nd.backColor("red");
  24265. * hstyle2nd.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "double", "orange"));
  24266. * var hstyle12nd = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24267. * hstyle12nd.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "double", "blue"));
  24268. * hstyle12nd.backColor("yellow");
  24269. * var hstyle22nd = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24270. * hstyle22nd.backColor("magenta");
  24271. * var style1two = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24272. * style1two.hoveredSelectedItemWithNoDataStyle(hstyle2nd);
  24273. * style1two.hoveredUnSelectedItemWithNoDataStyle(hstyle2nd);
  24274. * style1two.unSelectedItemWithNoDataStyle(hstyle12nd);
  24275. * style1two.selectedItemWithNoDataStyle(hstyle22nd);
  24276. * slicer2.style(style1two);
  24277. * activeSheet.getColumn(1).width(100);
  24278. * activeSheet.getColumn(2).width(100);
  24279. * activeSheet.getColumn(3).width(100);
  24280. */
  24281. selectedItemWithNoDataStyle(value?: GC.Spread.Sheets.Slicers.SlicerStyleInfo): any;
  24282. /**
  24283. * Gets or sets the style of the unselected item with data.
  24284. * @param {GC.Spread.Sheets.Slicers.SlicerStyleInfo} [value] The style of the unselected item with data.
  24285. * @returns {GC.Spread.Sheets.Slicers.SlicerStyleInfo | GC.Spread.Sheets.Slicers.SlicerStyle} If no value is set, returns the style of the unselected item with data; otherwise, returns the slicer style.
  24286. * @example
  24287. * //This example uses the hoveredUnSelectedItemWithNoDataStyle method.
  24288. * var datasource = [
  24289. * { Name: "Apple", Category: "Fruit" },
  24290. * { Name: "Orange", Category: "Fruit" },
  24291. * { Name: "Broccoli", Category: "Vegetable" },
  24292. * { Name: "Kiwi", Category: "Fruit" },
  24293. * { Name: "Rice", Category: "Cereal" },
  24294. * { Name: "Strawberry", Category: "Fruit" },
  24295. * { Name: "Yogurt", Category: "Dairy" },
  24296. * { Name: "Plum", Category: "Fruit" },
  24297. * { Name: "Celery", Category: "Vegetable" },
  24298. * { Name: "Grape", Category: "Fruit" },
  24299. * { Name: "Oats", Category: "Cereal" },
  24300. * { Name: "Quinoa", Category: "Cereal" },
  24301. * { Name: "Maize", Category: "Cereal" },
  24302. * { Name: "Okra", Category: "Vegetable" },
  24303. * { Name: "Corn", Category: "Vegetable" },
  24304. * { Name: "Wheat", Category: "Cereal" },
  24305. * { Name: "Barley", Category: "Cereal" },
  24306. * { Name: "Cream", Category: "Dairy" },
  24307. * { Name: "Millet", Category: "Cereal" },
  24308. * { Name: "Rye", Category: "Cereal" },
  24309. * { Name: "Artichoke", Category: "Vegetable" },
  24310. * { Name: "Buckwheat", Category: "Cereal" },
  24311. * { Name: "Gooseberry", Category: "Fruit" },
  24312. * { Name: "Amaranth", Category: "Cereal" },
  24313. * { Name: "Carrot", Category: "Vegetable" },
  24314. * { Name: "Cheese", Category: "Dairy" },
  24315. * { Name: "Fig", Category: "Fruit" },
  24316. * { Name: "Milk", Category: "Dairy" },
  24317. * { Name: "Butter", Category: "Dairy" },
  24318. * ];
  24319. * var table = activeSheet.tables.addFromDataSource("table1", 1, 1, datasource);
  24320. * //add a slicer to the sheet and return the slicer instance.
  24321. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Category");
  24322. * //change the slicer properties.
  24323. * slicer.width(200);
  24324. * slicer.height(200);
  24325. * slicer.position(new GC.Spread.Sheets.Point(300, 50));
  24326. * var slicer2 = activeSheet.slicers.add("slicer2", table.name(), "Name");
  24327. * var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24328. * hstyle.backColor("red");
  24329. * hstyle.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
  24330. * var hstyle1 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24331. * hstyle1.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "dashed", "blue"));
  24332. * hstyle1.backColor("yellow");
  24333. * var hstyle2 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24334. * hstyle2.backColor("green");
  24335. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24336. * style1.hoveredSelectedItemWithDataStyle(hstyle);
  24337. * style1.hoveredUnSelectedItemWithDataStyle(hstyle);
  24338. * style1.unSelectedItemWithDataStyle(hstyle1);
  24339. * style1.selectedItemWithDataStyle(hstyle2);
  24340. * slicer.style(style1);
  24341. * var hstyle2nd = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24342. * hstyle2nd.backColor("red");
  24343. * hstyle2nd.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "double", "orange"));
  24344. * var hstyle12nd = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24345. * hstyle12nd.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "double", "blue"));
  24346. * hstyle12nd.backColor("yellow");
  24347. * var hstyle22nd = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24348. * hstyle22nd.backColor("magenta");
  24349. * var style1two = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24350. * style1two.hoveredSelectedItemWithNoDataStyle(hstyle2nd);
  24351. * style1two.hoveredUnSelectedItemWithNoDataStyle(hstyle2nd);
  24352. * style1two.unSelectedItemWithNoDataStyle(hstyle12nd);
  24353. * style1two.selectedItemWithNoDataStyle(hstyle22nd);
  24354. * slicer2.style(style1two);
  24355. * activeSheet.getColumn(1).width(100);
  24356. * activeSheet.getColumn(2).width(100);
  24357. * activeSheet.getColumn(3).width(100);
  24358. */
  24359. unSelectedItemWithDataStyle(value?: GC.Spread.Sheets.Slicers.SlicerStyleInfo): any;
  24360. /**
  24361. * Gets or sets the style of the unselected item with no data.
  24362. * @param {GC.Spread.Sheets.Slicers.SlicerStyleInfo} [value] The style of the unselected item with no data.
  24363. * @returns {GC.Spread.Sheets.Slicers.SlicerStyleInfo | GC.Spread.Sheets.Slicers.SlicerStyle} If no value is set, returns the style of the unselected item with no data; otherwise, returns the slicer style.
  24364. * @example
  24365. * //This example uses the hoveredUnSelectedItemWithNoDataStyle method.
  24366. * var datasource = [
  24367. * { Name: "Apple", Category: "Fruit" },
  24368. * { Name: "Orange", Category: "Fruit" },
  24369. * { Name: "Broccoli", Category: "Vegetable" },
  24370. * { Name: "Kiwi", Category: "Fruit" },
  24371. * { Name: "Rice", Category: "Cereal" },
  24372. * { Name: "Strawberry", Category: "Fruit" },
  24373. * { Name: "Yogurt", Category: "Dairy" },
  24374. * { Name: "Plum", Category: "Fruit" },
  24375. * { Name: "Celery", Category: "Vegetable" },
  24376. * { Name: "Grape", Category: "Fruit" },
  24377. * { Name: "Oats", Category: "Cereal" },
  24378. * { Name: "Quinoa", Category: "Cereal" },
  24379. * { Name: "Maize", Category: "Cereal" },
  24380. * { Name: "Okra", Category: "Vegetable" },
  24381. * { Name: "Corn", Category: "Vegetable" },
  24382. * { Name: "Wheat", Category: "Cereal" },
  24383. * { Name: "Barley", Category: "Cereal" },
  24384. * { Name: "Cream", Category: "Dairy" },
  24385. * { Name: "Millet", Category: "Cereal" },
  24386. * { Name: "Rye", Category: "Cereal" },
  24387. * { Name: "Artichoke", Category: "Vegetable" },
  24388. * { Name: "Buckwheat", Category: "Cereal" },
  24389. * { Name: "Gooseberry", Category: "Fruit" },
  24390. * { Name: "Amaranth", Category: "Cereal" },
  24391. * { Name: "Carrot", Category: "Vegetable" },
  24392. * { Name: "Cheese", Category: "Dairy" },
  24393. * { Name: "Fig", Category: "Fruit" },
  24394. * { Name: "Milk", Category: "Dairy" },
  24395. * { Name: "Butter", Category: "Dairy" },
  24396. * ];
  24397. * var table = activeSheet.tables.addFromDataSource("table1", 1, 1, datasource);
  24398. * //add a slicer to the sheet and return the slicer instance.
  24399. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Category");
  24400. * //change the slicer properties.
  24401. * slicer.width(200);
  24402. * slicer.height(200);
  24403. * slicer.position(new GC.Spread.Sheets.Point(300, 50));
  24404. * var slicer2 = activeSheet.slicers.add("slicer2", table.name(), "Name");
  24405. * var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24406. * hstyle.backColor("red");
  24407. * hstyle.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
  24408. * var hstyle1 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24409. * hstyle1.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "dashed", "blue"));
  24410. * hstyle1.backColor("yellow");
  24411. * var hstyle2 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24412. * hstyle2.backColor("green");
  24413. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24414. * style1.hoveredSelectedItemWithDataStyle(hstyle);
  24415. * style1.hoveredUnSelectedItemWithDataStyle(hstyle);
  24416. * style1.unSelectedItemWithDataStyle(hstyle1);
  24417. * style1.selectedItemWithDataStyle(hstyle2);
  24418. * slicer.style(style1);
  24419. * var hstyle2nd = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24420. * hstyle2nd.backColor("red");
  24421. * hstyle2nd.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "double", "orange"));
  24422. * var hstyle12nd = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24423. * hstyle12nd.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "double", "blue"));
  24424. * hstyle12nd.backColor("yellow");
  24425. * var hstyle22nd = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24426. * hstyle22nd.backColor("magenta");
  24427. * var style1two = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24428. * style1two.hoveredSelectedItemWithNoDataStyle(hstyle2nd);
  24429. * style1two.hoveredUnSelectedItemWithNoDataStyle(hstyle2nd);
  24430. * style1two.unSelectedItemWithNoDataStyle(hstyle12nd);
  24431. * style1two.selectedItemWithNoDataStyle(hstyle22nd);
  24432. * slicer2.style(style1two);
  24433. * activeSheet.getColumn(1).width(100);
  24434. * activeSheet.getColumn(2).width(100);
  24435. * activeSheet.getColumn(3).width(100);
  24436. */
  24437. unSelectedItemWithNoDataStyle(value?: GC.Spread.Sheets.Slicers.SlicerStyleInfo): any;
  24438. /**
  24439. * Gets or sets the style of the whole slicer.
  24440. * @param {GC.Spread.Sheets.Slicers.SlicerStyleInfo} [value] The style of the whole slicer.
  24441. * @returns {GC.Spread.Sheets.Slicers.SlicerStyleInfo | GC.Spread.Sheets.Slicers.SlicerStyle} If no value is set, returns the style of the whole slicer; otherwise, returns the slicer style.
  24442. * @example
  24443. * //create a table
  24444. * datas = [
  24445. * ["1", "NewYork", "1968/6/8", "80", "180"],
  24446. * ["4", "NewYork", "1972/7/3", "72", "168"],
  24447. * ["4", "NewYork", "1964/3/2", "71", "179"],
  24448. * ["5", "Washington", "1972/8/8","80", "171"],
  24449. * ["6", "Washington", "1986/2/2", "89", "161"],
  24450. * ["7", "Washington", "2012/2/15", "71", "240"]];
  24451. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  24452. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  24453. * table.setColumnName(0, dataColumns[0]);
  24454. * table.setColumnName(1, dataColumns[1]);
  24455. * table.setColumnName(2, dataColumns[2]);
  24456. * table.setColumnName(3, dataColumns[3]);
  24457. * table.setColumnName(4, dataColumns[4]);
  24458. * //add a slicer to the sheet and return the slicer instance.
  24459. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Height");
  24460. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  24461. * //set customized style
  24462. * var style = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24463. * var styleInfo1 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24464. * styleInfo1.backColor("orange");
  24465. * styleInfo1.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(2,"solid","green"));
  24466. * style.wholeSlicerStyle(styleInfo1);
  24467. * var styleInfo2 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24468. * styleInfo2.backColor("red");
  24469. * styleInfo2.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(4,"solid","gray"));
  24470. * style.hoveredSelectedItemWithDataStyle(styleInfo2);
  24471. * slicer.style(style);
  24472. */
  24473. wholeSlicerStyle(value?: GC.Spread.Sheets.Slicers.SlicerStyleInfo): any;
  24474. }
  24475. export class SlicerStyleInfo{
  24476. /**
  24477. * Represents slicer style information.
  24478. * @class
  24479. * @param {string} [backColor] The background color of the style information.
  24480. * @param {string} [foreColor] The foreground color of the style information.
  24481. * @param {string} [font] The font of the style information.
  24482. * @param {GC.Spread.Sheets.Slicers.SlicerBorder} [borderLeft] The left border of the style information.
  24483. * @param {GC.Spread.Sheets.Slicers.SlicerBorder} [borderTop] The top border of the slicer information.
  24484. * @param {GC.Spread.Sheets.Slicers.SlicerBorder} [borderRight] The right border of the style information.
  24485. * @param {GC.Spread.Sheets.Slicers.SlicerBorder} [borderBottom] The bottom border of the style information.
  24486. * @param {GC.Spread.Sheets.TextDecorationType} [textDecoration] The text decoration of the style information.
  24487. */
  24488. constructor(backColor?: string, foreColor?: string, font?: string, borderLeft?: GC.Spread.Sheets.Slicers.SlicerBorder, borderTop?: GC.Spread.Sheets.Slicers.SlicerBorder, borderRight?: GC.Spread.Sheets.Slicers.SlicerBorder, borderBottom?: GC.Spread.Sheets.Slicers.SlicerBorder, textDecoration?: GC.Spread.Sheets.TextDecorationType);
  24489. /**
  24490. * Gets or sets the background color of the style information.
  24491. * @param {string} [value] The background color of the style information.
  24492. * @returns {string | GC.Spread.Sheets.Slicers.SlicerStyleInfo} If no value is set, returns the background color of the style information; otherwise, returns the slicer style information.
  24493. * @example
  24494. * //This example sets the header backcolor.
  24495. * //create a table
  24496. * datas = [
  24497. * ["1", "NewYork", "1968/6/8", "80", "180"],
  24498. * ["4", "NewYork", "1972/7/3", "72", "168"],
  24499. * ["4", "NewYork", "1964/3/2", "71", "179"],
  24500. * ["5", "Washington", "1972/8/8","80", "171"],
  24501. * ["6", "Washington", "1986/2/2", "89", "161"],
  24502. * ["7", "Washington", "2012/2/15", "71", "240"]];
  24503. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  24504. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  24505. * table.setColumnName(0, dataColumns[0]);
  24506. * table.setColumnName(1, dataColumns[1]);
  24507. * table.setColumnName(2, dataColumns[2]);
  24508. * table.setColumnName(3, dataColumns[3]);
  24509. * table.setColumnName(4, dataColumns[4]);
  24510. * //style
  24511. * var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24512. * hstyle.backColor("red");
  24513. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24514. * style1.headerStyle(hstyle);
  24515. * //add a slicer to the sheet and return the slicer instance.
  24516. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
  24517. * //change the slicer properties.
  24518. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  24519. * slicer.style(style1);
  24520. */
  24521. backColor(value?: string): any;
  24522. /**
  24523. * Gets or sets the bottom border of the style information.
  24524. * @param {GC.Spread.Sheets.Slicers.SlicerBorder} [value] The bottom border of the style information.
  24525. * @returns {GC.Spread.Sheets.Slicers.SlicerBorder | GC.Spread.Sheets.Slicers.SlicerStyleInfo} If no value is set, returns the bottom border of the style information; otherwise, returns the slicer style information.
  24526. * @example
  24527. * //This example sets a border style.
  24528. * //create a table
  24529. * datas = [
  24530. * ["1", "NewYork", "1968/6/8", "80", "180"],
  24531. * ["4", "NewYork", "1972/7/3", "72", "168"],
  24532. * ["4", "NewYork", "1964/3/2", "71", "179"],
  24533. * ["5", "Washington", "1972/8/8","80", "171"],
  24534. * ["6", "Washington", "1986/2/2", "89", "161"],
  24535. * ["7", "Washington", "2012/2/15", "71", "240"]];
  24536. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  24537. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  24538. * table.setColumnName(0, dataColumns[0]);
  24539. * table.setColumnName(1, dataColumns[1]);
  24540. * table.setColumnName(2, dataColumns[2]);
  24541. * table.setColumnName(3, dataColumns[3]);
  24542. * table.setColumnName(4, dataColumns[4]);
  24543. * //style
  24544. * var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24545. * hstyle.backColor("red");
  24546. * hstyle.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
  24547. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24548. * style1.hoveredSelectedItemWithDataStyle(hstyle);
  24549. * //add a slicer to the sheet and return the slicer instance.
  24550. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
  24551. * //change the slicer properties.
  24552. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  24553. * slicer.style(style1);
  24554. */
  24555. borderBottom(value?: GC.Spread.Sheets.Slicers.SlicerBorder): any;
  24556. /**
  24557. * Gets or sets the left border of the style information.
  24558. * @param {GC.Spread.Sheets.Slicers.SlicerBorder} [value] The left border of the style information.
  24559. * @returns {GC.Spread.Sheets.Slicers.SlicerBorder | GC.Spread.Sheets.Slicers.SlicerStyleInfo} If no value is set, returns the left border of the style information; otherwise, returns the slicer style information.
  24560. * @example
  24561. * //This example sets the left border.
  24562. * //create a table
  24563. * datas = [
  24564. * ["1", "NewYork", "1968/6/8", "80", "180"],
  24565. * ["4", "NewYork", "1972/7/3", "72", "168"],
  24566. * ["4", "NewYork", "1964/3/2", "71", "179"],
  24567. * ["5", "Washington", "1972/8/8","80", "171"],
  24568. * ["6", "Washington", "1986/2/2", "89", "161"],
  24569. * ["7", "Washington", "2012/2/15", "71", "240"]];
  24570. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  24571. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  24572. * table.setColumnName(0, dataColumns[0]);
  24573. * table.setColumnName(1, dataColumns[1]);
  24574. * table.setColumnName(2, dataColumns[2]);
  24575. * table.setColumnName(3, dataColumns[3]);
  24576. * table.setColumnName(4, dataColumns[4]);
  24577. * //style
  24578. * var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24579. * hstyle.backColor("red");
  24580. * hstyle.borderLeft(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
  24581. * hstyle.borderRight(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
  24582. * var hstyle1 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24583. * hstyle1.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "dashed", "blue"));
  24584. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24585. * style1.hoveredSelectedItemWithDataStyle(hstyle);
  24586. * style1.unSelectedItemWithDataStyle(hstyle1);
  24587. * //add a slicer to the sheet and return the slicer instance.
  24588. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
  24589. * //change the slicer properties.
  24590. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  24591. * slicer.style(style1);
  24592. */
  24593. borderLeft(value?: GC.Spread.Sheets.Slicers.SlicerBorder): any;
  24594. /**
  24595. * Gets or sets the right border of the style information.
  24596. * @param {GC.Spread.Sheets.Slicers.SlicerBorder} [value] The right border of the style information.
  24597. * @returns {GC.Spread.Sheets.Slicers.SlicerBorder | GC.Spread.Sheets.Slicers.SlicerStyleInfo} If no value is set, returns the right border of the style information; otherwise, returns the slicer style information.
  24598. * @example
  24599. * //This example sets the border.
  24600. * //create a table
  24601. * datas = [
  24602. * ["1", "NewYork", "1968/6/8", "80", "180"],
  24603. * ["4", "NewYork", "1972/7/3", "72", "168"],
  24604. * ["4", "NewYork", "1964/3/2", "71", "179"],
  24605. * ["5", "Washington", "1972/8/8","80", "171"],
  24606. * ["6", "Washington", "1986/2/2", "89", "161"],
  24607. * ["7", "Washington", "2012/2/15", "71", "240"]];
  24608. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  24609. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  24610. * table.setColumnName(0, dataColumns[0]);
  24611. * table.setColumnName(1, dataColumns[1]);
  24612. * table.setColumnName(2, dataColumns[2]);
  24613. * table.setColumnName(3, dataColumns[3]);
  24614. * table.setColumnName(4, dataColumns[4]);
  24615. * //style
  24616. * var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24617. * hstyle.backColor("red");
  24618. * hstyle.borderLeft(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
  24619. * hstyle.borderRight(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
  24620. * var hstyle1 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24621. * hstyle1.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "dashed", "blue"));
  24622. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24623. * style1.hoveredSelectedItemWithDataStyle(hstyle);
  24624. * style1.unSelectedItemWithDataStyle(hstyle1);
  24625. * //add a slicer to the sheet and return the slicer instance.
  24626. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
  24627. * //change the slicer properties.
  24628. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  24629. * slicer.style(style1);
  24630. */
  24631. borderRight(value?: GC.Spread.Sheets.Slicers.SlicerBorder): any;
  24632. /**
  24633. * Gets or sets the top border of the style information.
  24634. * @param {GC.Spread.Sheets.Slicers.SlicerBorder} [value] The top border of the style information.
  24635. * @returns {GC.Spread.Sheets.Slicers.SlicerBorder | GC.Spread.Sheets.Slicers.SlicerStyleInfo} If no value is set, returns the top border of the style information; otherwise, returns the slicer style information.
  24636. * @example
  24637. * //This example sets the border.
  24638. * //create a table
  24639. * datas = [
  24640. * ["1", "NewYork", "1968/6/8", "80", "180"],
  24641. * ["4", "NewYork", "1972/7/3", "72", "168"],
  24642. * ["4", "NewYork", "1964/3/2", "71", "179"],
  24643. * ["5", "Washington", "1972/8/8","80", "171"],
  24644. * ["6", "Washington", "1986/2/2", "89", "161"],
  24645. * ["7", "Washington", "2012/2/15", "71", "240"]];
  24646. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  24647. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  24648. * table.setColumnName(0, dataColumns[0]);
  24649. * table.setColumnName(1, dataColumns[1]);
  24650. * table.setColumnName(2, dataColumns[2]);
  24651. * table.setColumnName(3, dataColumns[3]);
  24652. * table.setColumnName(4, dataColumns[4]);
  24653. * //style
  24654. * var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24655. * hstyle.backColor("red");
  24656. * hstyle.borderLeft(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
  24657. * hstyle.borderRight(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
  24658. * var hstyle1 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24659. * hstyle1.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "dashed", "blue"));
  24660. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24661. * style1.hoveredSelectedItemWithDataStyle(hstyle);
  24662. * style1.unSelectedItemWithDataStyle(hstyle1);
  24663. * //add a slicer to the sheet and return the slicer instance.
  24664. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
  24665. * //change the slicer properties.
  24666. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  24667. * slicer.style(style1);
  24668. */
  24669. borderTop(value?: GC.Spread.Sheets.Slicers.SlicerBorder): any;
  24670. /**
  24671. * Gets or sets the font of the style information.
  24672. * @param {string} [value] The font of the style information.
  24673. * @returns {string | GC.Spread.Sheets.Slicers.SlicerStyleInfo} If no value is set, returns the font of the style information; otherwise, returns the slicer style information.
  24674. * @example
  24675. * //This example sets the font.
  24676. * //create a table
  24677. * datas = [
  24678. * ["1", "NewYork", "1968/6/8", "80", "180"],
  24679. * ["4", "NewYork", "1972/7/3", "72", "168"],
  24680. * ["4", "NewYork", "1964/3/2", "71", "179"],
  24681. * ["5", "Washington", "1972/8/8","80", "171"],
  24682. * ["6", "Washington", "1986/2/2", "89", "161"],
  24683. * ["7", "Washington", "2012/2/15", "71", "240"]];
  24684. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  24685. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  24686. * table.setColumnName(0, dataColumns[0]);
  24687. * table.setColumnName(1, dataColumns[1]);
  24688. * table.setColumnName(2, dataColumns[2]);
  24689. * table.setColumnName(3, dataColumns[3]);
  24690. * table.setColumnName(4, dataColumns[4]);
  24691. * //style
  24692. * var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24693. * hstyle.backColor("red");
  24694. * hstyle.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
  24695. * hstyle.font("8pt Arial");
  24696. * hstyle.textDecoration(GC.Spread.Sheets.TextDecorationType.underline);
  24697. * var hstyle1 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24698. * hstyle1.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "dashed", "blue"));
  24699. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24700. * style1.hoveredSelectedItemWithDataStyle(hstyle);
  24701. * style1.unSelectedItemWithDataStyle(hstyle1);
  24702. * //add a slicer to the sheet and return the slicer instance.
  24703. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
  24704. * //change the slicer properties.
  24705. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  24706. * slicer.style(style1);
  24707. */
  24708. font(value?: string): any;
  24709. /**
  24710. * Gets or sets the foreground color of the style information.
  24711. * @param {string} [value] The foreground color of the style information.
  24712. * @returns {string | GC.Spread.Sheets.Slicers.SlicerStyleInfo} If no value is set, returns the foreground color of the style information; otherwise, returns the slicer style information.
  24713. * @example
  24714. * //This example sets a header style for the slicer.
  24715. * //create a table
  24716. * datas = [
  24717. * ["1", "NewYork", "1968/6/8", "80", "180"],
  24718. * ["4", "NewYork", "1972/7/3", "72", "168"],
  24719. * ["4", "NewYork", "1964/3/2", "71", "179"],
  24720. * ["5", "Washington", "1972/8/8","80", "171"],
  24721. * ["6", "Washington", "1986/2/2", "89", "161"],
  24722. * ["7", "Washington", "2012/2/15", "71", "240"]];
  24723. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  24724. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  24725. * table.setColumnName(0, dataColumns[0]);
  24726. * table.setColumnName(1, dataColumns[1]);
  24727. * table.setColumnName(2, dataColumns[2]);
  24728. * table.setColumnName(3, dataColumns[3]);
  24729. * table.setColumnName(4, dataColumns[4]);
  24730. * //style
  24731. * var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24732. * hstyle.foreColor("white");
  24733. * hstyle.backColor("black");
  24734. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24735. * style1.headerStyle(hstyle);
  24736. * //add a slicer to the sheet and return the slicer instance.
  24737. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
  24738. * //change the slicer properties.
  24739. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  24740. * slicer.style(style1);
  24741. */
  24742. foreColor(value?: string): any;
  24743. /**
  24744. * Sets every border of the style information.
  24745. * @param {GC.Spread.Sheets.Slicers.SlicerBorder} value The border setting.
  24746. */
  24747. setBorders(value: GC.Spread.Sheets.Slicers.SlicerBorder): void;
  24748. /**
  24749. * Gets or sets the text decoration of the style information.
  24750. * @param {GC.Spread.Sheets.TextDecorationType} [value] The text decoration of the style information.
  24751. * @returns {GC.Spread.Sheets.TextDecorationType | GC.Spread.Sheets.Slicers.SlicerStyleInfo} If no value is set, returns the text decoration of the style information; otherwise, returns the slicer style information.
  24752. * @example
  24753. * //This example underlines the text.
  24754. * //create a table
  24755. * datas = [
  24756. * ["1", "NewYork", "1968/6/8", "80", "180"],
  24757. * ["4", "NewYork", "1972/7/3", "72", "168"],
  24758. * ["4", "NewYork", "1964/3/2", "71", "179"],
  24759. * ["5", "Washington", "1972/8/8","80", "171"],
  24760. * ["6", "Washington", "1986/2/2", "89", "161"],
  24761. * ["7", "Washington", "2012/2/15", "71", "240"]];
  24762. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  24763. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  24764. * table.setColumnName(0, dataColumns[0]);
  24765. * table.setColumnName(1, dataColumns[1]);
  24766. * table.setColumnName(2, dataColumns[2]);
  24767. * table.setColumnName(3, dataColumns[3]);
  24768. * table.setColumnName(4, dataColumns[4]);
  24769. * //style
  24770. * var hstyle = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24771. * hstyle.backColor("red");
  24772. * hstyle.borderBottom(new GC.Spread.Sheets.Slicers.SlicerBorder(3, "dashed", "green"));
  24773. * hstyle.font("8pt Arial");
  24774. * hstyle.textDecoration(GC.Spread.Sheets.TextDecorationType.underline);
  24775. * var hstyle1 = new GC.Spread.Sheets.Slicers.SlicerStyleInfo();
  24776. * hstyle1.borderTop(new GC.Spread.Sheets.Slicers.SlicerBorder(2, "dashed", "blue"));
  24777. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyle();
  24778. * style1.hoveredSelectedItemWithDataStyle(hstyle);
  24779. * style1.unSelectedItemWithDataStyle(hstyle1);
  24780. * //add a slicer to the sheet and return the slicer instance.
  24781. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
  24782. * //change the slicer properties.
  24783. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  24784. * slicer.style(style1);
  24785. */
  24786. textDecoration(value?: GC.Spread.Sheets.TextDecorationType): any;
  24787. }
  24788. export class SlicerStyles{
  24789. /**
  24790. * Represents a built-in slicer style collection.
  24791. * @class
  24792. * @example
  24793. * //This example uses a built-in style.
  24794. * //create a table
  24795. * datas = [
  24796. * ["1", "NewYork", "1968/6/8", "80", "180"],
  24797. * ["4", "NewYork", "1972/7/3", "72", "168"],
  24798. * ["4", "NewYork", "1964/3/2", "71", "179"],
  24799. * ["5", "Washington", "1972/8/8","80", "171"],
  24800. * ["6", "Washington", "1986/2/2", "89", "161"],
  24801. * ["7", "Washington", "2012/2/15", "71", "240"]];
  24802. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  24803. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  24804. * table.setColumnName(0, dataColumns[0]);
  24805. * table.setColumnName(1, dataColumns[1]);
  24806. * table.setColumnName(2, dataColumns[2]);
  24807. * table.setColumnName(3, dataColumns[3]);
  24808. * table.setColumnName(4, dataColumns[4]);
  24809. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light4();
  24810. * //add a slicer to the sheet and return the slicer instance.
  24811. * var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
  24812. * //change the slicer properties.
  24813. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  24814. * slicer.style(style1);
  24815. */
  24816. constructor();
  24817. /**
  24818. * Gets the dark1 style.
  24819. * @returns {GC.Spread.Sheets.Slicers.SlicerStyle}
  24820. * @example
  24821. * //This example uses a built-in style.
  24822. * //create a table
  24823. * datas = [
  24824. * ["1", "NewYork", "1968/6/8", "80", "180"],
  24825. * ["4", "NewYork", "1972/7/3", "72", "168"],
  24826. * ["4", "NewYork", "1964/3/2", "71", "179"],
  24827. * ["5", "Washington", "1972/8/8","80", "171"],
  24828. * ["6", "Washington", "1986/2/2", "89", "161"],
  24829. * ["7", "Washington", "2012/2/15", "71", "240"]];
  24830. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  24831. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  24832. * table.setColumnName(0, dataColumns[0]);
  24833. * table.setColumnName(1, dataColumns[1]);
  24834. * table.setColumnName(2, dataColumns[2]);
  24835. * table.setColumnName(3, dataColumns[3]);
  24836. * table.setColumnName(4, dataColumns[4]);
  24837. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.dark1();
  24838. * //create a slicer
  24839. * //add the slicer to the sheet
  24840. * var slicer = activeSheet.slicers.add("slicer1", table.name(),"Height");
  24841. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  24842. * slicer.style(style1);
  24843. */
  24844. static dark1(): GC.Spread.Sheets.Slicers.SlicerStyle;
  24845. /**
  24846. * Gets the dark2 style.
  24847. * @returns {GC.Spread.Sheets.Slicers.SlicerStyle}
  24848. * @example
  24849. * //This example uses a built-in style.
  24850. * //create a table
  24851. * datas = [
  24852. * ["1", "NewYork", "1968/6/8", "80", "180"],
  24853. * ["4", "NewYork", "1972/7/3", "72", "168"],
  24854. * ["4", "NewYork", "1964/3/2", "71", "179"],
  24855. * ["5", "Washington", "1972/8/8","80", "171"],
  24856. * ["6", "Washington", "1986/2/2", "89", "161"],
  24857. * ["7", "Washington", "2012/2/15", "71", "240"]];
  24858. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  24859. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  24860. * table.setColumnName(0, dataColumns[0]);
  24861. * table.setColumnName(1, dataColumns[1]);
  24862. * table.setColumnName(2, dataColumns[2]);
  24863. * table.setColumnName(3, dataColumns[3]);
  24864. * table.setColumnName(4, dataColumns[4]);
  24865. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.dark2();
  24866. * //create a slicer
  24867. * //add the slicer to the sheet
  24868. * var slicer = activeSheet.slicers.add("slicer1", table.name(),"Height");
  24869. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  24870. * slicer.style(style1);
  24871. */
  24872. static dark2(): GC.Spread.Sheets.Slicers.SlicerStyle;
  24873. /**
  24874. * Gets the dark3 style.
  24875. * @returns {GC.Spread.Sheets.Slicers.SlicerStyle}
  24876. * @example
  24877. * //This example uses a built-in style.
  24878. * //create a table
  24879. * datas = [
  24880. * ["1", "NewYork", "1968/6/8", "80", "180"],
  24881. * ["4", "NewYork", "1972/7/3", "72", "168"],
  24882. * ["4", "NewYork", "1964/3/2", "71", "179"],
  24883. * ["5", "Washington", "1972/8/8","80", "171"],
  24884. * ["6", "Washington", "1986/2/2", "89", "161"],
  24885. * ["7", "Washington", "2012/2/15", "71", "240"]];
  24886. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  24887. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  24888. * table.setColumnName(0, dataColumns[0]);
  24889. * table.setColumnName(1, dataColumns[1]);
  24890. * table.setColumnName(2, dataColumns[2]);
  24891. * table.setColumnName(3, dataColumns[3]);
  24892. * table.setColumnName(4, dataColumns[4]);
  24893. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.dark3();
  24894. * //create a slicer
  24895. * //add the slicer to the sheet
  24896. * var slicer = activeSheet.slicers.add("slicer1", table.name(),"Height");
  24897. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  24898. * slicer.style(style1);
  24899. */
  24900. static dark3(): GC.Spread.Sheets.Slicers.SlicerStyle;
  24901. /**
  24902. * Gets the dark4 style.
  24903. * @returns {GC.Spread.Sheets.Slicers.SlicerStyle}
  24904. * @example
  24905. * //This example uses a built-in style.
  24906. * //create a table
  24907. * datas = [
  24908. * ["1", "NewYork", "1968/6/8", "80", "180"],
  24909. * ["4", "NewYork", "1972/7/3", "72", "168"],
  24910. * ["4", "NewYork", "1964/3/2", "71", "179"],
  24911. * ["5", "Washington", "1972/8/8","80", "171"],
  24912. * ["6", "Washington", "1986/2/2", "89", "161"],
  24913. * ["7", "Washington", "2012/2/15", "71", "240"]];
  24914. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  24915. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  24916. * table.setColumnName(0, dataColumns[0]);
  24917. * table.setColumnName(1, dataColumns[1]);
  24918. * table.setColumnName(2, dataColumns[2]);
  24919. * table.setColumnName(3, dataColumns[3]);
  24920. * table.setColumnName(4, dataColumns[4]);
  24921. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.dark4();
  24922. * //create a slicer
  24923. * //add the slicer to the sheet
  24924. * var slicer = activeSheet.slicers.add("slicer1", table.name(),"Height");
  24925. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  24926. * slicer.style(style1);
  24927. */
  24928. static dark4(): GC.Spread.Sheets.Slicers.SlicerStyle;
  24929. /**
  24930. * Gets the dark5 style.
  24931. * @returns {GC.Spread.Sheets.Slicers.SlicerStyle}
  24932. * @example
  24933. * //This example uses a built-in style.
  24934. * //create a table
  24935. * datas = [
  24936. * ["1", "NewYork", "1968/6/8", "80", "180"],
  24937. * ["4", "NewYork", "1972/7/3", "72", "168"],
  24938. * ["4", "NewYork", "1964/3/2", "71", "179"],
  24939. * ["5", "Washington", "1972/8/8","80", "171"],
  24940. * ["6", "Washington", "1986/2/2", "89", "161"],
  24941. * ["7", "Washington", "2012/2/15", "71", "240"]];
  24942. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  24943. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  24944. * table.setColumnName(0, dataColumns[0]);
  24945. * table.setColumnName(1, dataColumns[1]);
  24946. * table.setColumnName(2, dataColumns[2]);
  24947. * table.setColumnName(3, dataColumns[3]);
  24948. * table.setColumnName(4, dataColumns[4]);
  24949. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.dark5();
  24950. * //create a slicer
  24951. * //add the slicer to the sheet
  24952. * var slicer = activeSheet.slicers.add("slicer1", table.name(),"Height");
  24953. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  24954. * slicer.style(style1);
  24955. */
  24956. static dark5(): GC.Spread.Sheets.Slicers.SlicerStyle;
  24957. /**
  24958. * Gets the dark6 style.
  24959. * @returns {GC.Spread.Sheets.Slicers.SlicerStyle}
  24960. * @example
  24961. * //This example uses a built-in style.
  24962. * //create a table
  24963. * datas = [
  24964. * ["1", "NewYork", "1968/6/8", "80", "180"],
  24965. * ["4", "NewYork", "1972/7/3", "72", "168"],
  24966. * ["4", "NewYork", "1964/3/2", "71", "179"],
  24967. * ["5", "Washington", "1972/8/8","80", "171"],
  24968. * ["6", "Washington", "1986/2/2", "89", "161"],
  24969. * ["7", "Washington", "2012/2/15", "71", "240"]];
  24970. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  24971. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  24972. * table.setColumnName(0, dataColumns[0]);
  24973. * table.setColumnName(1, dataColumns[1]);
  24974. * table.setColumnName(2, dataColumns[2]);
  24975. * table.setColumnName(3, dataColumns[3]);
  24976. * table.setColumnName(4, dataColumns[4]);
  24977. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.dark6();
  24978. * //create a slicer
  24979. * //add the slicer to the sheet
  24980. * var slicer = activeSheet.slicers.add("slicer1", table.name(),"Height");
  24981. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  24982. * slicer.style(style1);
  24983. */
  24984. static dark6(): GC.Spread.Sheets.Slicers.SlicerStyle;
  24985. /**
  24986. * Gets the light1 style.
  24987. * @returns {GC.Spread.Sheets.Slicers.SlicerStyle}
  24988. * @example
  24989. * //This example uses a built-in style.
  24990. * //create a table
  24991. * datas = [
  24992. * ["1", "NewYork", "1968/6/8", "80", "180"],
  24993. * ["4", "NewYork", "1972/7/3", "72", "168"],
  24994. * ["4", "NewYork", "1964/3/2", "71", "179"],
  24995. * ["5", "Washington", "1972/8/8","80", "171"],
  24996. * ["6", "Washington", "1986/2/2", "89", "161"],
  24997. * ["7", "Washington", "2012/2/15", "71", "240"]];
  24998. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  24999. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  25000. * table.setColumnName(0, dataColumns[0]);
  25001. * table.setColumnName(1, dataColumns[1]);
  25002. * table.setColumnName(2, dataColumns[2]);
  25003. * table.setColumnName(3, dataColumns[3]);
  25004. * table.setColumnName(4, dataColumns[4]);
  25005. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light1();
  25006. * //create a slicer
  25007. * //add the slicer to the sheet
  25008. * var slicer = activeSheet.slicers.add("slicer1", table.name(),"Height");
  25009. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  25010. * slicer.style(style1);
  25011. */
  25012. static light1(): GC.Spread.Sheets.Slicers.SlicerStyle;
  25013. /**
  25014. * Gets the light2 style.
  25015. * @returns {GC.Spread.Sheets.Slicers.SlicerStyle}
  25016. * @example
  25017. * //This example uses a built-in style.
  25018. * //create a table
  25019. * datas = [
  25020. * ["1", "NewYork", "1968/6/8", "80", "180"],
  25021. * ["4", "NewYork", "1972/7/3", "72", "168"],
  25022. * ["4", "NewYork", "1964/3/2", "71", "179"],
  25023. * ["5", "Washington", "1972/8/8","80", "171"],
  25024. * ["6", "Washington", "1986/2/2", "89", "161"],
  25025. * ["7", "Washington", "2012/2/15", "71", "240"]];
  25026. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  25027. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  25028. * table.setColumnName(0, dataColumns[0]);
  25029. * table.setColumnName(1, dataColumns[1]);
  25030. * table.setColumnName(2, dataColumns[2]);
  25031. * table.setColumnName(3, dataColumns[3]);
  25032. * table.setColumnName(4, dataColumns[4]);
  25033. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light2();
  25034. * //create a slicer
  25035. * //add the slicer to the sheet
  25036. * var slicer = activeSheet.slicers.add("slicer1", table.name(),"Height");
  25037. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  25038. * slicer.style(style1);
  25039. */
  25040. static light2(): GC.Spread.Sheets.Slicers.SlicerStyle;
  25041. /**
  25042. * Gets the light3 style.
  25043. * @returns {GC.Spread.Sheets.Slicers.SlicerStyle}
  25044. * @example
  25045. * //This example uses a built-in style.
  25046. * //create a table
  25047. * datas = [
  25048. * ["1", "NewYork", "1968/6/8", "80", "180"],
  25049. * ["4", "NewYork", "1972/7/3", "72", "168"],
  25050. * ["4", "NewYork", "1964/3/2", "71", "179"],
  25051. * ["5", "Washington", "1972/8/8","80", "171"],
  25052. * ["6", "Washington", "1986/2/2", "89", "161"],
  25053. * ["7", "Washington", "2012/2/15", "71", "240"]];
  25054. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  25055. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  25056. * table.setColumnName(0, dataColumns[0]);
  25057. * table.setColumnName(1, dataColumns[1]);
  25058. * table.setColumnName(2, dataColumns[2]);
  25059. * table.setColumnName(3, dataColumns[3]);
  25060. * table.setColumnName(4, dataColumns[4]);
  25061. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light3();
  25062. * //create a slicer
  25063. * //add the slicer to the sheet
  25064. * var slicer = activeSheet.slicers.add("slicer1", table.name(),"Height");
  25065. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  25066. * slicer.style(style1);
  25067. */
  25068. static light3(): GC.Spread.Sheets.Slicers.SlicerStyle;
  25069. /**
  25070. * Gets the light4 style.
  25071. * @returns {GC.Spread.Sheets.Slicers.SlicerStyle}
  25072. * @example
  25073. * //This example uses a built-in style.
  25074. * //create a table
  25075. * datas = [
  25076. * ["1", "NewYork", "1968/6/8", "80", "180"],
  25077. * ["4", "NewYork", "1972/7/3", "72", "168"],
  25078. * ["4", "NewYork", "1964/3/2", "71", "179"],
  25079. * ["5", "Washington", "1972/8/8","80", "171"],
  25080. * ["6", "Washington", "1986/2/2", "89", "161"],
  25081. * ["7", "Washington", "2012/2/15", "71", "240"]];
  25082. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  25083. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  25084. * table.setColumnName(0, dataColumns[0]);
  25085. * table.setColumnName(1, dataColumns[1]);
  25086. * table.setColumnName(2, dataColumns[2]);
  25087. * table.setColumnName(3, dataColumns[3]);
  25088. * table.setColumnName(4, dataColumns[4]);
  25089. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light4();
  25090. * //create a slicer
  25091. * //add the slicer to the sheet
  25092. * var slicer = activeSheet.slicers.add("slicer1", table.name(),"Height");
  25093. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  25094. * slicer.style(style1);
  25095. */
  25096. static light4(): GC.Spread.Sheets.Slicers.SlicerStyle;
  25097. /**
  25098. * Gets the light5 style.
  25099. * @returns {GC.Spread.Sheets.Slicers.SlicerStyle}
  25100. * @example
  25101. * //This example uses a built-in style.
  25102. * //create a table
  25103. * datas = [
  25104. * ["1", "NewYork", "1968/6/8", "80", "180"],
  25105. * ["4", "NewYork", "1972/7/3", "72", "168"],
  25106. * ["4", "NewYork", "1964/3/2", "71", "179"],
  25107. * ["5", "Washington", "1972/8/8","80", "171"],
  25108. * ["6", "Washington", "1986/2/2", "89", "161"],
  25109. * ["7", "Washington", "2012/2/15", "71", "240"]];
  25110. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  25111. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  25112. * table.setColumnName(0, dataColumns[0]);
  25113. * table.setColumnName(1, dataColumns[1]);
  25114. * table.setColumnName(2, dataColumns[2]);
  25115. * table.setColumnName(3, dataColumns[3]);
  25116. * table.setColumnName(4, dataColumns[4]);
  25117. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light5();
  25118. * //create a slicer
  25119. * //add the slicer to the sheet
  25120. * var slicer = activeSheet.slicers.add("slicer1", table.name(),"Height");
  25121. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  25122. * slicer.style(style1);
  25123. */
  25124. static light5(): GC.Spread.Sheets.Slicers.SlicerStyle;
  25125. /**
  25126. * Gets the light6 style.
  25127. * @returns {GC.Spread.Sheets.Slicers.SlicerStyle}
  25128. * @example
  25129. * //This example uses a built-in style.
  25130. * //create a table
  25131. * datas = [
  25132. * ["1", "NewYork", "1968/6/8", "80", "180"],
  25133. * ["4", "NewYork", "1972/7/3", "72", "168"],
  25134. * ["4", "NewYork", "1964/3/2", "71", "179"],
  25135. * ["5", "Washington", "1972/8/8","80", "171"],
  25136. * ["6", "Washington", "1986/2/2", "89", "161"],
  25137. * ["7", "Washington", "2012/2/15", "71", "240"]];
  25138. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  25139. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  25140. * table.setColumnName(0, dataColumns[0]);
  25141. * table.setColumnName(1, dataColumns[1]);
  25142. * table.setColumnName(2, dataColumns[2]);
  25143. * table.setColumnName(3, dataColumns[3]);
  25144. * table.setColumnName(4, dataColumns[4]);
  25145. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light6();
  25146. * //create a slicer
  25147. * //add the slicer to the sheet
  25148. * var slicer = activeSheet.slicers.add("slicer1", table.name(),"Height");
  25149. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  25150. * slicer.style(style1);
  25151. */
  25152. static light6(): GC.Spread.Sheets.Slicers.SlicerStyle;
  25153. /**
  25154. * Gets the other1 style.
  25155. * @returns {GC.Spread.Sheets.Slicers.SlicerStyle}
  25156. * @example
  25157. * //This example uses a built-in style.
  25158. * //create a table
  25159. * datas = [
  25160. * ["1", "NewYork", "1968/6/8", "80", "180"],
  25161. * ["4", "NewYork", "1972/7/3", "72", "168"],
  25162. * ["4", "NewYork", "1964/3/2", "71", "179"],
  25163. * ["5", "Washington", "1972/8/8","80", "171"],
  25164. * ["6", "Washington", "1986/2/2", "89", "161"],
  25165. * ["7", "Washington", "2012/2/15", "71", "240"]];
  25166. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  25167. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  25168. * table.setColumnName(0, dataColumns[0]);
  25169. * table.setColumnName(1, dataColumns[1]);
  25170. * table.setColumnName(2, dataColumns[2]);
  25171. * table.setColumnName(3, dataColumns[3]);
  25172. * table.setColumnName(4, dataColumns[4]);
  25173. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.other1();
  25174. * //create a slicer
  25175. * //add the slicer to the sheet
  25176. * var slicer = activeSheet.slicers.add("slicer1", table.name(),"Height");
  25177. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  25178. * slicer.style(style1);
  25179. */
  25180. static other1(): GC.Spread.Sheets.Slicers.SlicerStyle;
  25181. /**
  25182. * Gets the other2 style.
  25183. * @returns {GC.Spread.Sheets.Slicers.SlicerStyle}
  25184. * @example
  25185. * //This example uses a built-in style.
  25186. * //create a table
  25187. * datas = [
  25188. * ["1", "NewYork", "1968/6/8", "80", "180"],
  25189. * ["4", "NewYork", "1972/7/3", "72", "168"],
  25190. * ["4", "NewYork", "1964/3/2", "71", "179"],
  25191. * ["5", "Washington", "1972/8/8","80", "171"],
  25192. * ["6", "Washington", "1986/2/2", "89", "161"],
  25193. * ["7", "Washington", "2012/2/15", "71", "240"]];
  25194. * var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
  25195. * dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
  25196. * table.setColumnName(0, dataColumns[0]);
  25197. * table.setColumnName(1, dataColumns[1]);
  25198. * table.setColumnName(2, dataColumns[2]);
  25199. * table.setColumnName(3, dataColumns[3]);
  25200. * table.setColumnName(4, dataColumns[4]);
  25201. * var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.other2();
  25202. * //create a slicer
  25203. * //add the slicer to the sheet
  25204. * var slicer = activeSheet.slicers.add("slicer1", table.name(),"Height");
  25205. * slicer.position(new GC.Spread.Sheets.Point(100, 200));
  25206. * slicer.style(style1);
  25207. */
  25208. static other2(): GC.Spread.Sheets.Slicers.SlicerStyle;
  25209. }
  25210. export class TableSlicerData extends GC.Spread.Slicers.GeneralSlicerData{
  25211. /**
  25212. * Represents table slicer data.
  25213. * @extends GC.Spread.Slicers.GeneralSlicerData
  25214. * @class GC.Spread.Sheets.TableSlicerData
  25215. * @param {GC.Spread.Sheets.Tables.Table} table The table.
  25216. * @example
  25217. * //This example creates a slicer for the table.
  25218. * //create table
  25219. * var dataSource = [
  25220. * { Name: "Bob", City: "NewYork", Birthday: "1968/6/8" },
  25221. * { Name: "Betty", City: "NewYork", Birthday: "1972/7/3" },
  25222. * { Name: "Alice", City: "Washington", Birthday: "2012/2/15" },
  25223. * ];
  25224. * var table = activeSheet.tables.addFromDataSource("table1", 1, 1, dataSource);
  25225. * var slicerData = new GC.Spread.Sheets.Slicers.TableSlicerData(table)
  25226. * //Set slicer data to item slicer.
  25227. * var slicer = new GC.Spread.Sheets.Slicers.ItemSlicer("slicer", slicerData, "Name");
  25228. * //Add the item slicer to the dom tree.
  25229. * //The "slicerHost" is the div you want to add the slicer's dom to.
  25230. * $("#slicerHost").append(slicer.getDOMElement());
  25231. */
  25232. constructor(table: GC.Spread.Sheets.Tables.Table);
  25233. /**
  25234. * Filters the data that corresponds to the specified column name and exclusive data indexes.
  25235. * @param {string} columnName The column name.
  25236. * @param {object} conditional The filter conditional.
  25237. * conditional.exclusiveRowIndexes: number array type, visible exclusive row indexes
  25238. * conditional.ranges: {min:number, max:number} array type, visible ranges.
  25239. * @param {boolean} [isPreview] Indicates whether filter is in preview mode.
  25240. */
  25241. doFilter(columnName: string, conditional: GC.Spread.Slicers.ISlicerConditional, isPreview?: boolean): void;
  25242. /**
  25243. * Unfilters the data that corresponds to the specified column name.
  25244. * @param {string} columnName The column name.
  25245. */
  25246. doUnfilter(columnName: string): void;
  25247. /**
  25248. * Gets the slicer data of the table.
  25249. * @returns {GC.Spread.Sheets.Slicers.TableSlicerData} The slicer data of the table.
  25250. */
  25251. getSlicerData(): GC.Spread.Sheets.Slicers.TableSlicerData;
  25252. /**
  25253. * Gets the table of the table slicer data.
  25254. * @returns {GC.Spread.Sheets.Tables.Table} The table of the table slicer data.
  25255. */
  25256. getTable(): GC.Spread.Sheets.Tables.Table;
  25257. /**
  25258. * Refreshes the table slicer data.
  25259. */
  25260. refresh(): void;
  25261. }
  25262. }
  25263. module Sparklines{
  25264. export interface ISparklineSetting{
  25265. axisColor: string;
  25266. firstMarkerColor: string;
  25267. highMarkerColor: string;
  25268. lastMarkerColor: string;
  25269. lowMarkerColor: string;
  25270. markersColor: string;
  25271. negativeColor: string;
  25272. seriesColor: string;
  25273. displayEmptyCellsAs: EmptyValueStyle;
  25274. rightToLeft: boolean;
  25275. displayHidden: boolean;
  25276. displayXAxis: boolean;
  25277. showFirst: boolean;
  25278. showHigh: boolean;
  25279. showLast: boolean;
  25280. showLow: boolean;
  25281. showNegative: boolean;
  25282. showMarkers: boolean;
  25283. manualMax: number;
  25284. manualMin: number;
  25285. maxAxisType: SparklineAxisMinMax;
  25286. minAxisType: SparklineAxisMinMax;
  25287. groupMaxValue: number;
  25288. groupMinValue: number;
  25289. lineWeight: number;
  25290. }
  25291. /**
  25292. * Represents the orientation of the range.
  25293. * @enum {number}
  25294. * @example
  25295. * //This example uses the DataOrientation enumeration.
  25296. * activeSheet.setValue(0, 0, "Data Range is A2-A9");
  25297. * activeSheet.setValue(1, 0, 1);
  25298. * activeSheet.setValue(2, 0, -2);
  25299. * activeSheet.setValue(3, 0, -1);
  25300. * activeSheet.setValue(4, 0, 6);
  25301. * activeSheet.setValue(5, 0, 4);
  25302. * activeSheet.setValue(6, 0, -4);
  25303. * activeSheet.setValue(7, 0, 3);
  25304. * activeSheet.setValue(8, 0, 8);
  25305. * var data = new GC.Spread.Sheets.Range(1, 0, 8, 1);
  25306. * var setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
  25307. * var s1= activeSheet.setSparkline(11, 0, data, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
  25308. * var s2 =activeSheet.setSparkline(11, 3, data, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.column, setting);
  25309. * var s3= activeSheet.setSparkline(11, 6, data, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.winloss, setting);
  25310. * var group = activeSheet.groupSparkline([s1,s2,s3]);
  25311. * //activeSheet.ungroupSparkline(group);
  25312. */
  25313. export enum DataOrientation{
  25314. /** Specifies the vertical orientation.
  25315. * @type {number}
  25316. */
  25317. vertical= 0,
  25318. /** Specifies the horizontal orientation.
  25319. * @type {number}
  25320. */
  25321. horizontal= 1
  25322. }
  25323. /**
  25324. * Specifies how to show an empty value from a data series in the chart.
  25325. * @enum {number}
  25326. * @example
  25327. * //This example uses the EmptyValueStyle enumeration.
  25328. * var data = new GC.Spread.Sheets.Range(1, 0, 8, 1);
  25329. * var setting = new GC.Spread.Sheets.Sparklines.SparklineSetting
  25330. * setting.options.showMarkers = true;
  25331. * setting.options.lineWeight = 3;
  25332. * setting.options.displayXAxis = true;
  25333. * setting.options.showFirst = true;
  25334. * setting.options.showLast = true;
  25335. * setting.options.showLow = true;
  25336. * setting.options.showHigh = true;
  25337. * setting.options.showNegative = true;
  25338. * setting.options.seriesColor = "Text 2 1";
  25339. * setting.options.firstMarkerColor = "Text 2 3";
  25340. * setting.options.negativeColor = "Accent 2 1";
  25341. * setting.options.markersColor = "Accent 3 1";
  25342. * setting.options.lowMarkerColor = "Accent 4 1";
  25343. * setting.options.highMarkerColor = "Accent 6 1";
  25344. * setting.options.lastMarkerColor = "Accent 6 6";
  25345. * setting.options.axisColor = "Text 1 1";
  25346. * setting.options.displayEmptyCellsAs = GC.Spread.Sheets.Sparklines.EmptyValueStyle.Zero;
  25347. * activeSheet.addSpan(13, 0, 4, 3, null);
  25348. * activeSheet.setSparkline(13, 0, data, GC.Spread.Sheets.Sparklines.DataOrientation.vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
  25349. * activeSheet.setValue(1, 0, 1);
  25350. * activeSheet.setValue(2, 0, -2);
  25351. * activeSheet.setValue(3, 0, -1);
  25352. * activeSheet.setValue(4, 0, 6);
  25353. * activeSheet.setValue(5, 0, 4);
  25354. * activeSheet.setValue(6, 0, -4);
  25355. * activeSheet.setValue(7, 0, 3);
  25356. * activeSheet.setValue(8, 0, 8);
  25357. */
  25358. export enum EmptyValueStyle{
  25359. /** Leaves gaps for empty values in a data series, which results in a segmented line.
  25360. * @type {number}
  25361. */
  25362. gaps= 0,
  25363. /** Handles empty values in a data series as zero values, so that the line drops to zero for zero-value data points.
  25364. * @type {number}
  25365. */
  25366. zero= 1,
  25367. /** Fills gaps with a connecting element instead of leaving gaps for empty values in a data series.
  25368. * @type {number}
  25369. */
  25370. connect= 2
  25371. }
  25372. /**
  25373. * An enumeration that specifies information about how the vertical axis minimum or maximum is computed for this sparkline group.
  25374. * @enum {number}
  25375. * @example
  25376. * //This example uses the SparklineAxisMinMax enumeration.
  25377. * activeSheet.setValue(0, 0, "Data Range is A2-A9");
  25378. * activeSheet.setValue(1, 0, 1);
  25379. * activeSheet.setValue(2, 0, -2);
  25380. * activeSheet.setValue(3, 0, -1);
  25381. * activeSheet.setValue(4, 0, 6);
  25382. * activeSheet.setValue(5, 0, 4);
  25383. * activeSheet.setValue(6, 0, -4);
  25384. * activeSheet.setValue(7, 0, 3);
  25385. * activeSheet.setValue(8, 0, 8);
  25386. * var data = new GC.Spread.Sheets.Range(1, 0, 8, 1);
  25387. * var setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
  25388. * setting.options.minAxisType = GC.Spread.Sheets.Sparklines.SparklineAxisMinMax.custom;
  25389. * setting.options.manualMin = -2;
  25390. * setting.options.maxAxisType = GC.Spread.Sheets.Sparklines.SparklineAxisMinMax.custom;
  25391. * setting.options.manualMax = 10;
  25392. * var s1= activeSheet.setSparkline(11, 0, data, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
  25393. * var s2 =activeSheet.setSparkline(11, 3, data, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.column, setting);
  25394. * var s3= activeSheet.setSparkline(11, 6, data, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.winloss, setting);
  25395. * var group = activeSheet.groupSparkline([s1,s2,s3]);
  25396. */
  25397. export enum SparklineAxisMinMax{
  25398. /** Specifies that the vertical axis minimum or maximum for each sparkline in this sparkline group is calculated automatically such that the data point with the minimum or maximum value can be displayed in the plot area.
  25399. * @type {number}
  25400. */
  25401. individual= 0,
  25402. /** Specifies that the vertical axis minimum or maximum is shared across all sparklines in this sparkline group and is calculated automatically such that the data point with the minimum or maximum value can be displayed in the plot area.
  25403. * @type {number}
  25404. */
  25405. group= 1,
  25406. /** Specifies that the vertical axis minimum or maximum for each sparkline in this sparkline group is specified by the manualMin attribute or the manualMax attribute of the sparkline group.
  25407. * @type {number}
  25408. */
  25409. custom= 2
  25410. }
  25411. /**
  25412. * Represents the sparkline type.
  25413. * @enum {number}
  25414. * @example
  25415. * //This example uses the SparklineType enumeration.
  25416. * activeSheet.setValue(0, 0, "Data Range is A2-A9");
  25417. * activeSheet.setValue(1, 0, 1);
  25418. * activeSheet.setValue(2, 0, -2);
  25419. * activeSheet.setValue(3, 0, -1);
  25420. * activeSheet.setValue(4, 0, 6);
  25421. * activeSheet.setValue(5, 0, 4);
  25422. * activeSheet.setValue(6, 0, -4);
  25423. * activeSheet.setValue(7, 0, 3);
  25424. * activeSheet.setValue(8, 0, 8);
  25425. * var data = new GC.Spread.Sheets.Range(1, 0, 8, 1);
  25426. * var setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
  25427. * var s1= activeSheet.setSparkline(11, 0, data, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
  25428. * var s2 =activeSheet.setSparkline(11, 3, data, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.column, setting);
  25429. * var s3= activeSheet.setSparkline(11, 6, data, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.winloss, setting);
  25430. * var group = activeSheet.groupSparkline([s1,s2,s3]);
  25431. * //activeSheet.ungroupSparkline(group);
  25432. */
  25433. export enum SparklineType{
  25434. /** Specifies the line sparkline.
  25435. * @type {number}
  25436. */
  25437. line= 0,
  25438. /** Specifies the column sparkline.
  25439. * @type {number}
  25440. */
  25441. column= 1,
  25442. /** Specifies the win-loss sparkline.
  25443. * @type {number}
  25444. */
  25445. winloss= 2
  25446. }
  25447. export class AreaSparkline extends SparklineEx{
  25448. /**
  25449. * Represents the class for the area sparkline.
  25450. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  25451. * @class
  25452. */
  25453. constructor();
  25454. }
  25455. export class BoxPlotSparkline extends SparklineEx{
  25456. /**
  25457. * Represents the class for the box plot sparkline.
  25458. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  25459. * @class
  25460. */
  25461. constructor();
  25462. }
  25463. export class BulletSparkline extends SparklineEx{
  25464. /**
  25465. * Represents the class for the bullet sparkline.
  25466. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  25467. * @class
  25468. */
  25469. constructor();
  25470. }
  25471. export class CascadeSparkline extends SparklineEx{
  25472. /**
  25473. * Represents the class for the cascade sparkline.
  25474. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  25475. * @class
  25476. */
  25477. constructor();
  25478. }
  25479. export class ColumnSparkline extends SparklineEx{
  25480. /**
  25481. * Represents the class for the column sparkline.
  25482. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  25483. * @class
  25484. */
  25485. constructor();
  25486. }
  25487. export class HBarSparkline extends SparklineEx{
  25488. /**
  25489. * Represents the class for the Hbar sparkline.
  25490. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  25491. * @class
  25492. */
  25493. constructor();
  25494. }
  25495. export class LineSparkline extends SparklineEx{
  25496. /**
  25497. * Represents the class for the line sparkline.
  25498. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  25499. * @class
  25500. */
  25501. constructor();
  25502. }
  25503. export class MonthSparkline extends SparklineEx{
  25504. /**
  25505. * Represents the class for the month sparkline.
  25506. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  25507. * @class
  25508. */
  25509. constructor();
  25510. }
  25511. export class ParetoSparkline extends SparklineEx{
  25512. /**
  25513. * Represents the class for the pareto sparkline.
  25514. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  25515. * @class
  25516. */
  25517. constructor();
  25518. }
  25519. export class PieSparkline extends SparklineEx{
  25520. /**
  25521. * Represents the class for the pie sparkline.
  25522. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  25523. * @class
  25524. */
  25525. constructor();
  25526. }
  25527. export class ScatterSparkline extends SparklineEx{
  25528. /**
  25529. * Represents the class for the scatter sparkline.
  25530. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  25531. * @class
  25532. */
  25533. constructor();
  25534. }
  25535. export class Sparkline{
  25536. /**
  25537. * Represents a Sparkline class.
  25538. * @param {number} row The row index.
  25539. * @param {number} column The column index.
  25540. * @param {GC.Spread.Sheets.Range} dataReference The data range to which the sparkline refers.
  25541. * @param {GC.Spread.Sheets.Sparklines.DataOrientation} dataOrientation The orientation of the data range.
  25542. * @param {GC.Spread.Sheets.Sparklines.SparklineType} type The type of sparkline.
  25543. * @param {GC.Spread.Sheets.Sparklines.SparklineSetting} setting The setting of the sparkline.
  25544. * @class
  25545. */
  25546. constructor(row?: number, column?: number, dataReference?: GC.Spread.Sheets.Range, dataOrientation?: GC.Spread.Sheets.Sparklines.DataOrientation, type?: GC.Spread.Sheets.Sparklines.SparklineType, setting?: GC.Spread.Sheets.Sparklines.SparklineSetting);
  25547. /** Gets the column index.
  25548. * @type {number}
  25549. */
  25550. column: number;
  25551. /** Gets the row index.
  25552. * @type {number}
  25553. */
  25554. row: number;
  25555. /**
  25556. * Clones a sparkline.
  25557. * @returns {GC.Spread.Sheets.Sparklines.Sparkline} The cloned sparkline.
  25558. */
  25559. clone(): GC.Spread.Sheets.Sparklines.Sparkline;
  25560. /**
  25561. * Gets or sets the data object.
  25562. * @param {GC.Spread.Sheets.Range} value The sparkline data.
  25563. * @returns {GC.Spread.Sheets.Range | GC.Spread.Sheets.Sparklines.Sparkline} If no value is set, returns the data object; otherwise, returns the sparkline.
  25564. * @example
  25565. * //This example uses the data method.
  25566. * activeSheet.suspendPaint();
  25567. * activeSheet.setValue(1, 0, 10);
  25568. * activeSheet.setValue(2, 0, 0);
  25569. * activeSheet.setValue(3, 0, -3);
  25570. * activeSheet.setValue(4, 0, -5);
  25571. * activeSheet.setValue(0, 0, 1);
  25572. * activeSheet.setValue(0, 1, 2);
  25573. * activeSheet.setValue(0, 2, 4);
  25574. * activeSheet.setValue(0, 3, 8);
  25575. * activeSheet.setValue(0, 4, 6);
  25576. * activeSheet.setValue(0, 5, new Date(2014, 1, 1));
  25577. * activeSheet.setValue(1, 5, new Date(2014, 9, 1));
  25578. * activeSheet.setValue(2, 5, new Date(2014, 7, 1));
  25579. * activeSheet.setValue(3, 5, new Date(2014, 5, 1));
  25580. * activeSheet.setValue(4, 5, new Date(2014, 3, 1));
  25581. * var sparkline = activeSheet.setSparkline(5, 0, new GC.Spread.Sheets.Range(0, 0, 5, 5), GC.Spread.Sheets.Sparklines.DataOrientation.horizontal, GC.Spread.Sheets.Sparklines.SparklineType.line, new GC.Spread.Sheets.Sparklines.SparklineSetting(), new GC.Spread.Sheets.Range(0, 5, 5, 1), GC.Spread.Sheets.Sparklines.DataOrientation.vertical);
  25582. * sparkline.data(new GC.Spread.Sheets.Range(0, 0, 5, 5));
  25583. * sparkline.sparklineType(GC.Spread.Sheets.Sparklines.SparklineType.line);
  25584. * sparkline.setting(new GC.Spread.Sheets.Sparklines.SparklineSetting());
  25585. * sparkline.dateAxisData(new GC.Spread.Sheets.Range(0, 5, 5, 1));
  25586. * sparkline.dataOrientation(GC.Spread.Sheets.Sparklines.DataOrientation.vertical);
  25587. * sparkline.dateAxisOrientation(GC.Spread.Sheets.Sparklines.DataOrientation.vertical);
  25588. * sparkline.row = 5;
  25589. * sparkline.column = 0;
  25590. * sparkline.displayDateAxis(true);
  25591. * activeSheet.resumePaint();
  25592. */
  25593. data(value?: GC.Spread.Sheets.Range): any;
  25594. /**
  25595. * Gets or sets the data orientation.
  25596. * @param {GC.Spread.Sheets.Sparklines.DataOrientation} value The sparkline data orientation.
  25597. * @returns {GC.Spread.Sheets.Sparklines.DataOrientation | GC.Spread.Sheets.Sparklines.Sparkline} If no value is set, returns the sparkline data orientation; otherwise, returns the sparkline.
  25598. * @example
  25599. * //This example uses the vertical data and the date range to create the sparkline.
  25600. * var setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
  25601. * setting.options.showMarkers = true;
  25602. * setting.options.displayXAxis = true;
  25603. * activeSheet.suspendPaint();
  25604. * activeSheet.setValue(1, 0, 10);
  25605. * activeSheet.setValue(2, 0, 0);
  25606. * activeSheet.setValue(3, 0, -3);
  25607. * activeSheet.setValue(4, 0, -5);
  25608. * activeSheet.setValue(0, 0, 1);
  25609. * activeSheet.setValue(0, 1, 2);
  25610. * activeSheet.setValue(0, 2, 4);
  25611. * activeSheet.setValue(0, 3, 8);
  25612. * activeSheet.setValue(0, 4, 6);
  25613. * activeSheet.setValue(0, 5, new Date(2014, 1, 1));
  25614. * activeSheet.setValue(1, 5, new Date(2014, 9, 1));
  25615. * activeSheet.setValue(2, 5, new Date(2014, 7, 1));
  25616. * activeSheet.setValue(3, 5, new Date(2014, 5, 1));
  25617. * activeSheet.setValue(4, 5, new Date(2014, 3, 1));
  25618. * var sparkline = activeSheet.setSparkline(5, 0, new GC.Spread.Sheets.Range(0, 0, 5, 5), GC.Spread.Sheets.Sparklines.DataOrientation.horizontal, GC.Spread.Sheets.Sparklines.SparklineType.line, setting, new GC.Spread.Sheets.Range(0, 5, 5, 1), GC.Spread.Sheets.Sparklines.DataOrientation.vertical);
  25619. * sparkline.dataOrientation(GC.Spread.Sheets.Sparklines.DataOrientation.vertical);
  25620. * sparkline.displayDateAxis(true);
  25621. * activeSheet.resumePaint();
  25622. * activeSheet.addSpan(5, 0, 4, 3, null);
  25623. */
  25624. dataOrientation(value?: GC.Spread.Sheets.Sparklines.DataOrientation): any;
  25625. /**
  25626. * Gets or sets the date axis data object.
  25627. * @param {GC.Spread.Sheets.Range} value The sparkline date axis data.
  25628. * @returns {GC.Spread.Sheets.Range | GC.Spread.Sheets.Sparklines.Sparkline} If no value is set, returns the sparkline date axis data; otherwise, returns the sparkline.
  25629. * @example
  25630. * //This example uses the dateAxisData method.
  25631. * activeSheet.suspendPaint();
  25632. * activeSheet.setValue(1, 0, 10);
  25633. * activeSheet.setValue(2, 0, 0);
  25634. * activeSheet.setValue(3, 0, -3);
  25635. * activeSheet.setValue(4, 0, -5);
  25636. * activeSheet.setValue(0, 0, 1);
  25637. * activeSheet.setValue(0, 1, 2);
  25638. * activeSheet.setValue(0, 2, 4);
  25639. * activeSheet.setValue(0, 3, 8);
  25640. * activeSheet.setValue(0, 4, 6);
  25641. * activeSheet.setValue(0, 5, new Date(2014, 1, 1));
  25642. * activeSheet.setValue(1, 5, new Date(2014, 9, 1));
  25643. * activeSheet.setValue(2, 5, new Date(2014, 7, 1));
  25644. * activeSheet.setValue(3, 5, new Date(2014, 5, 1));
  25645. * activeSheet.setValue(4, 5, new Date(2014, 3, 1));
  25646. * var sparkline = activeSheet.setSparkline(5, 0, new GC.Spread.Sheets.Range(0, 0, 5, 5), GC.Spread.Sheets.Sparklines.DataOrientation.horizontal, GC.Spread.Sheets.Sparklines.SparklineType.line, new GC.Spread.Sheets.Sparklines.SparklineSetting(), new GC.Spread.Sheets.Range(0, 5, 5, 1), GC.Spread.Sheets.Sparklines.DataOrientation.vertical);
  25647. * sparkline.data(new GC.Spread.Sheets.Range(0, 0, 5, 5));
  25648. * sparkline.sparklineType(GC.Spread.Sheets.Sparklines.SparklineType.line);
  25649. * sparkline.setting(new GC.Spread.Sheets.Sparklines.SparklineSetting());
  25650. * sparkline.dateAxisData(new GC.Spread.Sheets.Range(0, 5, 5, 1));
  25651. * sparkline.dataOrientation(GC.Spread.Sheets.Sparklines.DataOrientation.vertical);
  25652. * sparkline.dateAxisOrientation(GC.Spread.Sheets.Sparklines.DataOrientation.vertical);
  25653. * sparkline.row = 5;
  25654. * sparkline.column = 0;
  25655. * sparkline.displayDateAxis(true);
  25656. * activeSheet.resumePaint();
  25657. */
  25658. dateAxisData(value?: GC.Spread.Sheets.Range): any;
  25659. /**
  25660. * Gets or sets the date axis orientation.
  25661. * @param {GC.Spread.Sheets.Sparklines.DataOrientation} value The sparkline date axis orientation.
  25662. * @returns {GC.Spread.Sheets.Sparklines.DataOrientation | GC.Spread.Sheets.Sparklines.Sparkline} If no value is set, returns the sparkline date axis orientation; otherwise, returns the sparkline.
  25663. * @example
  25664. * //This example uses vertical data with horizontal dates to create a sparkline.
  25665. * var setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
  25666. * setting.options.showMarkers = true;
  25667. * setting.options.displayXAxis = true;
  25668. * activeSheet.suspendPaint();
  25669. * activeSheet.setValue(1, 0, 10);
  25670. * activeSheet.setValue(2, 0, 0);
  25671. * activeSheet.setValue(3, 0, -3);
  25672. * activeSheet.setValue(4, 0, -5);
  25673. * activeSheet.setValue(0, 0, 1);
  25674. * activeSheet.setValue(0, 1, 2);
  25675. * activeSheet.setValue(0, 2, 4);
  25676. * activeSheet.setValue(0, 3, 8);
  25677. * activeSheet.setValue(0, 4, 6);
  25678. * activeSheet.setValue(0, 5, new Date(2014, 1, 1));
  25679. * activeSheet.setValue(1, 5, new Date(2014, 9, 1));
  25680. * activeSheet.setValue(2, 5, new Date(2014, 7, 1));
  25681. * activeSheet.setValue(3, 5, new Date(2014, 5, 1));
  25682. * activeSheet.setValue(4, 5, new Date(2014, 3, 1));
  25683. * activeSheet.setValue(11, 0, new Date(2014, 1, 1));
  25684. * activeSheet.setValue(11, 1, new Date(2014, 9, 1));
  25685. * activeSheet.setValue(11, 2, new Date(2014, 7, 1));
  25686. * activeSheet.setValue(11, 3, new Date(2014, 5, 1));
  25687. * activeSheet.setValue(11, 4, new Date(2014, 3, 1));
  25688. * var sparkline = activeSheet.setSparkline(5, 0, new GC.Spread.Sheets.Range(0, 0, 5, 5), GC.Spread.Sheets.Sparklines.DataOrientation.vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting, new GC.Spread.Sheets.Range(11, 0, 1, 5), GC.Spread.Sheets.Sparklines.DataOrientation.horizontal);
  25689. * sparkline.dataOrientation(GC.Spread.Sheets.Sparklines.DataOrientation.vertical);
  25690. * sparkline.dateAxisOrientation(GC.Spread.Sheets.Sparklines.DataOrientation.horizontal);
  25691. * sparkline.displayDateAxis(true);
  25692. * activeSheet.resumePaint();
  25693. * activeSheet.addSpan(5, 0, 4, 3, null);
  25694. */
  25695. dateAxisOrientation(value?: GC.Spread.Sheets.Sparklines.DataOrientation): any;
  25696. /**
  25697. * Gets or sets a value that indicates whether to display the date axis.
  25698. * @param {boolean} value Whether to display the date axis.
  25699. * @returns {boolean | GC.Spread.Sheets.Sparklines.Sparkline} If no value is set, returns whether to display the date axis; otherwise, returns the sparkline.
  25700. * @example
  25701. * //This example uses the vertical data and the date range to create the sparkline.
  25702. * var setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
  25703. * setting.options.showMarkers = true;
  25704. * setting.options.displayXAxis = true;
  25705. * activeSheet.suspendPaint();
  25706. * activeSheet.setValue(1, 0, 10);
  25707. * activeSheet.setValue(2, 0, 0);
  25708. * activeSheet.setValue(3, 0, -3);
  25709. * activeSheet.setValue(4, 0, -5);
  25710. * activeSheet.setValue(0, 0, 1);
  25711. * activeSheet.setValue(0, 1, 2);
  25712. * activeSheet.setValue(0, 2, 4);
  25713. * activeSheet.setValue(0, 3, 8);
  25714. * activeSheet.setValue(0, 4, 6);
  25715. * activeSheet.setValue(0, 5, new Date(2014, 1, 1));
  25716. * activeSheet.setValue(1, 5, new Date(2014, 9, 1));
  25717. * activeSheet.setValue(2, 5, new Date(2014, 7, 1));
  25718. * activeSheet.setValue(3, 5, new Date(2014, 5, 1));
  25719. * activeSheet.setValue(4, 5, new Date(2014, 3, 1));
  25720. * var sparkline = activeSheet.setSparkline(5, 0, new GC.Spread.Sheets.Range(0, 0, 5, 5), GC.Spread.Sheets.Sparklines.DataOrientation.horizontal, GC.Spread.Sheets.Sparklines.SparklineType.line, setting, new GC.Spread.Sheets.Range(0, 5, 5, 1), GC.Spread.Sheets.Sparklines.DataOrientation.vertical);
  25721. * sparkline.dataOrientation(GC.Spread.Sheets.Sparklines.DataOrientation.vertical);
  25722. * sparkline.displayDateAxis(true);
  25723. * activeSheet.resumePaint();
  25724. * activeSheet.addSpan(5, 0, 4, 3, null);
  25725. */
  25726. displayDateAxis(value?: boolean): any;
  25727. /**
  25728. * Gets or sets the sparkline group.
  25729. * @param {GC.Spread.Sheets.Sparklines.SparklineGroup} value The sparkline group.
  25730. * @returns {GC.Spread.Sheets.Sparklines.SparklineGroup | GC.Spread.Sheets.Sparklines.Sparkline} If no value is set, returns the sparkline group; otherwise, returns the sparkline.
  25731. */
  25732. group(value?: GC.Spread.Sheets.Sparklines.SparklineGroup): any;
  25733. /**
  25734. * Paints the sparkline in the specified area.
  25735. * @param {CanvasRenderingContext2D} ctx The canvas's two-dimensional context.
  25736. * @param {number} x <i>x</i>-coordinate relative to the canvas.
  25737. * @param {number} y <i>y</i>-coordinate relative to the canvas.
  25738. * @param {number} w The width of the cell that contains the sparkline.
  25739. * @param {number} h The height of the cell that contains the sparkline.
  25740. */
  25741. paintSparkline(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number): void;
  25742. /**
  25743. * Gets or sets the sparkline setting of the cell.
  25744. * @param {GC.Spread.Sheets.Sparklines.SparklineSetting} value The sparkline setting.
  25745. * @returns {GC.Spread.Sheets.Sparklines.SparklineSetting | GC.Spread.Sheets.Sparklines.Sparkline} If no value is set, returns the sparkline setting; otherwise, returns the sparkline.
  25746. */
  25747. setting(value?: GC.Spread.Sheets.Sparklines.SparklineSetting): any;
  25748. /**
  25749. * Gets or sets the type of the sparkline.
  25750. * @param {GC.Spread.Sheets.Sparklines.SparklineType} value The sparkline type.
  25751. * @returns {GC.Spread.Sheets.Sparklines.SparklineType | GC.Spread.Sheets.Sparklines.Sparkline} If no value is set, returns the sparkline type; otherwise, returns the sparkline.
  25752. */
  25753. sparklineType(value?: GC.Spread.Sheets.Sparklines.SparklineType): any;
  25754. }
  25755. export class SparklineEx{
  25756. /**
  25757. * Represents the base class for the other SparklineEx classes.
  25758. * @class
  25759. */
  25760. constructor();
  25761. /**
  25762. * Represents the type name string used for supporting serialization.
  25763. * @type {string}
  25764. */
  25765. typeName: string;
  25766. /**
  25767. * Creates a custom function used to provide data and settings for SparklineEx.
  25768. * @returns {GC.Spread.CalcEngine.Functions.Function} The created custom function.
  25769. */
  25770. createFunction(): GC.Spread.CalcEngine.Functions.Function;
  25771. /**
  25772. * Loads the object state from the specified JSON string.
  25773. * @param {Object} settings The sparklineEx data from deserialization.
  25774. */
  25775. fromJSON(settings: Object): void;
  25776. /**
  25777. * Gets the name of SparklineEx.
  25778. * @returns {string} The SparklineEx's name.
  25779. */
  25780. name(): string;
  25781. /**
  25782. * Paints the SparklineEx on the canvas.
  25783. * @param {CanvasRenderingContext2D} context The canvas's two-dimensional context.
  25784. * @param {object} value The value evaluated by the custom function.
  25785. * @param {number} x <i>x</i>-coordinate relative to the canvas.
  25786. * @param {number} y <i>y</i>-coordinate relative to the canvas.
  25787. * @param {number} width The cell's width.
  25788. * @param {number} height The cell's height.
  25789. */
  25790. paint(context: CanvasRenderingContext2D, value: any, x: number, y: number, width: number, height: number): void;
  25791. /**
  25792. * Saves the object state to a JSON string.
  25793. * @returns {Object} The sparklineEx data.
  25794. */
  25795. toJSON(): Object;
  25796. }
  25797. export class SparklineGroup{
  25798. /**
  25799. * Represents a sparkline group.
  25800. * @param {GC.Spread.Sheets.Sparklines.SparklineType} type The type of sparkline.
  25801. * @param {GC.Spread.Sheets.Sparklines.SparklineSetting} setting The setting of the sparkline group.
  25802. * @class
  25803. */
  25804. constructor(type: GC.Spread.Sheets.Sparklines.SparklineType, setting: GC.Spread.Sheets.Sparklines.SparklineSetting);
  25805. /** Indicates the sparkline settings.
  25806. * @type {GC.Spread.Sheets.Sparklines.SparklineSetting}
  25807. */
  25808. setting: GC.Spread.Sheets.Sparklines.SparklineSetting;
  25809. /** Indicates the sparkline type.
  25810. * @type {GC.Spread.Sheets.Sparklines.SparklineType}
  25811. */
  25812. sparklineType: GC.Spread.Sheets.Sparklines.SparklineType;
  25813. /**
  25814. * Adds a sparkline to the group.
  25815. * @param {GC.Spread.Sheets.Sparklines.Sparkline} item The sparkline item.
  25816. */
  25817. add(item: GC.Spread.Sheets.Sparklines.Sparkline): void;
  25818. /**
  25819. * Clones the current sparkline group.
  25820. * @returns {GC.Spread.Sheets.Sparklines.SparklineGroup} The cloned sparkline group.
  25821. */
  25822. clone(): GC.Spread.Sheets.Sparklines.SparklineGroup;
  25823. /**
  25824. * Determines whether the group contains a specific value.
  25825. * @param {GC.Spread.Sheets.Sparklines.Sparkline} item The object to locate in the group.
  25826. * @returns {boolean} <c>true</c> if the item is found in the group; otherwise, <c>false</c>.
  25827. */
  25828. contains(item: GC.Spread.Sheets.Sparklines.Sparkline): boolean;
  25829. /**
  25830. * Represents the count of the sparkline group innerlist.
  25831. * @returns {number} The sparkline count in the group.
  25832. */
  25833. count(): number;
  25834. /**
  25835. * Represents the date axis data.
  25836. * @param {GC.Spread.Sheets.Range} value The date axis data.
  25837. * @returns {GC.Spread.Sheets.Range | undefined} If no value is set, returns the date axis data; otherwise, returns undefined.
  25838. */
  25839. dateAxisData(value?: GC.Spread.Sheets.Range): any;
  25840. /**
  25841. * Represents the date axis orientation.
  25842. * @param {GC.Spread.Sheets.Sparklines.DataOrientation} value The date axis orientation.
  25843. * @returns {GC.Spread.Sheets.Sparklines.DataOrientation | undefined} If no value is set, returns the date axis orientation; otherwise, returns undefined.
  25844. */
  25845. dateAxisOrientation(value: GC.Spread.Sheets.Sparklines.DataOrientation): any;
  25846. /**
  25847. * Removes the first occurrence of a specific object from the group.
  25848. * @param {GC.Spread.Sheets.Sparklines.Sparkline} item The sparkline item.
  25849. * @returns {Array.<GC.Spread.Sheets.Sparklines.Sparkline>} The GC.Spread.Sheets.Sparklines.Sparkline array.
  25850. */
  25851. remove(item: GC.Spread.Sheets.Sparklines.Sparkline): GC.Spread.Sheets.Sparklines.Sparkline[];
  25852. }
  25853. export class SparklineSetting{
  25854. /**
  25855. * Creates the sparkline settings.
  25856. * @param {object} setting The settings.
  25857. * @class
  25858. */
  25859. constructor(setting?: GC.Spread.Sheets.Sparklines.ISparklineSetting);
  25860. /**
  25861. * Indicates the options for the sparkline.<br />
  25862. * options.axisColor {string} the color of the axis<br />
  25863. * options.firstMarkerColor {string} the color of the first data point for each sparkline in this sparkline group<br />
  25864. * options.highMarkerColor {string} the color of the highest data point for each sparkline in this sparkline group<br />
  25865. * options.lastMarkerColor {string} the color of the last data point for each sparkline in this sparkline group<br />
  25866. * options.lowMarkerColor {string} the color of the lowest data point for each sparkline in this sparkline group<br />
  25867. * options.markersColor {string} a value that specifies the color of the data markers for each sparkline in this sparkline group<br />
  25868. * options.negativeColor {string} a value that specifies the color of the negative data points for each sparkline in this sparkline group<br />
  25869. * options.seriesColor {string} a value that specifies the color for each sparkline in this sparkline group<br />
  25870. * options.displayEmptyCellsAs {GC.Spread.Sheets.Sparklines.EmptyValueStyle} Indicates how to display the empty cells<br />
  25871. * options.rightToLeft {boolean} Indicates whether each sparkline in the sparkline group is displayed in a right-to-left manner<br />
  25872. * options.displayHidden {boolean} Indicates whether data in hidden cells is plotted for the sparklines in this sparkline group<br />
  25873. * options.displayXAxis {boolean} Indicates whether the horizontal axis is displayed for each sparkline in this sparkline group<br />
  25874. * options.showFirst {boolean} a value that indicates whether the first data point is formatted differently for each sparkline in this sparkline group<br />
  25875. * options.showHigh {boolean} a value that specifies whether the data points with the highest value are formatted differently for each sparkline in this sparkline group<br />
  25876. * options.showLast {boolean} a value that indicates whether the last data point is formatted differently for each sparkline in this sparkline group<br />
  25877. * options.showLow {boolean} a value that specifies whether the data points with the lowest value are formatted differently for each sparkline in this sparkline group<br />
  25878. * options.showNegative {boolean} a value that specifies whether the negative data points are formatted differently for each sparkline in this sparkline group<br />
  25879. * options.showMarkers {boolean} a value that specifies whether data markers are displayed for each sparkline in this sparkline group<br />
  25880. * options.manualMax {number} Indicates the maximum for the vertical axis that is shared across all sparklines in this sparkline group. The axis is zero if maxAxisType does not equal custom<br />
  25881. * options.manualMin {number} Indicates the minimum for the vertical axis that is shared across all sparklines in this sparkline group. The axis is zero if minAxisType does not equal custom<br />
  25882. * options.maxAxisType {GC.Spread.Sheets.Sparklines.SparklineAxisMinMax} Indicates how the vertical axis maximum is calculated for the sparklines in this sparkline group<br />
  25883. * options.minAxisType {GC.Spread.Sheets.Sparklines.SparklineAxisMinMax} Indicates how the vertical axis minimum is calculated for the sparklines in this sparkline group<br />
  25884. * options.groupMaxValue {number} Gets the maximum value of the sparkline group<br />
  25885. * options.groupMinValue {number} Gets the minimum value of the sparkline group<br />
  25886. * options.lineWeight {number} Indicates the line weight for each sparkline in the sparkline group, where the line weight is measured in points. The weight must be greater than or equal to zero, and must be less than or equal to 3 (LineSeries only supports line weight values in the range of 0.0-3.0)
  25887. * @example
  25888. * var data = new GC.Spread.Sheets.Range(1, 0, 8, 1);
  25889. * var setting = new GC.Spread.Sheets.Sparklines.SparklineSetting();
  25890. * setting.options.showMarkers = true;
  25891. * setting.options.lineWeight = 3;
  25892. * setting.options.displayXAxis = true;
  25893. * setting.options.showFirst = true;
  25894. * setting.options.showLast = true;
  25895. * setting.options.showLow = true;
  25896. * setting.options.showHigh = true;
  25897. * setting.options.showNegative = true;
  25898. * setting.options.seriesColor = "Text 2 1";
  25899. * setting.options.firstMarkerColor = "Text 2 3";
  25900. * setting.options.negativeColor = "Accent 2 1";
  25901. * setting.options.markersColor = "Accent 3 1";
  25902. * setting.options.lowMarkerColor = "Accent 4 1";
  25903. * setting.options.highMarkerColor = "Accent 6 1";
  25904. * setting.options.lastMarkerColor = "Accent 6 6";
  25905. * setting.options.axisColor ="Text 1 1";
  25906. * sheet.addSpan(13, 0, 4, 3, null);
  25907. * sheet.setSparkline(13, 0, data, GC.Spread.Sheets.Sparklines.DataOrientation.Vertical, GC.Spread.Sheets.Sparklines.SparklineType.line, setting);
  25908. * sheet.setValue(1, 0, 1);
  25909. * sheet.setValue(2, 0, -2);
  25910. * sheet.setValue(3, 0, -1);
  25911. * sheet.setValue(4, 0, 6);
  25912. * sheet.setValue(5, 0, 4);
  25913. * sheet.setValue(6, 0, -4);
  25914. * sheet.setValue(7, 0, 3);
  25915. */
  25916. options: Object;
  25917. /**
  25918. * Clones sparkline settings.
  25919. * @returns {GC.Spread.Sheets.Sparklines.SparklineSetting} The cloned sparkline setting.
  25920. */
  25921. clone(): GC.Spread.Sheets.Sparklines.SparklineSetting;
  25922. }
  25923. export class SpreadSparkline extends SparklineEx{
  25924. /**
  25925. * Represents the class for the Spread sparkline.
  25926. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  25927. * @class
  25928. */
  25929. constructor();
  25930. }
  25931. export class StackedSparkline extends SparklineEx{
  25932. /**
  25933. * Represents the class for the stacked sparkline.
  25934. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  25935. * @class
  25936. */
  25937. constructor();
  25938. }
  25939. export class VariSparkline extends SparklineEx{
  25940. /**
  25941. * Represents the class for the variance sparkline.
  25942. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  25943. * @class
  25944. */
  25945. constructor();
  25946. }
  25947. export class VBarSparkline extends SparklineEx{
  25948. /**
  25949. * Represents the class for the Vbar sparkline.
  25950. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  25951. * @class
  25952. */
  25953. constructor();
  25954. }
  25955. export class WinlossSparkline extends SparklineEx{
  25956. /**
  25957. * Represents the class for the winloss sparkline.
  25958. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  25959. * @class
  25960. */
  25961. constructor();
  25962. }
  25963. export class YearSparkline extends SparklineEx{
  25964. /**
  25965. * Represents the class for the year sparkline.
  25966. * @extends GC.Spread.Sheets.Sparklines.SparklineEx
  25967. * @class
  25968. */
  25969. constructor();
  25970. }
  25971. }
  25972. module StatusBar{
  25973. export interface IStatusBarOptions{
  25974. items: GC.Spread.Sheets.StatusBar.StatusItem[];
  25975. }
  25976. export class StatusBar{
  25977. /**
  25978. * Represents status bar.
  25979. * @class
  25980. * @param {HTMLElement} host The DOM Element.
  25981. * @param {Object} [options]
  25982. * @param {Array<GC.Spread.Sheets.StatusBar.StatusItem>} [options.items] The array of StatusItem.
  25983. * @example
  25984. * let statusBar = new GC.Spread.Sheets.StatusBar.StatusBar(document.getElementById('statusBar'),
  25985. * {items: [new GC.Spread.Sheets.StatusBar.StatusItem('labelItem', {menuContent: 'label'})]});
  25986. */
  25987. constructor(host: HTMLElement, options?: GC.Spread.Sheets.StatusBar.IStatusBarOptions);
  25988. /**
  25989. * Add the item instance to the StatusBar.
  25990. * @param {GC.Spread.Sheets.StatusBar.StatusItem} item The instance of the child of StatusItem. The child extends from StatusItem.
  25991. * @param {number} position The position is items index in all items array. Start from 0. Items display position is also related to align. If position is invalid or undefine, place it by default.
  25992. * @returns {boolean} Add item result. Return true if add success, else failed.
  25993. * @example
  25994. * let StatusItem = GC.Spread.Sheets.StatusBar.StatusItem;
  25995. * let spanItem = new StatusItem('spanItemName', {menuContent: 'span', value: 'spanValue'});
  25996. * let spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
  25997. * let statusBar = new GC.Spread.Sheets.StatusBar.StatusBar(document.getElementById('statusBar'));
  25998. * statusBar.bind(spread);
  25999. * statusBar.add(spanItem);
  26000. */
  26001. add(item: GC.Spread.Sheets.StatusBar.StatusItem, position: number): boolean;
  26002. /**
  26003. * Get all item list.
  26004. * @return {Array.<GC.Spread.Sheets.StatusBar.StatusItem>} The item list on statusbar.
  26005. * @example
  26006. * let spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
  26007. * let statusBar = new GC.Spread.Sheets.StatusBar.StatusBar(document.getElementById('statusBar'));
  26008. * statusBar.bind(spread);
  26009. * let itemList = statusBar.all();
  26010. * statusBar.remove(itemList[0]);
  26011. */
  26012. all(): GC.Spread.Sheets.StatusBar.StatusItem[];
  26013. /**
  26014. * Bind the context of the StatusBar.
  26015. * @param {Object} context The context of the StatusBar. The context can trigger the status change of StatusBar. Here the context is the instance of GC.Spread.Sheets.Workbook.
  26016. * @example
  26017. * let spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
  26018. * let statusBar = new GC.Spread.Sheets.StatusBar.StatusBar(document.getElementById('statusBar'));
  26019. * statusBar.bind(spread);
  26020. */
  26021. bind(context: GC.Spread.Sheets.Workbook): void;
  26022. /**
  26023. * Dispose the StatusBar and unbind all events.
  26024. * @example
  26025. * let spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
  26026. * let statusBar = new GC.Spread.Sheets.StatusBar.StatusBar(document.getElementById('statusBar'));
  26027. * statusBar.bind(spread);
  26028. * // do something
  26029. * statusBar.dispose();
  26030. */
  26031. dispose(): void;
  26032. /**
  26033. * Get the item by item name.
  26034. * @param {string} itemName
  26035. * @returns {GC.Spread.Sheets.StatusBar.StatusItem} The StatusItem whose itemName is specified.
  26036. * @example
  26037. * let StatusItem = GC.Spread.Sheets.StatusBar.StatusItem;
  26038. * let spanItemName = 'spanItemName';
  26039. * let spanItem = new StatusItem(spanItemName, {menuContent: 'span', value: 'spanValue'});
  26040. * let spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
  26041. * let statusBar = new GC.Spread.Sheets.StatusBar.StatusBar(document.getElementById('statusBar'));
  26042. * statusBar.bind(spread);
  26043. * statusBar.add(spanItem);
  26044. * let spanItemInstance = statusBar.get(spanItemName);
  26045. */
  26046. get(itemName: string): GC.Spread.Sheets.StatusBar.StatusItem;
  26047. /**
  26048. * Remove the item from the StatusBar.
  26049. * @param {string} itemName The name of the StatusItem.
  26050. * @returns {boolean} If true means remove success, else failed.
  26051. * @example
  26052. * let StatusItem = GC.Spread.Sheets.StatusBar.StatusItem;
  26053. * let spanItemName = 'spanItemName';
  26054. * let spanItem = new StatusItem(spanItemName, {menuContent: 'span', value: 'spanValue'});
  26055. * let spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
  26056. * let statusBar = new GC.Spread.Sheets.StatusBar.StatusBar(document.getElementById('statusBar'));
  26057. * statusBar.bind(spread);
  26058. * statusBar.add(spanItem);
  26059. * // do something
  26060. * statusBar.remove(spanItemName);
  26061. */
  26062. remove(itemName: string): boolean;
  26063. /**
  26064. * Unbind the context of the StatusBar.
  26065. * @example
  26066. * let spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
  26067. * let statusBar = new GC.Spread.Sheets.StatusBar.StatusBar(document.getElementById('statusBar'));
  26068. * statusBar.bind(spread);
  26069. * // do something
  26070. * statusBar.unbind();
  26071. */
  26072. unbind(): void;
  26073. /**
  26074. * Update the StatusBar.
  26075. * @example
  26076. * let spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
  26077. * let statusBar = new GC.Spread.Sheets.StatusBar.StatusBar(document.getElementById('statusBar'));
  26078. * statusBar.update();
  26079. */
  26080. update(): void;
  26081. }
  26082. export class StatusItem{
  26083. /**
  26084. * The base class of status item provides basic value display and related context menu item function.
  26085. * @class
  26086. * @param {string} name - The name is the Unique identifier and needed in context menu and statusbar.
  26087. * @param {Object} options - The object of status item options.
  26088. * @param {string} [options.menuContent] - The menuContent displayed left on context menu which represent current item.
  26089. * @param {string} [options.align] - Control the item alignment on statusbar. The value is 'left' or 'right'.
  26090. * @param {string} [options.tipText] - The tip text displayed when mouse over the item. Show the description for the item.
  26091. * @param {boolean} [options.visible] - 1.The visibility of current item on statusbar. 2.The checked status of current item on context menu.
  26092. * @param {boolean} [options.showStatusInContexMenu] - Whether show the status on right of context menu.
  26093. * @param {Object} [options.value] - The value displayed on status bar and on right of context menu to represent the status of current item.
  26094. * @example
  26095. * let StatusItem = GC.Spread.Sheets.StatusBar.StatusItem;
  26096. * let labelItem = new StatusItem('labelItem', {menuContent: 'label', value: 'text'});
  26097. */
  26098. constructor(name: string, options?: Object);
  26099. /**
  26100. * Bind the Context. Can override to add context related event listener.
  26101. * @override
  26102. * @param {GC.Spread.Sheets.Workbook} context The excute context for the statusbar item.
  26103. * @example
  26104. * LabelItem.prototype.onBind = function (context) {
  26105. * // do something about context.
  26106. * }
  26107. */
  26108. onBind(context: GC.Spread.Sheets.Workbook): void;
  26109. /**
  26110. * Create the item element on statusbar. Can override for customize item.
  26111. * @override
  26112. * @param {HTMLElement} container
  26113. * @example
  26114. * let StatusItem = GC.Spread.Sheets.StatusBar.StatusItem;
  26115. * function LabelItem (name, options) {
  26116. * StatusItem.call(this, name, options);
  26117. * }
  26118. * LabelItem.prototype = new StatusItem();
  26119. * LabelItem.prototype.onCreateItemView = function (container) {
  26120. * let item = document.createElement('div');
  26121. * item.innerText = this.value;
  26122. * container.appendChild(item);
  26123. * // add event listener for container
  26124. * }
  26125. * statusBar.add(new LabelItem('labelItem', {menuContent: 'label', value: 'options test'}));
  26126. */
  26127. onCreateItemView(container: HTMLElement): void;
  26128. /**
  26129. * Dispose the statusbar to unbind context, remove all listener and dispose all element.
  26130. * @override
  26131. * @example
  26132. * let StatusItem = GC.Spread.Sheets.StatusBar.StatusItem;
  26133. * function LabelItem (name, options) {
  26134. * StatusItem.call(this, name, options);
  26135. * }
  26136. * LabelItem.prototype = new StatusItem();
  26137. * LabelItem.prototype.onDispose = function () {
  26138. * // dispose current item.
  26139. * // then call super dispose.
  26140. * StatusItem.prototype.onDispose.call(this);
  26141. * }
  26142. */
  26143. onDispose(): void;
  26144. /**
  26145. * Unbind the Context. Can override to remove context related event listener.
  26146. * @override
  26147. * @example
  26148. * LabelItem.prototype.onUnbind = function () {
  26149. * // remove event listener related to context.
  26150. * }
  26151. */
  26152. onUnbind(): void;
  26153. /**
  26154. * The callback for status bar update. Called when status bar bind or update function, or status bar check changed in context menu.
  26155. * The update related operations can realize in it. Users also should call onUpdate when current item need update.
  26156. * The default operations in super is update current item by visible.
  26157. * @override
  26158. * @example
  26159. * let StatusItem = GC.Spread.Sheets.StatusBar.StatusItem;
  26160. * function LabelItem (name, options) {
  26161. * StatusItem.call(this, name, options);
  26162. * }
  26163. * LabelItem.prototype = new StatusItem();
  26164. * LabelItem.prototype.onUpdate = function () {
  26165. * StatusItem.prototype.onUpdate.call(this);
  26166. * // update item.
  26167. */
  26168. onUpdate(): void;
  26169. }
  26170. }
  26171. module Tables{
  26172. export interface IRowState{
  26173. row: number;
  26174. item?: any;
  26175. originalItem?: any;
  26176. }
  26177. /**
  26178. * Specifies what data is kept when removing the table.
  26179. * @enum {number}
  26180. * @example
  26181. * activeSheet.tables.add("Table1", 0, 0, 3, 3, GC.Spread.Sheets.Tables.TableThemes.dark1);
  26182. * activeSheet.getCell(0,0).text("Name");
  26183. * activeSheet.getCell(0,1).text("Value");
  26184. * activeSheet.getCell(0,2).text("T/F");
  26185. * activeSheet.getCell(1,0).text("AW");
  26186. * activeSheet.getCell(1,1).text("5");
  26187. * activeSheet.getCell(1,2).text("T");
  26188. * //button click
  26189. * $("#button1").click(function () {
  26190. * var table = activeSheet.tables.find(0,0);
  26191. * activeSheet.tables.remove(table, GC.Spread.Sheets.Tables.TableRemoveOptions.keepData);
  26192. * });
  26193. */
  26194. export enum TableRemoveOptions{
  26195. /**
  26196. * Removes data and styles.
  26197. */
  26198. none= 0,
  26199. /**
  26200. * Keeps values.
  26201. */
  26202. keepData= 1,
  26203. /**
  26204. * Keeps styles.
  26205. */
  26206. keepStyle= 2
  26207. }
  26208. export class Table{
  26209. /**
  26210. * Represents a table that can be added in a sheet.
  26211. * @class
  26212. * @param {string} name The table name.
  26213. * @param {number} row The table row index.
  26214. * @param {number} col The table column index.
  26215. * @param {number} rowCount The table row count.
  26216. * @param {number} colCount The table column count.
  26217. * @param {GC.Spread.Sheets.Tables.TableTheme} style The table style.
  26218. * @param {Object} options The initialization options of the table.
  26219. * @param {boolean} [options.showHeader] - Whether to display a header.
  26220. * @param {boolean} [options.showFooter] - Whether to display a footer.
  26221. * @param {boolean} [options.useFooterDropDownList] - whether to use the footer dropdown list for a total row.
  26222. * @param {boolean} [options.showResizeHandle] - Whether to display the resize handle for table.
  26223. */
  26224. constructor(name?: string, row?: number, col?: number, rowCount?: number, colCount?: number, style?: GC.Spread.Sheets.Tables.TableTheme);
  26225. /**
  26226. * Gets or sets the allowAutoExpandState of the table.
  26227. * @param {boolean} [allowAutoExpandState] The allowAutoExpandState of the table.
  26228. * @returns {boolean|GC.Spread.Sheets.Tables.Table} If there is no allowAutoExpandState set, returns the table allowAutoExpandState; otherwise, returns the table.
  26229. * @example
  26230. * table.allowAutoExpand();
  26231. * table.allowAutoExpand(true);
  26232. */
  26233. allowAutoExpand(allowAutoExpandState?: boolean): boolean | GC.Spread.Sheets.Tables.Table;
  26234. /**
  26235. * Gets or sets whether to generate columns automatically while binding to a data source.
  26236. * @param {boolean} value Whether to generate columns automatically while binding to a data source.
  26237. * @returns {boolean | GC.Spread.Sheets.Tables.Table} If no value is set, returns whether to generate columns automatically while binding to a data source; otherwise, returns the table.
  26238. */
  26239. autoGenerateColumns(value?: boolean): any;
  26240. /**
  26241. * Gets or sets a value that indicates whether to display an alternating column style.
  26242. * @param {boolean} value Whether to display an alternating column style.
  26243. * @returns {boolean | GC.Spread.Sheets.Tables.Table} If no value is set, returns whether to display an alternating column style; otherwise, returns the table.
  26244. * @example
  26245. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableThemes.medium2);
  26246. * sTable.bandColumns(true);
  26247. * sTable.bandRows(true);
  26248. */
  26249. bandColumns(value?: boolean): any;
  26250. /**
  26251. * Gets or sets a value that indicates whether to display an alternating row style.
  26252. * @param {boolean} value Whether to display an alternating row style.
  26253. * @returns {boolean | GC.Spread.Sheets.Tables.Table} If no value is set, returns whether to display an alternating row style; otherwise, returns the table.
  26254. * @example
  26255. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableThemes.medium2);
  26256. * sTable.bandColumns(true);
  26257. * sTable.bandRows(true);
  26258. */
  26259. bandRows(value?: boolean): any;
  26260. /**
  26261. * Gets or sets the dataSource and binding columns and path for the table.
  26262. * @param {Array} columns The array of table column information with data fields and names. Each item is GC.Spread.Sheets.Tables.TableColumn.
  26263. * @param {string} value The binding path for binding in the table.
  26264. * @param {object} dataSource The data source for the table.
  26265. * @returns {GC.Spread.Sheets.Tables.Table} returns the table.
  26266. */
  26267. bind(columns: TableColumn[], path?: string, dataSource?: object): GC.Spread.Sheets.Tables.Table;
  26268. /**
  26269. * Binds the columns using the specified data fields.
  26270. * @param {Array.<GC.Spread.Sheets.Tables.TableColumn>} columns The array of table column information with data fields and names. Each item is GC.Spread.Sheets.Tables.TableColumn.
  26271. */
  26272. bindColumns(columns: GC.Spread.Sheets.Tables.TableColumn[]): void;
  26273. /**
  26274. * Gets or sets the binding path for cell-level binding in the table.
  26275. * @param {string} value The binding path for cell-level binding in the table.
  26276. * @returns {string | GC.Spread.Sheets.Tables.Table} If no value is set, returns the binding path for cell-level binding in the table; otherwise, returns the table.
  26277. */
  26278. bindingPath(value?: string): any;
  26279. /**
  26280. * Gets the cell range for the table data area.
  26281. * @returns {GC.Spread.Sheets.Range} The table data range.
  26282. * @example
  26283. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableTheme.medium2);
  26284. * var drange = sTable.dataRange();
  26285. * alert(drange.row);
  26286. */
  26287. dataRange(): GC.Spread.Sheets.Range;
  26288. /**
  26289. * Delete count number columns in the table at the specified table col index.
  26290. * @param {number} col The index of the first column to delete, based on table index.
  26291. * @param {number} count The number of columns to delete.
  26292. * @returns {void}
  26293. * @example
  26294. * var table = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableTheme.medium2);
  26295. * table.deleteColumns(3, 1);
  26296. */
  26297. deleteColumns(col: number, count: number): void;
  26298. /**
  26299. * Deletes the rows in this table at the specified table row index.
  26300. * @param {number} row The index of the first row to delete, based on table index.
  26301. * @param {number} count The number of rows to delete.
  26302. * @returns {void}
  26303. * @example
  26304. * var table = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableTheme.medium2);
  26305. * table.deleteRows(3, 1);
  26306. */
  26307. deleteRows(row: number, count: number): void;
  26308. /**
  26309. * Gets or sets whether the table column's filter button is displayed.
  26310. * @param {number} tableColumnIndex The table column index of the filter button.
  26311. * @param {boolean} value Whether the table column's filter button is displayed.
  26312. * @returns {boolean | GC.Spread.Sheets.Tables.Table} The table column's filter button display state.
  26313. * If no parameter is set, returns <c>false</c> if all filter buttons are invisible, otherwise, <c>true</c>.
  26314. * If only a number is set, returns whether the specified table column' filter button is displayed.
  26315. * If only a boolean that indicates whether to display filter buttons is set, applies to all filter buttons and returns the table.
  26316. * If two parameters are provided, applies to the specified table columns' filter button and returns the table.
  26317. * @example
  26318. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableTheme.medium2);
  26319. * sTable.bandColumns(true);
  26320. * sTable.bandRows(true);
  26321. * sTable.filterButtonVisible(2, false);
  26322. * alert(sTable.filterButtonVisible(2));
  26323. */
  26324. filterButtonVisible(tableColumnIndex?: number, value?: boolean): any;
  26325. /**
  26326. * Gets the footer index in the sheet.
  26327. * @returns {number} The footer index.
  26328. * @example
  26329. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableTheme.medium2);
  26330. * sTable.showFooter(true);
  26331. * sTable.setColumnName(4, "SUM");
  26332. * //set footer value
  26333. * sTable.setColumnValue(0, "Total");
  26334. * //set footer formula
  26335. * sTable.setColumnFormula(4, "SUM(F3:F11)");
  26336. * var value = sTable.footerIndex();
  26337. * alert(value);
  26338. */
  26339. footerIndex(): number;
  26340. /**
  26341. * Gets the table footer formula with the specified index.
  26342. * @param {number} tableColumnIndex The column index of the table footer. The index is zero-based.
  26343. * @returns {string} The table footer formula.
  26344. * @example
  26345. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableTheme.medium2);
  26346. * sTable.showFooter(true);
  26347. * //set footer value
  26348. * sTable.setColumnValue(0, "Total");
  26349. * //set footer formula
  26350. * sTable.setColumnFormula(4, "SUM(F3:F11)");
  26351. * var value = sTable.getColumnFormula(4);
  26352. * alert(value);
  26353. */
  26354. getColumnFormula(tableColumnIndex: number): string;
  26355. /**
  26356. * Gets the table header text with the specified table index.
  26357. * @param {number} tableColumnIndex The column index of the table header. The index is zero-based.
  26358. * @returns {string} The header text of the specified column by index.
  26359. * @example
  26360. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableTheme.medium2);
  26361. * sTable.showFooter(true);
  26362. * sTable.setColumnName(4, "SUM");
  26363. * //set footer value
  26364. * sTable.setColumnValue(0, "Total");
  26365. * //set footer formula
  26366. * sTable.setColumnFormula(4, "SUM(F3:F11)");
  26367. * var value = sTable.getColumnName(4);
  26368. * alert(value);
  26369. */
  26370. getColumnName(tableColumnIndex: number): string;
  26371. /**
  26372. * Gets the table footer value with the specified index.
  26373. * @param {number} tableColumnIndex The column index of the table footer. The index is zero-based.
  26374. * @returns {string} The table footer value.
  26375. * @example
  26376. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableTheme.medium2);
  26377. * sTable.showFooter(true);
  26378. * //set footer value
  26379. * sTable.setColumnValue(0, "Total");
  26380. * //set footer formula
  26381. * sTable.setColumnFormula(4, "SUM(F3:F11)");
  26382. * var value = sTable.getColumnValue(0);
  26383. * alert(value);
  26384. */
  26385. getColumnValue(tableColumnIndex: number): string;
  26386. /**
  26387. * Get array of dirty rows.
  26388. * @returns {Array.<Object>} The dirty rows collection. The item in array contains three properties, row: specifies table row index, item: specifies data item of current row, originalItem: specifies original data item of the row.
  26389. */
  26390. getDirtyRows(): GC.Spread.Sheets.Tables.IRowState[];
  26391. /**
  26392. * Gets the header index in the sheet.
  26393. * @returns {number} The header index.
  26394. * @example
  26395. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableTheme.medium2);
  26396. * var hindex = sTable.headerIndex();
  26397. * alert(hindex);
  26398. */
  26399. headerIndex(): number;
  26400. /**
  26401. * Gets or sets a value that indicates whether to highlight the first column.
  26402. * @param {boolean} value Whether to highlight the first column.
  26403. * @returns {boolean | GC.Spread.Sheets.Tables.Table} If no value is set, returns whether to highlight the first column; otherwise, returns the table.
  26404. * @example
  26405. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableThemes.medium2);
  26406. * sTable.highlightFirstColumn(true);
  26407. * sTable.highlightLastColumn(true);
  26408. */
  26409. highlightFirstColumn(value?: boolean): any;
  26410. /**
  26411. * Gets or sets a value that indicates whether to highlight the last column.
  26412. * @param {boolean} value Whether to highlight the last column.
  26413. * @returns {boolean | GC.Spread.Sheets.Tables.Table} If no value is set, returns whether to highlight the last column; otherwise, returns the table.
  26414. * @example
  26415. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableThemes.medium2);
  26416. * sTable.highlightFirstColumn(true);
  26417. * sTable.highlightLastColumn(true);
  26418. */
  26419. highlightLastColumn(value?: boolean): any;
  26420. /**
  26421. * Insert count number columns in this table before the specified table col index.
  26422. * @param {number} col Column index at which to add the new columns, based on table index.
  26423. * @param {number} count The number of columns to add.
  26424. * @param {boolean} isInsertAfter Whether insert columns before the specified column index or after. By default, insert before.
  26425. * @returns {void}
  26426. * @example
  26427. * var table = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableTheme.medium2);
  26428. * table.insertColumns(3, 1);
  26429. */
  26430. insertColumns(col: number, count: number, isInsertAfter?: boolean): void;
  26431. /**
  26432. * Insert rows in this table before the specified table row index.
  26433. * @param {number} row The index of the starting row to insert, based on table index.
  26434. * @param {number} count The number of rows to add.
  26435. * @param {boolean} isInsertAfter Whether insert rows before the specified row index or after. By default, insert before.
  26436. * @returns {void}
  26437. * @example
  26438. * var table = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableTheme.medium2);
  26439. * table.insertRows(3, 1);
  26440. */
  26441. insertRows(row: number, count: number, isInsertAfter?: boolean): void;
  26442. /**
  26443. * Gets or sets the table name.
  26444. * @param {string} value The table name.
  26445. * @returns {string | GC.Spread.Sheets.Tables.Table} If no value is set, returns the table name; otherwise, returns the table.
  26446. * @example
  26447. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableTheme.medium2);
  26448. * var tname = sTable.name();
  26449. * alert(tname);
  26450. */
  26451. name(value?: string): any;
  26452. /**
  26453. * Gets the range for the entire table.
  26454. * @returns {GC.Spread.Sheets.Range} The whole table range.
  26455. * @example
  26456. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableTheme.medium2);
  26457. * var drange = sTable.range();
  26458. * alert(drange.row);
  26459. */
  26460. range(): GC.Spread.Sheets.Range;
  26461. /**
  26462. * Gets the row filter for the table.
  26463. * @returns {GC.Spread.Sheets.Filter.HideRowFilter} The row filter.
  26464. */
  26465. rowFilter(): GC.Spread.Sheets.Filter.HideRowFilter;
  26466. /**
  26467. * Sets a formula to the table's data range with the specified index.
  26468. * @param {number} tableColumnIndex The column index of the table. The index is zero-based.
  26469. * @param {string} formula The data range formula.
  26470. * @returns {GC.Spread.Sheets.Tables.Table} The table.
  26471. * @example
  26472. * //This example uses a structured reference formula in the table.
  26473. * activeSheet.tables.add("Table1", 0, 0, 4, 3, GC.Spread.Sheets.Tables.TableTheme.dark1);
  26474. * activeSheet.getCell(0,0).text("Value1");
  26475. * activeSheet.getCell(0,1).text("Value2");
  26476. * activeSheet.getCell(0,2).text("Total");
  26477. * activeSheet.getCell(1,0).text("1");
  26478. * activeSheet.getCell(2,0).text("2");
  26479. * activeSheet.getCell(3,0).text("3");
  26480. * activeSheet.getCell(1,1).text("5");
  26481. * activeSheet.getCell(2,1).text("5");
  26482. * activeSheet.getCell(3,1).text("5");
  26483. * activeSheet.tables.findByName("Table1").setColumnDataFormula(2, "=[Value1]*[Value2]");
  26484. */
  26485. setColumnDataFormula(tableColumnIndex: number, formula: string): GC.Spread.Sheets.Tables.Table;
  26486. /**
  26487. * Sets the table footer formula with the specified index.
  26488. * @param {number} tableColumnIndex The column index of the table footer. The index is zero-based.
  26489. * @param {string} formula The table footer formula.
  26490. * @returns {GC.Spread.Sheets.Tables.Table} The table.
  26491. * @example
  26492. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableThemes.medium2);
  26493. * sTable.showFooter(true);
  26494. * //set footer value
  26495. * sTable.setColumnValue(0, "Total");
  26496. * //set footer formula
  26497. * sTable.setColumnFormula(4, "SUM(F3:F11)");
  26498. */
  26499. setColumnFormula(tableColumnIndex: number, formula: string): GC.Spread.Sheets.Tables.Table;
  26500. /**
  26501. * Sets the table header text with the specified table index.
  26502. * @param {number} tableColumnIndex The column index of the table header. The index is zero-based.
  26503. * @param {string} name The header text.
  26504. * @returns {GC.Spread.Sheets.Tables.Table} The table.
  26505. * @example
  26506. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableThemes.medium2);
  26507. * sTable.showFooter(true);
  26508. * sTable.setColumnName(4, "SUM");
  26509. * //set footer value
  26510. * sTable.setColumnValue(0, "Total");
  26511. * //set footer formula
  26512. * sTable.setColumnFormula(4, "SUM(F3:F11)");
  26513. */
  26514. setColumnName(tableColumnIndex: number, name: string): GC.Spread.Sheets.Tables.Table;
  26515. /**
  26516. * Sets the table footer value with the specified index.
  26517. * @param {number} tableColumnIndex The column index of the table footer. The index is zero-based.
  26518. * @param {Object} value The table footer value.
  26519. * @returns {GC.Spread.Sheets.Tables.Table} The table.
  26520. * @example
  26521. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableThemes.medium2);
  26522. * sTable.showFooter(true);
  26523. * //set footer value
  26524. * sTable.setColumnValue(0, "Total");
  26525. * //set footer formula
  26526. * sTable.setColumnFormula(4, "SUM(F3:F11)");
  26527. */
  26528. setColumnValue(tableColumnIndex: number, value: Object): GC.Spread.Sheets.Tables.Table;
  26529. /**
  26530. * Gets or sets a value that indicates whether to display a footer.
  26531. * @param {boolean} value Whether to display a footer.
  26532. * @param {boolean} isFooterInserted value decide the way of adding footer, whether insert total row or just override the next row. Remove footer is same.
  26533. * @returns {boolean | GC.Spread.Sheets.Tables.Table} If no value is set, returns whether to display a footer; otherwise, returns the table.
  26534. * @example
  26535. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableThemes.medium2);
  26536. * sTable.showFooter(true);
  26537. * //set footer value
  26538. * sTable.setColumnValue(0, "Total");
  26539. * //set footer formula
  26540. * sTable.setColumnFormula(4, "SUM(F3:F11)");
  26541. */
  26542. showFooter(value?: boolean, isFooterInserted?: boolean): any;
  26543. /**
  26544. * Gets or sets a value that indicates whether to display a header.
  26545. * @param {boolean} value Whether to display a header.
  26546. * @returns {boolean | GC.Spread.Sheets.Tables.Table} If no value is set, returns whether to display a header; otherwise, returns the table.
  26547. * @example
  26548. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableThemes.medium2);
  26549. * sTable.showHeader(true);
  26550. */
  26551. showHeader(value?: boolean): any;
  26552. /**
  26553. * Gets or sets a value that indicates whether to display the resize handle for table.
  26554. * @param {boolean} value Whether to display the resize handle for table.
  26555. * @returns {boolean | GC.Spread.Sheets.Tables.Table} If no value is set, returns whether to display the resize handle for table, by default is false; otherwise, returns the table.
  26556. * @example
  26557. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableThemes.medium2);
  26558. * sTable.showResizeHandle(true);
  26559. */
  26560. showResizeHandle(value?: boolean): any;
  26561. /**
  26562. * Gets or sets a style for the table.
  26563. * @param {GC.Spread.Sheets.Tables.TableTheme} value The style for the table.
  26564. * @returns {GC.Spread.Sheets.Tables.TableTheme | GC.Spread.Sheets.Tables.Table} If no value is set, returns the table style; otherwise, returns the table.
  26565. */
  26566. style(value?: GC.Spread.Sheets.Tables.TableTheme): any;
  26567. /**
  26568. * Gets or sets a value that indicates whether to use the footer dropdown list for a total row.
  26569. * @param {boolean} value Whether to use the footer dropdown list.
  26570. * @returns {boolean | GC.Spread.Sheets.Tables.Table} If no value is set, returns whether to use the footer dropdown list for a total row, by default is false; otherwise, returns the table.
  26571. * @example
  26572. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableThemes.medium2);
  26573. * sTable.useFooterDropDownList(true);
  26574. */
  26575. useFooterDropDownList(value?: boolean): any;
  26576. }
  26577. export class TableColumn{
  26578. /**
  26579. * Represents the table column information.
  26580. * @class
  26581. * @param {number} id The table column ID.
  26582. * @param {string} dataField The table column data field.
  26583. * @param {string} name The table column name.
  26584. * @param {string} formatter The table column formatter.
  26585. * @param {GC.Spread.Sheets.CellTypes.Base} cellType The table column cellType.
  26586. * @param {Function} value The table column value convert function.
  26587. */
  26588. constructor(id: number, dataField?: string, name?: string, formatter?: string, cellType?: GC.Spread.Sheets.CellTypes.Base, value?: Function);
  26589. /**
  26590. * Gets or sets the table column cellType for custom cell type.
  26591. * @param {GC.Spread.Sheets.CellTypes.Base} value The table column cellType.
  26592. * @returns {GC.Spread.Sheets.CellTypes.Base | GC.Spread.Sheets.Tables.TableColumn} If no value is set, returns the table column cellType; otherwise, returns the table column.
  26593. */
  26594. cellType(value?: GC.Spread.Sheets.CellTypes.Base): any;
  26595. /**
  26596. * Gets or sets the table column data field for accessing the table's data source.
  26597. * @param {string} value The table column data field.
  26598. * @returns {string | GC.Spread.Sheets.Tables.TableColumn} If no value is set, returns the table column data field; otherwise, returns the table column.
  26599. */
  26600. dataField(value?: string): any;
  26601. /**
  26602. * Gets or sets the table column formatter for format display value.
  26603. * @param {string} value The table column formatter.
  26604. * @returns {string | GC.Spread.Sheets.Tables.TableColumn} If no value is set, returns the table column formatter; otherwise, returns the table column.
  26605. */
  26606. formatter(value?: string): any;
  26607. /**
  26608. * Gets or sets the table column ID.
  26609. * @param {number} value The table column ID.
  26610. * @returns {number | GC.Spread.Sheets.Tables.TableColumn} If no value is set, returns the table column ID; otherwise, returns the table column.
  26611. */
  26612. id(value?: number): any;
  26613. /**
  26614. * Gets or sets the table column name for display.
  26615. * @param {string} value The table column name.
  26616. * @returns {string | GC.Spread.Sheets.Tables.TableColumn} If no value is set, returns the table column name; otherwise, returns the table column.
  26617. */
  26618. name(value?: string): any;
  26619. /**
  26620. * Gets or sets the table column value convert function for display value.
  26621. * @param {Function} value The table column value convert function.
  26622. * @returns {Function | GC.Spread.Sheets.Tables.TableColumn} If no value is set, returns the table column value convert function; otherwise, returns the table column.
  26623. */
  26624. value(value?: Function): Function;
  26625. }
  26626. export class TableManager{
  26627. /**
  26628. * Represents a table manager that can manage all tables in a sheet.
  26629. * @class
  26630. * @param {GC.Spread.Sheets.Worksheet} sheet The worksheet.
  26631. */
  26632. constructor(sheet: GC.Spread.Sheets.Worksheet);
  26633. /**
  26634. * Adds a range table with a specified size to the sheet.
  26635. * @param {string} name The table name.
  26636. * @param {number} row The row index.
  26637. * @param {number} column The column index.
  26638. * @param {number} rowCount The row count of the table.
  26639. * @param {number} columnCount The column count of the table.
  26640. * @param {GC.Spread.Sheets.Tables.TableTheme} style The style of the table.
  26641. * @param {Object} options The initialization options of the table.
  26642. * @param {boolean} [options.showHeader] - Whether to display a header.
  26643. * @param {boolean} [options.showFooter] - Whether to display a footer.
  26644. * @returns {GC.Spread.Sheets.Tables.Table} The new table instance.
  26645. * @example
  26646. * //This example adds a table.
  26647. * activeSheet.tables.add("Table1", 0, 0, 3, 3, GC.Spread.Sheets.Tables.TableThemes.dark1);
  26648. * activeSheet.getCell(0,0).text("Name");
  26649. * activeSheet.getCell(0,1).text("Value");
  26650. * activeSheet.getCell(0,2).text("T/F");
  26651. * activeSheet.getCell(1,0).text("AW");
  26652. * activeSheet.getCell(1,1).text("5");
  26653. * activeSheet.getCell(1,2).text("T");
  26654. */
  26655. add(name?: string, row?: number, column?: number, rowCount?: number, columnCount?: number, style?: GC.Spread.Sheets.Tables.TableTheme): GC.Spread.Sheets.Tables.Table;
  26656. /**
  26657. * Adds a range table with a specified data source to the sheet.
  26658. * @param {string} name The table name.
  26659. * @param {number} row The row index.
  26660. * @param {number} column The column index.
  26661. * @param {object} dataSource The data source for the table.
  26662. * @param {GC.Spread.Sheets.Tables.TableTheme} style The style of the table.
  26663. * @param {Object} options The initialization options of the table.
  26664. * @param {boolean} [options.showHeader] - Whether to display a header.
  26665. * @param {boolean} [options.showFooter] - boolean Whether to display a footer.
  26666. * @returns {GC.Spread.Sheets.Tables.Table} The new table instance.
  26667. * @example
  26668. * var source = [
  26669. * { LastName: "Freehafer", FirstName: "Nancy", Title: "Sales Representative", Phone: "(123)555-0100"},
  26670. * { LastName: "Cencini", FirstName: "Andrew", Title: "Vice President, Sales", Phone: "(123)555-0101"},
  26671. * { LastName: "Kotas", FirstName: "Jan", Title: "Sales Representative", Phone: "(123)555-0102"},
  26672. * { LastName: "Sergienko", FirstName: "Mariya", Title: "Sales Representative", Phone: "(123)555-0103"},
  26673. * ];
  26674. * activeSheet.tables.addFromDataSource("Table1", 5, 2, source, GC.Spread.Sheets.Tables.TableThemes.dark1);
  26675. */
  26676. addFromDataSource(name: string, row: number, column: number, dataSource: Object, style: GC.Spread.Sheets.Tables.TableTheme): GC.Spread.Sheets.Tables.Table;
  26677. /**
  26678. * Gets all tables of the sheet.
  26679. * @returns {Array.<GC.Spread.Sheets.Tables.Table>} The GC.Spread.Sheets.Tables.Table array of table instances. The array is never null.
  26680. */
  26681. all(): GC.Spread.Sheets.Tables.Table[];
  26682. /**
  26683. * Gets the table of the specified cell.
  26684. * @param {number} row The row index.
  26685. * @param {number} column The column index.
  26686. * @returns {GC.Spread.Sheets.Tables.Table} The table instance if the cell belongs to a table; otherwise, <c>null</c>.
  26687. * @example
  26688. * //This example uses the find method.
  26689. * activeSheet.tables.add("Table1", 0, 0, 3, 3, GC.Spread.Sheets.Tables.TableThemes.dark1);
  26690. * activeSheet.getCell(0,0).text("Name");
  26691. * activeSheet.getCell(0,1).text("Value");
  26692. * activeSheet.getCell(0,2).text("T/F");
  26693. * activeSheet.getCell(1,0).text("AW");
  26694. * activeSheet.getCell(1,1).text("5");
  26695. * activeSheet.getCell(1,2).text("T");
  26696. * //button click
  26697. * $("#button1").click(function () {
  26698. * var table = activeSheet.tables.find(0,0);
  26699. * activeSheet.tables.move(table, 3, 3);
  26700. * });
  26701. */
  26702. find(row: number, column: number): GC.Spread.Sheets.Tables.Table;
  26703. /**
  26704. * Gets the table with a specified name.
  26705. * @param {string} name The table name.
  26706. * @returns {GC.Spread.Sheets.Tables.Table} The table instance if the cell belongs to a table; otherwise, <c>null</c>.
  26707. * @example
  26708. * //This example finds the table by name.
  26709. * var activeSheet = spread.getActiveSheet();
  26710. * activeSheet.tables.add("Table1", 0, 0, 3, 3, GC.Spread.Sheets.Tables.TableThemes.dark1);
  26711. * activeSheet.getCell(0,0).text("Name");
  26712. * activeSheet.getCell(0,1).text("Value");
  26713. * activeSheet.getCell(0,2).text("T/F");
  26714. * activeSheet.getCell(1,0).text("AW");
  26715. * activeSheet.getCell(1,1).text("5");
  26716. * activeSheet.getCell(1,2).text("T");
  26717. * // button click
  26718. * $("#button1").click(function () {
  26719. * var table = activeSheet.tables.findByName("Table1");
  26720. * alert(table);
  26721. * activeSheet.tables.move(table, 3, 3);
  26722. * });
  26723. */
  26724. findByName(name: string): GC.Spread.Sheets.Tables.Table;
  26725. /**
  26726. * Changes the table location.
  26727. * @param {GC.Spread.Sheets.Tables.Table|string} table The table instance or the table name.
  26728. * @param {number} row The new row index.
  26729. * @param {number} column The new column index.
  26730. * @example
  26731. * var activeSheet = spread.getActiveSheet();
  26732. * activeSheet.tables.add("Table1", 0, 0, 3, 3, GC.Spread.Sheets.Tables.TableThemes.dark1);
  26733. * activeSheet.getCell(0,0).text("Name");
  26734. * activeSheet.getCell(0,1).text("Value");
  26735. * activeSheet.getCell(0,2).text("T/F");
  26736. * activeSheet.getCell(1,0).text("AW");
  26737. * activeSheet.getCell(1,1).text("5");
  26738. * activeSheet.getCell(1,2).text("T");
  26739. * // button click
  26740. * $("#button1").click(function () {
  26741. * var table = activeSheet.tables.findByName("Table1");
  26742. * alert(table);
  26743. * activeSheet.tables.move(table, 3, 3);
  26744. * });
  26745. */
  26746. move(table: GC.Spread.Sheets.Tables.Table|string, row: number, column: number): void;
  26747. /**
  26748. * Removes a specified table.
  26749. * @param {GC.Spread.Sheets.Tables.Table|string} table The table instance or the table name.
  26750. * @param {GC.Spread.Sheets.Tables.TableRemoveOptions} options Specifies what data is kept when removing the table.
  26751. * @param {number} [options.none] Remove table, keep nothing.
  26752. * @param {number} [options.keepData] Remove table, keep table data.
  26753. * @param {number} [options.keepStyle] Remove table, keep table style.
  26754. * @returns {GC.Spread.Sheets.Tables.Table}
  26755. * @example
  26756. * var table = activeSheet.tables.find(0,0);
  26757. * activeSheet.tables.remove(table, GC.Spread.Sheets.Tables.TableRemoveOptions.keepData);
  26758. */
  26759. remove(table: GC.Spread.Sheets.Tables.Table, options: GC.Spread.Sheets.Tables.TableRemoveOptions): GC.Spread.Sheets.Tables.Table;
  26760. /**
  26761. * Changes the table size.
  26762. * @param {GC.Spread.Sheets.Tables.Table|string} table The table or the table name.
  26763. * @param {GC.Spread.Sheets.Range} range The new table range. The headers must remain in the same row, and the resulting table range must overlap the original table range.
  26764. * @example
  26765. * //This example resizes the table.
  26766. * activeSheet.tables.add("Table1", 0, 0, 3, 3, GC.Spread.Sheets.Tables.TableThemes.dark1);
  26767. * activeSheet.getCell(0,0).text("Name");
  26768. * activeSheet.getCell(0,1).text("Value");
  26769. * activeSheet.getCell(0,2).text("T/F");
  26770. * activeSheet.getCell(1,0).text("AW");
  26771. * activeSheet.getCell(1,1).text("5");
  26772. * activeSheet.getCell(1,2).text("T");
  26773. * //button click
  26774. * $("#button1").click(function () {
  26775. * var table = activeSheet.tables.find(0,0);
  26776. * activeSheet.tables.resize(table, new GC.Spread.Sheets.Range(0,0,4,4));
  26777. * });
  26778. */
  26779. resize(table: GC.Spread.Sheets.Tables.Table | string, range: GC.Spread.Sheets.Range): void;
  26780. }
  26781. export class TableStyle{
  26782. /**
  26783. * Represents table style information.
  26784. * @class
  26785. * @param {string} backColor The background color of the table.
  26786. * @param {string} foreColor The foreground color of the table.
  26787. * @param {string} font The font.
  26788. * @param {GC.Spread.Sheets.LineBorder} borderLeft The left border line of the table.
  26789. * @param {GC.Spread.Sheets.LineBorder} borderTop The top border line of the table.
  26790. * @param {GC.Spread.Sheets.LineBorder} borderRight The right border line of the table.
  26791. * @param {GC.Spread.Sheets.LineBorder} borderBottom The bottom border line of the table.
  26792. * @param {GC.Spread.Sheets.LineBorder} borderHorizontal The horizontal border line of the table.
  26793. * @param {GC.Spread.Sheets.LineBorder} borderVertical The vertical border line of the table.
  26794. * @param {GC.Spread.Sheets.TextDecorationType} textDecoration The text decoration of the table.
  26795. * @example
  26796. * //This example creates a table.
  26797. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  26798. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  26799. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  26800. * var tableStyleInfo = new GC.Spread.Sheets.Tables.TableStyle(
  26801. * "black",
  26802. * "white",
  26803. * "bold 11pt arial",
  26804. * new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin),
  26805. * new GC.Spread.Sheets.LineBorder("red", GC.Spread.Sheets.LineStyle.thick),
  26806. * new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.thin),
  26807. * new GC.Spread.Sheets.LineBorder("blue", GC.Spread.Sheets.LineStyle.thick));
  26808. * tableStyle.headerRowStyle(tableStyleInfo);
  26809. * var table = activeSheet.tables.add("table1", 1, 1, 5, 5, tableStyle);
  26810. */
  26811. constructor(backColor?: string, foreColor?: string, font?: string, borderLeft?: GC.Spread.Sheets.LineBorder, borderTop?: GC.Spread.Sheets.LineBorder, borderRight?: GC.Spread.Sheets.LineBorder, borderBottom?: GC.Spread.Sheets.LineBorder, borderHorizontal?: GC.Spread.Sheets.LineBorder, borderVertical?: GC.Spread.Sheets.LineBorder, textDecoration?: GC.Spread.Sheets.TextDecorationType);
  26812. /**
  26813. * Indicates the background color.
  26814. * @type {string}
  26815. * @example
  26816. * //This example creates a table.
  26817. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  26818. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  26819. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  26820. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  26821. * tStyleInfo.backColor = "green";
  26822. * tStyleInfo.foreColor = "red";
  26823. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  26824. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  26825. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  26826. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  26827. * tStyleInfo.font = "bold 11pt arial";
  26828. * tableStyle.headerRowStyle(tStyleInfo);
  26829. * var table = activeSheet.tables.add("table1", 1, 1, 5, 5, tableStyle);
  26830. */
  26831. backColor: string;
  26832. /**
  26833. * Indicates the bottom border line of the table.
  26834. * @type {GC.Spread.Sheets.LineBorder}
  26835. * @example
  26836. * //This example creates a table.
  26837. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  26838. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  26839. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  26840. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  26841. * tStyleInfo.backColor = "green";
  26842. * tStyleInfo.foreColor = "red";
  26843. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  26844. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  26845. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  26846. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  26847. * tStyleInfo.font = "bold 11pt arial";
  26848. * tableStyle.headerRowStyle(tStyleInfo);
  26849. * var table = activeSheet.tables.add("table1", 1, 1, 5, 5, tableStyle);
  26850. */
  26851. borderBottom: GC.Spread.Sheets.LineBorder;
  26852. /**
  26853. * Indicates the horizontal border line of the table.
  26854. * @type {GC.Spread.Sheets.LineBorder}
  26855. * @example
  26856. * //This example sets the borderHorizontal property.
  26857. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  26858. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  26859. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  26860. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  26861. * tStyleInfo.backColor = "green";
  26862. * tStyleInfo.foreColor = "red";
  26863. * tStyleInfo.borderHorizontal = new GC.Spread.Sheets.LineBorder("red", GC.Spread.Sheets.LineStyle.thin);
  26864. * tStyleInfo.borderVertical = new GC.Spread.Sheets.LineBorder("blue", GC.Spread.Sheets.LineStyle.thin);
  26865. * tStyleInfo.font = "bold 11pt arial";
  26866. * tableStyle.firstRowStripStyle(tStyleInfo);
  26867. * var table = activeSheet.tables.add("table1", 1, 1, 5, 5, tableStyle);
  26868. */
  26869. borderHorizontal: GC.Spread.Sheets.LineBorder;
  26870. /**
  26871. * Indicates the left border line of the table.
  26872. * @type {GC.Spread.Sheets.LineBorder}
  26873. * @example
  26874. * //This example creates a table.
  26875. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  26876. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  26877. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  26878. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  26879. * tStyleInfo.backColor = "green";
  26880. * tStyleInfo.foreColor = "red";
  26881. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  26882. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  26883. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  26884. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  26885. * tStyleInfo.font = "bold 11pt arial";
  26886. * tableStyle.headerRowStyle(tStyleInfo);
  26887. * var table = activeSheet.tables.add("table1", 1, 1, 5, 5, tableStyle);
  26888. */
  26889. borderLeft: GC.Spread.Sheets.LineBorder;
  26890. /**
  26891. * Indicates the right border line of the table.
  26892. * @type {GC.Spread.Sheets.LineBorder}
  26893. * @example
  26894. * //This example creates a table.
  26895. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  26896. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  26897. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  26898. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  26899. * tStyleInfo.backColor = "green";
  26900. * tStyleInfo.foreColor = "red";
  26901. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  26902. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  26903. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  26904. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  26905. * tStyleInfo.font = "bold 11pt arial";
  26906. * tableStyle.headerRowStyle(tStyleInfo);
  26907. * var table = activeSheet.tables.add("table1", 1, 1, 5, 5, tableStyle);
  26908. */
  26909. borderRight: GC.Spread.Sheets.LineBorder;
  26910. /**
  26911. * Indicates the top border line of the table.
  26912. * @type {GC.Spread.Sheets.LineBorder}
  26913. * @example
  26914. * //This example creates a table.
  26915. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  26916. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  26917. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  26918. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  26919. * tStyleInfo.backColor = "green";
  26920. * tStyleInfo.foreColor = "red";
  26921. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  26922. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  26923. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  26924. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  26925. * tStyleInfo.font = "bold 11pt arial";
  26926. * tableStyle.headerRowStyle(tStyleInfo);
  26927. * var table = activeSheet.tables.add("table1", 1, 1, 5, 5, tableStyle);
  26928. */
  26929. borderTop: GC.Spread.Sheets.LineBorder;
  26930. /**
  26931. * Indicates the vertical border line of the table.
  26932. * @type {GC.Spread.Sheets.LineBorder}
  26933. * @example
  26934. * //This example sets the borderHorizontal property.
  26935. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  26936. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  26937. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  26938. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  26939. * tStyleInfo.backColor = "green";
  26940. * tStyleInfo.foreColor = "red";
  26941. * tStyleInfo.borderHorizontal = new GC.Spread.Sheets.LineBorder("red", GC.Spread.Sheets.LineStyle.thin);
  26942. * tStyleInfo.borderVertical = new GC.Spread.Sheets.LineBorder("blue", GC.Spread.Sheets.LineStyle.thin);
  26943. * tStyleInfo.font = "bold 11pt arial";
  26944. * tableStyle.firstRowStripStyle(tStyleInfo);
  26945. * var table = activeSheet.tables.add("table1", 1, 1, 5, 5, tableStyle);
  26946. */
  26947. borderVertical: GC.Spread.Sheets.LineBorder;
  26948. /**
  26949. * Indicates the font.
  26950. * @type {string}
  26951. * @example
  26952. * //This example creates a table.
  26953. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  26954. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  26955. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  26956. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  26957. * tStyleInfo.backColor = "green";
  26958. * tStyleInfo.foreColor = "red";
  26959. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  26960. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  26961. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  26962. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  26963. * tStyleInfo.font = "bold 11pt arial";
  26964. * tableStyle.headerRowStyle(tStyleInfo);
  26965. * var table = activeSheet.tables.add("table1", 1, 1, 5, 5, tableStyle);
  26966. */
  26967. font: string;
  26968. /**
  26969. * Indicates the foreground color.
  26970. * @type {string}
  26971. * @example
  26972. * //This example sets the borderHorizontal property.
  26973. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  26974. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  26975. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  26976. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  26977. * tStyleInfo.backColor = "green";
  26978. * tStyleInfo.foreColor = "red";
  26979. * tStyleInfo.borderHorizontal = new GC.Spread.Sheets.LineBorder("red", GC.Spread.Sheets.LineStyle.thin);
  26980. * tStyleInfo.borderVertical = new GC.Spread.Sheets.LineBorder("blue", GC.Spread.Sheets.LineStyle.thin);
  26981. * tStyleInfo.font = "bold 11pt arial";
  26982. * tableStyle.firstRowStripStyle(tStyleInfo);
  26983. * var table = activeSheet.tables.add("table1", 1, 1, 5, 5, tableStyle);
  26984. */
  26985. foreColor: string;
  26986. /**
  26987. * Indicates the text decoration of the table.
  26988. * @type {GC.Spread.Sheets.TextDecorationType}
  26989. */
  26990. textDecoration: GC.Spread.Sheets.TextDecorationType;
  26991. }
  26992. export class TableTheme{
  26993. /**
  26994. * Represents the table style settings.
  26995. * @class
  26996. * @example
  26997. * //This example creates a table.
  26998. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  26999. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  27000. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  27001. * var tableStyleInfo = new GC.Spread.Sheets.Tables.TableStyle(
  27002. * "black",
  27003. * "white",
  27004. * "bold 11pt arial",
  27005. * new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin),
  27006. * new GC.Spread.Sheets.LineBorder("red", GC.Spread.Sheets.LineStyle.thick),
  27007. * new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.thin),
  27008. * new GC.Spread.Sheets.LineBorder("blue", GC.Spread.Sheets.LineStyle.thick));
  27009. * tableStyle.headerRowStyle(tableStyleInfo);
  27010. * var table = activeSheet.tables.add("table1", 1, 1, 5, 5, tableStyle);
  27011. */
  27012. constructor();
  27013. /**
  27014. * Gets or sets the size of the first alternating column.
  27015. * @param {number} value The size of the first alternating column.
  27016. * @returns {number | GC.Spread.Sheets.Tables.TableTheme} If no value is set, returns the size of the first alternating column; otherwise, returns the table theme.
  27017. * @example
  27018. * //This example creates a table.
  27019. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  27020. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  27021. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  27022. * //style
  27023. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  27024. * tStyleInfo.backColor = "green";
  27025. * tStyleInfo.foreColor = "red";
  27026. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27027. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  27028. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27029. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27030. * tStyleInfo.font = "bold 11pt arial";
  27031. * tableStyle.firstColumnStripSize(2);
  27032. * tableStyle.firstColumnStripStyle(tStyleInfo);
  27033. * var sTable = activeSheet.tables.add("Custom", 1, 1, 10, 5, tableStyle);
  27034. * sTable.bandColumns(true);
  27035. */
  27036. firstColumnStripSize(value?: number): any;
  27037. /**
  27038. * Gets or sets the style of the first alternating column.
  27039. * @param {GC.Spread.Sheets.Tables.TableStyle} value The style of the first alternating column.
  27040. * @returns {GC.Spread.Sheets.Tables.TableStyle | GC.Spread.Sheets.Tables.TableTheme} If no value is set, returns the style of the first alternating column; otherwise, returns the table theme.
  27041. * @example
  27042. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  27043. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  27044. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  27045. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  27046. * tStyleInfo.backColor = "green";
  27047. * tStyleInfo.foreColor = "red";
  27048. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27049. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  27050. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27051. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27052. * tStyleInfo.font = "bold 11pt arial";
  27053. * tableStyle.firstColumnStripSize(2);
  27054. * tableStyle.firstColumnStripStyle(tStyleInfo);
  27055. * var sTable = activeSheet.tables.add("Custom", 1, 1, 10, 5, tableStyle);
  27056. * sTable.bandColumns(true);
  27057. */
  27058. firstColumnStripStyle(value?: GC.Spread.Sheets.Tables.TableStyle): any;
  27059. /**
  27060. * Gets or sets the style of the first footer cell.
  27061. * @param {GC.Spread.Sheets.Tables.TableStyle} value The style of the first footer cell.
  27062. * @returns {GC.Spread.Sheets.Tables.TableStyle | GC.Spread.Sheets.Tables.TableTheme} If no value is set, returns the style of the first footer cell; otherwise, returns the table theme.
  27063. * @example
  27064. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  27065. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  27066. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  27067. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  27068. * tStyleInfo.backColor = "green";
  27069. * tStyleInfo.foreColor = "red";
  27070. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27071. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  27072. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27073. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27074. * tStyleInfo.font = "bold 11pt arial";
  27075. * tableStyle.lastFooterCellStyle(tStyleInfo);
  27076. * tableStyle.firstFooterCellStyle(tStyleInfo);
  27077. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, tableStyle);
  27078. * sTable.showFooter(true);
  27079. * //set footer value
  27080. * sTable.setColumnValue(0, "Total");
  27081. * //set footer formula
  27082. * sTable.setColumnFormula(4, "SUM(F3:F11)");
  27083. * sTable.highlightFirstColumn(true);
  27084. * sTable.highlightLastColumn(true);
  27085. */
  27086. firstFooterCellStyle(value?: GC.Spread.Sheets.Tables.TableStyle): any;
  27087. /**
  27088. * Gets or sets the style of the first header cell.
  27089. * @param {GC.Spread.Sheets.Tables.TableStyle} value The style of the first header cell.
  27090. * @returns {GC.Spread.Sheets.Tables.TableStyle | GC.Spread.Sheets.Tables.TableTheme} If no value is set, returns the style of the first header cell; otherwise, returns the table theme.
  27091. * @example
  27092. * var tableStyle = new GC.Spread.Sheets.TableStyle();
  27093. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  27094. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.TableStyleInfo("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  27095. * var tStyleInfo = new GC.Spread.Sheets.TableStyleInfo();
  27096. * tStyleInfo.backColor = "green";
  27097. * tStyleInfo.foreColor = "red";
  27098. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27099. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  27100. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27101. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27102. * tStyleInfo.font = "bold 11pt arial";
  27103. * tableStyle.firstHeaderCellStyle(tStyleInfo);
  27104. * tableStyle.lastHeaderCellStyle(tStyleInfo);
  27105. * var sTable = activeSheet.addTable("table1", 1, 1, 10, 5, tableStyle);
  27106. * sTable.highlightFirstColumn(true);
  27107. * sTable.highlightLastColumn(true);
  27108. */
  27109. firstHeaderCellStyle(value?: GC.Spread.Sheets.Tables.TableStyle): any;
  27110. /**
  27111. * Gets or sets the size of the first alternating row.
  27112. * @param {number} value The size of the first alternating row.
  27113. * @returns {number | GC.Spread.Sheets.Tables.TableTheme} If no value is set, returns the size of the first alternating row; otherwise, returns the table theme.
  27114. * @example
  27115. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  27116. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  27117. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  27118. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  27119. * tStyleInfo.backColor = "green";
  27120. * tStyleInfo.foreColor = "red";
  27121. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27122. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  27123. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27124. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27125. * tStyleInfo.font = "bold 11pt arial";
  27126. * tableStyle.firstRowStripSize(2);
  27127. * tableStyle.firstRowStripStyle(tStyleInfo);
  27128. * activeSheet.tables.add("Custom", 1, 1, 10, 5, tableStyle);
  27129. */
  27130. firstRowStripSize(value?: number): any;
  27131. /**
  27132. * Gets or sets the first alternating row style.
  27133. * @param {GC.Spread.Sheets.Tables.TableStyle} value The first alternating row style.
  27134. * @returns {GC.Spread.Sheets.Tables.TableStyle | GC.Spread.Sheets.Tables.TableTheme} If no value is set, returns the first alternating row style; otherwise, returns the table theme.
  27135. * @example
  27136. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  27137. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  27138. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  27139. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  27140. * tStyleInfo.backColor = "green";
  27141. * tStyleInfo.foreColor = "red";
  27142. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27143. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  27144. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27145. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27146. * tStyleInfo.font = "bold 11pt arial";
  27147. * tableStyle.firstRowStripSize(2);
  27148. * tableStyle.firstRowStripStyle(tStyleInfo);
  27149. * activeSheet.tables.add("Custom", 1, 1, 10, 5, tableStyle);
  27150. */
  27151. firstRowStripStyle(value?: GC.Spread.Sheets.Tables.TableStyle): any;
  27152. /**
  27153. * Gets or sets the default style of the footer area.
  27154. * @param {GC.Spread.Sheets.Tables.TableStyle} value The default style of the footer area.
  27155. * @returns {GC.Spread.Sheets.Tables.TableStyle | GC.Spread.Sheets.Tables.TableTheme} If no value is set, returns the default style of the footer area; otherwise, returns the table theme.
  27156. * @example
  27157. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  27158. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  27159. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  27160. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  27161. * tStyleInfo.backColor = "green";
  27162. * tStyleInfo.foreColor = "red";
  27163. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27164. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  27165. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27166. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27167. * tStyleInfo.font = "bold 11pt arial";
  27168. * tableStyle.footerRowStyle(tStyleInfo);
  27169. * var sTable = activeSheet.tables.add("Custom", 1, 1, 10, 5, tableStyle);
  27170. * sTable.showFooter(true);
  27171. * //set footer value
  27172. * sTable.setColumnValue(0, "Total");
  27173. * //set footer formula
  27174. * sTable.setColumnFormula(4, "SUM(F3:F11)");
  27175. */
  27176. footerRowStyle(value?: GC.Spread.Sheets.Tables.TableStyle): any;
  27177. /**
  27178. * Gets or sets the default style of the header area.
  27179. * @param {GC.Spread.Sheets.Tables.TableStyle} value The default style of the header area.
  27180. * @returns {GC.Spread.Sheets.Tables.TableStyle | GC.Spread.Sheets.Tables.TableTheme} If no value is set, returns the default style of the header area; otherwise, returns the table theme.
  27181. * @example
  27182. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  27183. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  27184. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  27185. * var tableStyleInfo = new GC.Spread.Sheets.Tables.TableStyle(
  27186. * "black",
  27187. * "white",
  27188. * "bold 11pt arial",
  27189. * new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin),
  27190. * new GC.Spread.Sheets.LineBorder("red", GC.Spread.Sheets.LineStyle.thick),
  27191. * new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.thin),
  27192. * new GC.Spread.Sheets.LineBorder("blue", GC.Spread.Sheets.LineStyle.thick));
  27193. * tableStyle.headerRowStyle(tableStyleInfo);
  27194. * var table = activeSheet.tables.add("table1", 1, 1, 5, 5, tableStyle);
  27195. */
  27196. headerRowStyle(value?: GC.Spread.Sheets.Tables.TableStyle): any;
  27197. /**
  27198. * Gets or sets the style of the first column.
  27199. * @param {GC.Spread.Sheets.Tables.TableStyle} value The style of the first column.
  27200. * @returns {GC.Spread.Sheets.Tables.TableStyle | GC.Spread.Sheets.Tables.TableTheme} If no value is set, returns the style of the first column; otherwise, returns the table theme.
  27201. * @example
  27202. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  27203. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  27204. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  27205. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  27206. * tStyleInfo.backColor = "green";
  27207. * tStyleInfo.foreColor = "red";
  27208. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27209. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  27210. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27211. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27212. * tStyleInfo.font = "bold 11pt arial";
  27213. * tableStyle.highlightFirstColumnStyle(tStyleInfo);
  27214. * var sTable = activeSheet.tables.add("Custom", 1, 1, 10, 5, tableStyle);
  27215. * sTable.highlightFirstColumn(true);
  27216. * sTable.highlightLastColumn(true);
  27217. */
  27218. highlightFirstColumnStyle(value?: GC.Spread.Sheets.Tables.TableStyle): any;
  27219. /**
  27220. * Gets or sets the style of the last column.
  27221. * @param {GC.Spread.Sheets.Tables.TableStyle} value The style of the last column.
  27222. * @returns {GC.Spread.Sheets.Tables.TableStyle | GC.Spread.Sheets.Tables.TableTheme} If no value is set, returns the style of the last column; otherwise, returns the table theme.
  27223. * @example
  27224. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  27225. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  27226. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  27227. * //style
  27228. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  27229. * tStyleInfo.backColor = "green";
  27230. * tStyleInfo.foreColor = "red";
  27231. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27232. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  27233. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27234. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27235. * tStyleInfo.font = "bold 11pt arial";
  27236. * tableStyle.highlightLastColumnStyle(tStyleInfo);
  27237. * var sTable = activeSheet.tables.add("Custom", 1, 1, 10, 5, tableStyle);
  27238. * sTable.highlightLastColumn(true);
  27239. */
  27240. highlightLastColumnStyle(value?: GC.Spread.Sheets.Tables.TableStyle): any;
  27241. /**
  27242. * Gets or sets the style of the last footer cell.
  27243. * @param {GC.Spread.Sheets.Tables.TableStyle} value The style of the last footer cell.
  27244. * @returns {GC.Spread.Sheets.Tables.TableStyle | GC.Spread.Sheets.Tables.TableTheme} If no value is set, returns the style of the last footer cell; otherwise, returns the table theme.
  27245. * @example
  27246. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  27247. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  27248. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  27249. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  27250. * tStyleInfo.backColor = "green";
  27251. * tStyleInfo.foreColor = "red";
  27252. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27253. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  27254. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27255. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27256. * tStyleInfo.font = "bold 11pt arial";
  27257. * tableStyle.lastFooterCellStyle(tStyleInfo);
  27258. * tableStyle.firstFooterCellStyle(tStyleInfo);
  27259. * var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, tableStyle);
  27260. * sTable.showFooter(true);
  27261. * //set footer value
  27262. * sTable.setColumnValue(0, "Total");
  27263. * //set footer formula
  27264. * sTable.setColumnFormula(4, "SUM(F3:F11)");
  27265. * sTable.highlightFirstColumn(true);
  27266. * sTable.highlightLastColumn(true);
  27267. */
  27268. lastFooterCellStyle(value?: GC.Spread.Sheets.Tables.TableStyle): any;
  27269. /**
  27270. * Gets or sets the style of the last header cell.
  27271. * @param {GC.Spread.Sheets.Tables.TableStyle} value The style of the last header cell.
  27272. * @returns {GC.Spread.Sheets.Tables.TableStyle | GC.Spread.Sheets.Tables.TableTheme} If no value is set, returns the style of the last header cell; otherwise, returns the table theme.
  27273. * @example
  27274. * var tableStyle = new GC.Spread.Sheets.TableStyle();
  27275. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  27276. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.TableStyleInfo("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  27277. * var tStyleInfo = new GC.Spread.Sheets.TableStyleInfo();
  27278. * tStyleInfo.backColor = "green";
  27279. * tStyleInfo.foreColor = "red";
  27280. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27281. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  27282. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27283. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27284. * tStyleInfo.font = "bold 11pt arial";
  27285. * tableStyle.firstHeaderCellStyle(tStyleInfo);
  27286. * tableStyle.lastHeaderCellStyle(tStyleInfo);
  27287. * var sTable = activeSheet.addTable("table1", 1, 1, 10, 5, tableStyle);
  27288. * sTable.highlightFirstColumn(true);
  27289. * sTable.highlightLastColumn(true);
  27290. */
  27291. lastHeaderCellStyle(value?: GC.Spread.Sheets.Tables.TableStyle): any;
  27292. /**
  27293. * Gets or sets the name of the style.
  27294. * @param {string} value The name of the style.
  27295. * @returns {string | GC.Spread.Sheets.Tables.TableTheme} If no value is set, returns the name of the style; otherwise, returns the table theme.
  27296. * @example
  27297. * var tableStyle = new GC.Spread.Sheets.TableStyle();
  27298. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  27299. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.TableStyleInfo("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  27300. * var tStyleInfo = new GC.Spread.Sheets.TableStyleInfo();
  27301. * tStyleInfo.backColor = "green";
  27302. * tStyleInfo.foreColor = "red";
  27303. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27304. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  27305. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27306. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27307. * tStyleInfo.font = "bold 11pt arial";
  27308. * tableStyle.name("tstyle");
  27309. * tableStyle.firstColumnStripSize(2);
  27310. * tableStyle.firstColumnStripStyle(tStyleInfo);
  27311. * var sTable = activeSheet.addTable("Custom", 1, 1, 10, 5, tableStyle);
  27312. * sTable.bandColumns(true);
  27313. */
  27314. name(value?: string): any;
  27315. /**
  27316. * Gets or sets the size of the second alternating column.
  27317. * @param {number} value The size of the second alternating column.
  27318. * @returns {number | GC.Spread.Sheets.Tables.TableTheme} If no value is set, returns the size of the second alternating column; otherwise, returns the table theme.
  27319. * @example
  27320. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  27321. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  27322. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  27323. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  27324. * tStyleInfo.backColor = "green";
  27325. * tStyleInfo.foreColor = "red";
  27326. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27327. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  27328. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27329. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27330. * tStyleInfo.font = "bold 11pt arial";
  27331. * tableStyle.secondColumnStripSize(2);
  27332. * tableStyle.secondColumnStripStyle(tStyleInfo);
  27333. * var sTable = activeSheet.tables.add("Custom", 1, 1, 10, 5, tableStyle);
  27334. * sTable.bandColumns(true);
  27335. */
  27336. secondColumnStripSize(value?: number): any;
  27337. /**
  27338. * Gets or sets the style of the second alternating column.
  27339. * @param {GC.Spread.Sheets.Tables.TableStyle} value The style of the second alternating column.
  27340. * @returns {GC.Spread.Sheets.Tables.TableStyle | GC.Spread.Sheets.Tables.TableTheme} If no value is set, returns the style of the second alternating column; otherwise, returns the table theme.
  27341. * @example
  27342. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  27343. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  27344. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  27345. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  27346. * tStyleInfo.backColor = "green";
  27347. * tStyleInfo.foreColor = "red";
  27348. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27349. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  27350. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27351. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27352. * tStyleInfo.font = "bold 11pt arial";
  27353. * tableStyle.secondColumnStripSize(2);
  27354. * tableStyle.secondColumnStripStyle(tStyleInfo);
  27355. * var sTable = activeSheet.tables.add("Custom", 1, 1, 10, 5, tableStyle);
  27356. * sTable.bandColumns(true);
  27357. */
  27358. secondColumnStripStyle(value?: GC.Spread.Sheets.Tables.TableStyle): any;
  27359. /**
  27360. * Gets or sets the size of the second alternating row.
  27361. * @param {number} value The size of the second alternating row.
  27362. * @returns {number | GC.Spread.Sheets.Tables.TableTheme} If no value is set, returns the size of the second alternating row; otherwise, returns the table theme.
  27363. * @example
  27364. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  27365. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  27366. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  27367. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  27368. * tStyleInfo.backColor = "green";
  27369. * tStyleInfo.foreColor = "red";
  27370. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27371. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  27372. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27373. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27374. * tStyleInfo.font = "bold 11pt arial";
  27375. * tableStyle.secondRowStripSize(2);
  27376. * tableStyle.secondRowStripStyle(tStyleInfo);
  27377. * activeSheet.tables.add("Custom", 1, 1, 10, 5, tableStyle);
  27378. */
  27379. secondRowStripSize(value?: number): any;
  27380. /**
  27381. * Gets or sets the second alternating row style.
  27382. * @param {GC.Spread.Sheets.Tables.TableStyle} value The second alternating row style.
  27383. * @returns {GC.Spread.Sheets.Tables.TableStyle | GC.Spread.Sheets.Tables.TableTheme} If no value is set, returns the second alternating row style; otherwise, returns the table theme.
  27384. * @example
  27385. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  27386. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  27387. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  27388. * var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
  27389. * tStyleInfo.backColor = "green";
  27390. * tStyleInfo.foreColor = "red";
  27391. * tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27392. * tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
  27393. * tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27394. * tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
  27395. * tStyleInfo.font = "bold 11pt arial";
  27396. * tableStyle.secondRowStripSize(2);
  27397. * tableStyle.secondRowStripStyle(tStyleInfo);
  27398. * activeSheet.tables.add("Custom", 1, 1, 10, 5, tableStyle);
  27399. */
  27400. secondRowStripStyle(value?: GC.Spread.Sheets.Tables.TableStyle): any;
  27401. /**
  27402. * Gets or sets the default style of the data area.
  27403. * @param {GC.Spread.Sheets.Tables.TableStyle} value The default style of the data area.
  27404. * @returns {GC.Spread.Sheets.Tables.TableStyle | GC.Spread.Sheets.Tables.TableTheme} If no value is set, returns the default style of the data area; otherwise, returns the table theme.
  27405. * @example
  27406. * var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
  27407. * var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
  27408. * tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
  27409. * var tableStyleInfo = new GC.Spread.Sheets.Tables.TableStyle(
  27410. * "black",
  27411. * "white",
  27412. * "bold 11pt arial",
  27413. * new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin),
  27414. * new GC.Spread.Sheets.LineBorder("red", GC.Spread.Sheets.LineStyle.thick),
  27415. * new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.thin),
  27416. * new GC.Spread.Sheets.LineBorder("blue", GC.Spread.Sheets.LineStyle.thick));
  27417. * tableStyle.headerRowStyle(tableStyleInfo);
  27418. * var table = activeSheet.tables.add("table1", 1, 1, 5, 5, tableStyle);
  27419. */
  27420. wholeTableStyle(value?: GC.Spread.Sheets.Tables.TableStyle): any;
  27421. }
  27422. export class TableThemes{
  27423. /**
  27424. * Represents a built-in table theme collection.
  27425. * @class
  27426. */
  27427. constructor();
  27428. /**
  27429. * Gets the dark1 style.
  27430. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27431. */
  27432. static dark1: GC.Spread.Sheets.Tables.TableTheme;
  27433. /**
  27434. * Gets the dark10 style.
  27435. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27436. */
  27437. static dark10: GC.Spread.Sheets.Tables.TableTheme;
  27438. /**
  27439. * Gets the dark11 style.
  27440. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27441. */
  27442. static dark11: GC.Spread.Sheets.Tables.TableTheme;
  27443. /**
  27444. * Gets the dark2 style.
  27445. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27446. */
  27447. static dark2: GC.Spread.Sheets.Tables.TableTheme;
  27448. /**
  27449. * Gets the dark3 style.
  27450. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27451. */
  27452. static dark3: GC.Spread.Sheets.Tables.TableTheme;
  27453. /**
  27454. * Gets the dark4 style.
  27455. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27456. */
  27457. static dark4: GC.Spread.Sheets.Tables.TableTheme;
  27458. /**
  27459. * Gets the dark5 style.
  27460. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27461. */
  27462. static dark5: GC.Spread.Sheets.Tables.TableTheme;
  27463. /**
  27464. * Gets the dark6 style.
  27465. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27466. */
  27467. static dark6: GC.Spread.Sheets.Tables.TableTheme;
  27468. /**
  27469. * Gets the dark7 style.
  27470. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27471. */
  27472. static dark7: GC.Spread.Sheets.Tables.TableTheme;
  27473. /**
  27474. * Gets the dark8 style.
  27475. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27476. */
  27477. static dark8: GC.Spread.Sheets.Tables.TableTheme;
  27478. /**
  27479. * Gets the dark9 style.
  27480. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27481. */
  27482. static dark9: GC.Spread.Sheets.Tables.TableTheme;
  27483. /**
  27484. * Gets the light1 style.
  27485. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27486. */
  27487. static light1: GC.Spread.Sheets.Tables.TableTheme;
  27488. /**
  27489. * Gets the light10 style.
  27490. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27491. */
  27492. static light10: GC.Spread.Sheets.Tables.TableTheme;
  27493. /**
  27494. * Gets the light11 style.
  27495. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27496. */
  27497. static light11: GC.Spread.Sheets.Tables.TableTheme;
  27498. /**
  27499. * Gets the light12 style.
  27500. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27501. */
  27502. static light12: GC.Spread.Sheets.Tables.TableTheme;
  27503. /**
  27504. * Gets the light13 style.
  27505. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27506. */
  27507. static light13: GC.Spread.Sheets.Tables.TableTheme;
  27508. /**
  27509. * Gets the light14 style.
  27510. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27511. */
  27512. static light14: GC.Spread.Sheets.Tables.TableTheme;
  27513. /**
  27514. * Gets the light15 style.
  27515. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27516. */
  27517. static light15: GC.Spread.Sheets.Tables.TableTheme;
  27518. /**
  27519. * Gets the light16 style.
  27520. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27521. */
  27522. static light16: GC.Spread.Sheets.Tables.TableTheme;
  27523. /**
  27524. * Gets the light17 style.
  27525. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27526. */
  27527. static light17: GC.Spread.Sheets.Tables.TableTheme;
  27528. /**
  27529. * Gets the light18 style.
  27530. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27531. */
  27532. static light18: GC.Spread.Sheets.Tables.TableTheme;
  27533. /**
  27534. * Gets the light19 style.
  27535. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27536. */
  27537. static light19: GC.Spread.Sheets.Tables.TableTheme;
  27538. /**
  27539. * Gets the light2 style.
  27540. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27541. */
  27542. static light2: GC.Spread.Sheets.Tables.TableTheme;
  27543. /**
  27544. * Gets the light20 style.
  27545. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27546. */
  27547. static light20: GC.Spread.Sheets.Tables.TableTheme;
  27548. /**
  27549. * Gets the light21 style.
  27550. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27551. */
  27552. static light21: GC.Spread.Sheets.Tables.TableTheme;
  27553. /**
  27554. * Gets the light3 style.
  27555. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27556. */
  27557. static light3: GC.Spread.Sheets.Tables.TableTheme;
  27558. /**
  27559. * Gets the light4 style.
  27560. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27561. */
  27562. static light4: GC.Spread.Sheets.Tables.TableTheme;
  27563. /**
  27564. * Gets the light5 style.
  27565. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27566. */
  27567. static light5: GC.Spread.Sheets.Tables.TableTheme;
  27568. /**
  27569. * Gets the light6 style.
  27570. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27571. */
  27572. static light6: GC.Spread.Sheets.Tables.TableTheme;
  27573. /**
  27574. * Gets the light7 style.
  27575. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27576. */
  27577. static light7: GC.Spread.Sheets.Tables.TableTheme;
  27578. /**
  27579. * Gets the light8 style.
  27580. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27581. */
  27582. static light8: GC.Spread.Sheets.Tables.TableTheme;
  27583. /**
  27584. * Gets the light9 style.
  27585. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27586. */
  27587. static light9: GC.Spread.Sheets.Tables.TableTheme;
  27588. /**
  27589. * Gets the medium1 style.
  27590. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27591. */
  27592. static medium1: GC.Spread.Sheets.Tables.TableTheme;
  27593. /**
  27594. * Gets the medium10 style.
  27595. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27596. */
  27597. static medium10: GC.Spread.Sheets.Tables.TableTheme;
  27598. /**
  27599. * Gets the medium11 style.
  27600. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27601. */
  27602. static medium11: GC.Spread.Sheets.Tables.TableTheme;
  27603. /**
  27604. * Gets the medium12 style.
  27605. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27606. */
  27607. static medium12: GC.Spread.Sheets.Tables.TableTheme;
  27608. /**
  27609. * Gets the medium13 style.
  27610. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27611. */
  27612. static medium13: GC.Spread.Sheets.Tables.TableTheme;
  27613. /**
  27614. * Gets the medium14 style.
  27615. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27616. */
  27617. static medium14: GC.Spread.Sheets.Tables.TableTheme;
  27618. /**
  27619. * Gets the medium15 style.
  27620. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27621. */
  27622. static medium15: GC.Spread.Sheets.Tables.TableTheme;
  27623. /**
  27624. * Gets the medium16 style.
  27625. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27626. */
  27627. static medium16: GC.Spread.Sheets.Tables.TableTheme;
  27628. /**
  27629. * Gets the medium17 style.
  27630. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27631. */
  27632. static medium17: GC.Spread.Sheets.Tables.TableTheme;
  27633. /**
  27634. * Gets the medium18 style.
  27635. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27636. */
  27637. static medium18: GC.Spread.Sheets.Tables.TableTheme;
  27638. /**
  27639. * Gets the medium19 style.
  27640. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27641. */
  27642. static medium19: GC.Spread.Sheets.Tables.TableTheme;
  27643. /**
  27644. * Gets the medium2 style.
  27645. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27646. */
  27647. static medium2: GC.Spread.Sheets.Tables.TableTheme;
  27648. /**
  27649. * Gets the medium20 style.
  27650. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27651. */
  27652. static medium20: GC.Spread.Sheets.Tables.TableTheme;
  27653. /**
  27654. * Gets the medium21 style.
  27655. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27656. */
  27657. static medium21: GC.Spread.Sheets.Tables.TableTheme;
  27658. /**
  27659. * Gets the medium22 style.
  27660. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27661. */
  27662. static medium22: GC.Spread.Sheets.Tables.TableTheme;
  27663. /**
  27664. * Gets the medium23 style.
  27665. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27666. */
  27667. static medium23: GC.Spread.Sheets.Tables.TableTheme;
  27668. /**
  27669. * Gets the medium24 style.
  27670. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27671. */
  27672. static medium24: GC.Spread.Sheets.Tables.TableTheme;
  27673. /**
  27674. * Gets the medium25 style.
  27675. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27676. */
  27677. static medium25: GC.Spread.Sheets.Tables.TableTheme;
  27678. /**
  27679. * Gets the medium26 style.
  27680. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27681. */
  27682. static medium26: GC.Spread.Sheets.Tables.TableTheme;
  27683. /**
  27684. * Gets the medium27 style.
  27685. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27686. */
  27687. static medium27: GC.Spread.Sheets.Tables.TableTheme;
  27688. /**
  27689. * Gets the medium28 style.
  27690. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27691. */
  27692. static medium28: GC.Spread.Sheets.Tables.TableTheme;
  27693. /**
  27694. * Gets the medium3 style.
  27695. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27696. */
  27697. static medium3: GC.Spread.Sheets.Tables.TableTheme;
  27698. /**
  27699. * Gets the medium4 style.
  27700. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27701. */
  27702. static medium4: GC.Spread.Sheets.Tables.TableTheme;
  27703. /**
  27704. * Gets the medium5 style.
  27705. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27706. */
  27707. static medium5: GC.Spread.Sheets.Tables.TableTheme;
  27708. /**
  27709. * Gets the medium6 style.
  27710. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27711. */
  27712. static medium6: GC.Spread.Sheets.Tables.TableTheme;
  27713. /**
  27714. * Gets the medium7 style.
  27715. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27716. */
  27717. static medium7: GC.Spread.Sheets.Tables.TableTheme;
  27718. /**
  27719. * Gets the medium8 style.
  27720. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27721. */
  27722. static medium8: GC.Spread.Sheets.Tables.TableTheme;
  27723. /**
  27724. * Gets the medium9 style.
  27725. * @returns {GC.Spread.Sheets.Tables.TableTheme}
  27726. */
  27727. static medium9: GC.Spread.Sheets.Tables.TableTheme;
  27728. }
  27729. }
  27730. module Touch{
  27731. export class TouchToolStrip{
  27732. /**
  27733. * Represents a toolbar.
  27734. * @class
  27735. * @param {GC.Spread.Sheets.Workbook} workbook The Spread object.
  27736. * @param {HTMLElement} host The host DOM element.
  27737. */
  27738. constructor(workbook: GC.Spread.Sheets.Workbook, host: HTMLElement);
  27739. /**
  27740. * Adds an item to the touch toolbar.
  27741. * @param {GC.Spread.Sheets.Touch.TouchToolStripSeparator | GC.Spread.Sheets.Touch.TouchToolStripItem} item The item to be added.
  27742. * @remarks The item to be added can be a toolbar item or a line separator.
  27743. * @example
  27744. * //This example adds a custom item.
  27745. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripItem("C", "Delete", "tsoutline.png", function(){ }))
  27746. * spread.touchToolStrip.getItem("C").font("15px Arial").foreColor("red");
  27747. * spread.touchToolStrip.imageAreaHeight(30);
  27748. * spread.touchToolStrip.itemHeight(80);
  27749. * spread.touchToolStrip.itemWidth(50);
  27750. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripSeparator());
  27751. */
  27752. add(item: GC.Spread.Sheets.Touch.TouchToolStripSeparator | GC.Spread.Sheets.Touch.TouchToolStripItem): void;
  27753. /**
  27754. * Clears all items in the toolbar.
  27755. * @example
  27756. * //This example uses the clear method.
  27757. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripItem("C", "Delete", "tsoutline.png", function(){ }))
  27758. * spread.touchToolStrip.getItem("C").font("15px Arial").foreColor("red");
  27759. * spread.touchToolStrip.imageAreaHeight(30);
  27760. * spread.touchToolStrip.itemHeight(80);
  27761. * spread.touchToolStrip.itemWidth(50);
  27762. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripSeparator());
  27763. * spread.touchToolStrip.clear();
  27764. */
  27765. clear(): void;
  27766. /**
  27767. * Closes the toolbar.
  27768. */
  27769. close(): void;
  27770. /**
  27771. * Gets the item with the specified name.
  27772. * @param {string} name The item name.
  27773. * @returns {GC.Spread.Sheets.Touch.TouchToolStripSeparator|GC.Spread.Sheets.Touch.TouchToolStripItem} If the item exists in the toolbar, the item is returned; otherwise, returns undefined.
  27774. * @example
  27775. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripItem("Cut", "Delete", "cut.png", function(){ }))
  27776. * spread.touchToolStrip.getItem("Cut").font("15px Arial").foreColor("red");
  27777. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripSeparator());
  27778. */
  27779. getItem(name: string): any;
  27780. /**
  27781. * Gets all the items that belong to the toolbar.
  27782. * @returns {Array.<GC.Spread.Sheets.Touch.TouchToolStripSeparator>|Array.<GC.Spread.Sheets.Touch.TouchToolStripItem>} An array that contains all the items in the toolbar.
  27783. */
  27784. getItems(): any;
  27785. /**
  27786. * Gets or sets the image area height.
  27787. * @param {number} height The image area height.
  27788. * @returns {number | GC.Spread.Sheets.Touch.TouchToolStrip} If no value is set, returns the image area height; otherwise, returns the toolbar.
  27789. * @example
  27790. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripItem("C", "Delete", "tsoutline.png", function(){ }))
  27791. * spread.touchToolStrip.getItem("C").font("15px Arial").foreColor("red");
  27792. * spread.touchToolStrip.imageAreaHeight(30);
  27793. * spread.touchToolStrip.itemHeight(80);
  27794. * spread.touchToolStrip.itemWidth(50);
  27795. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripSeparator());
  27796. */
  27797. imageAreaHeight(height?: number): any;
  27798. /**
  27799. * Gets or sets the toolbar item height.
  27800. * @param {number} height The toolbar item height.
  27801. * @returns {number | GC.Spread.Sheets.Touch.TouchToolStrip} If no value is set, returns the toolbar item height; otherwise, returns the toolbar.
  27802. * @example
  27803. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripItem("C", "Delete", "tsoutline.png", function(){ }))
  27804. * spread.touchToolStrip.getItem("C").font("15px Arial").foreColor("red");
  27805. * spread.touchToolStrip.imageAreaHeight(30);
  27806. * spread.touchToolStrip.itemHeight(80);
  27807. * spread.touchToolStrip.itemWidth(50);
  27808. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripSeparator());
  27809. */
  27810. itemHeight(height?: number): any;
  27811. /**
  27812. * Gets or sets the toolbar item width.
  27813. * @param {number} width The toolbar item width.
  27814. * @returns {number | GC.Spread.Sheets.Touch.TouchToolStrip} If no value is set, returns the toolbar item width; otherwise, returns the toolbar.
  27815. * @example
  27816. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripItem("C", "Delete", "tsoutline.png", function(){ }))
  27817. * spread.touchToolStrip.getItem("C").font("15px Arial").foreColor("red");
  27818. * spread.touchToolStrip.imageAreaHeight(30);
  27819. * spread.touchToolStrip.itemHeight(80);
  27820. * spread.touchToolStrip.itemWidth(50);
  27821. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripSeparator());
  27822. */
  27823. itemWidth(width?: number): any;
  27824. /**
  27825. * Opens a toolbar in a specific position relative to the touch point.
  27826. * @param {number} x The <i>x</i>-coordinate.
  27827. * @param {number} y The <i>y</i>-coordinate.
  27828. */
  27829. open(x: number, y: number): void;
  27830. /**
  27831. * Removes the toolbar item with the specified name.
  27832. * @param {string} name The name of the item to be removed.
  27833. * @returns {GC.Spread.Sheets.Touch.TouchToolStripItem} The removed item.
  27834. * @example
  27835. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripItem("Cut", "Delete", "cut.png", function(){ }))
  27836. * spread.touchToolStrip.getItem("Cut").font("15px Arial").foreColor("red");
  27837. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripSeparator());
  27838. * spread.touchToolStrip.remove("Cut");
  27839. * activeSheet.resumePaint();
  27840. * activeSheet.repaint();
  27841. */
  27842. remove(name: string): GC.Spread.Sheets.Touch.TouchToolStripItem;
  27843. /**
  27844. * Gets or sets the toolbar separator height.
  27845. * @param {number} height The toolbar separator height.
  27846. * @returns {number | GC.Spread.Sheets.Touch.TouchToolStrip} If no value is set, returns the toolbar separator height; otherwise, returns the toolbar.
  27847. * @example
  27848. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripItem("Cut", "Delete", "cut.png", function(){ }))
  27849. * spread.touchToolStrip.getItem("Cut").font("15px Arial").foreColor("red");
  27850. * spread.touchToolStrip.separatorHeight(33);
  27851. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripSeparator());
  27852. */
  27853. separatorHeight(height?: number): any;
  27854. }
  27855. export class TouchToolStripItem{
  27856. /**
  27857. * Represents an item in the toolbar.
  27858. * @class
  27859. * @param {string} name The name of the item.
  27860. * @param {string} text The item text.
  27861. * @param {string} image The item image source.
  27862. * @param {Object} command Defines the executive function that occurs when the user taps the item.
  27863. * @param {Object} canExecute Defines when to show the item by a function. If returns <c>true</c>, display the item; otherwise, hide the item.
  27864. * @example
  27865. * //This example adds a delete image with red text.
  27866. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripItem("Cut", "Delete", "cut.png", function(){ }))
  27867. * spread.touchToolStrip.getItem("Cut").font("15px Arial").foreColor("red");
  27868. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripSeparator());
  27869. */
  27870. constructor(name: string, text: string, image: string, command?: any, canExecute?: Function);
  27871. /**
  27872. * Gets or sets the font of the item text.
  27873. * @param {string} value The font of the toolbar item text.
  27874. * @returns {string | GC.Spread.Sheets.Touch.TouchToolStripItem} If no value is set, returns the font of the item text; otherwise, returns the toolbar item.
  27875. * @example
  27876. * //This example adds a delete image with red text.
  27877. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripItem("Cut", "Delete", "cut.png", function(){ }))
  27878. * spread.touchToolStrip.getItem("Cut").font("15px Arial").foreColor("red");
  27879. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripSeparator());
  27880. */
  27881. font(value?: string): any;
  27882. /**
  27883. * Gets or sets the color of the item text.
  27884. * @param {string} value The color of the toolbar item text.
  27885. * @returns {string | GC.Spread.Sheets.Touch.TouchToolStripItem} If no value is set, returns the color of the item text; otherwise, returns the toolbar item.
  27886. * @example
  27887. * //This example adds a delete image with red text.
  27888. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripItem("Cut", "Delete", "cut.png", function(){ }))
  27889. * spread.touchToolStrip.getItem("Cut").font("15px Arial").foreColor("red");
  27890. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripSeparator());
  27891. */
  27892. foreColor(value?: string): any;
  27893. /**
  27894. * Gets or sets the source of the item image.
  27895. * @param {string} value The path and filename for the item image source.
  27896. * @returns {string | GC.Spread.Sheets.Touch.TouchToolStripItem} If no value is set, returns the source of the item image; otherwise, returns the toolbar item.
  27897. * @example
  27898. * //This example adds a delete image with red text.
  27899. * var tts = new GC.Spread.Sheets.Touch.TouchToolStripItem();
  27900. * tts.image("cut.png");
  27901. * tts.name("C");
  27902. * tts.text("Delete");
  27903. * spread.touchToolStrip.add(tts, function(){ });
  27904. * spread.touchToolStrip.getItem("C").font("15px Arial").foreColor("red");
  27905. */
  27906. image(value?: string): any;
  27907. /**
  27908. * Gets or sets the name of the item.
  27909. * @param {string} value The name of the toolbar item.
  27910. * @returns {string | GC.Spread.Sheets.Touch.TouchToolStripItem} If no value is set, returns the name of the item; otherwise, returns the toolbar item.
  27911. * @example
  27912. * //This example adds a delete image with red text.
  27913. * var tts = new GC.Spread.Sheets.Touch.TouchToolStripItem();
  27914. * tts.image("cut.png");
  27915. * tts.name("C");
  27916. * tts.text("Delete");
  27917. * spread.touchToolStrip.add(tts, function(){ });
  27918. * spread.touchToolStrip.getItem("C").font("15px Arial").foreColor("red");
  27919. */
  27920. name(value?: string): any;
  27921. /**
  27922. * Gets or sets the text of the item.
  27923. * @param {string} value The text of the toolbar item.
  27924. * @returns {string | GC.Spread.Sheets.Touch.TouchToolStripItem} If no value is set, returns the text of the item; otherwise, returns the toolbar item.
  27925. * @example
  27926. * //This example adds a delete image with red text.
  27927. * var tts = new GC.Spread.Sheets.Touch.TouchToolStripItem();
  27928. * tts.image("cut.png");
  27929. * tts.name("C");
  27930. * tts.text("Delete");
  27931. * spread.touchToolStrip.add(tts, function(){ });
  27932. * spread.touchToolStrip.getItem("C").font("15px Arial").foreColor("red");
  27933. */
  27934. text(value?: string): any;
  27935. }
  27936. export class TouchToolStripSeparator{
  27937. /**
  27938. * Represents a separator in the toolbar.
  27939. * @class
  27940. * @param {Object} canExecute - Defines when to display the separator with a function. If returns <c>true</c>, display the separator; otherwise, hide the separator.
  27941. * @example
  27942. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripItem("Cut", "Delete", "cut.png", function(){ }))
  27943. * spread.touchToolStrip.getItem("Cut").font("15px Arial").foreColor("red");
  27944. * spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripSeparator());
  27945. */
  27946. constructor(canExecute?: Function);
  27947. /**
  27948. * Gets the name of the separator.
  27949. * @returns {string} Returns the current separator name.
  27950. */
  27951. name(): string;
  27952. }
  27953. }
  27954. }
  27955. module Slicers{
  27956. export interface ISlicerConditional{
  27957. exclusiveRowIndexes?: number[];
  27958. ranges?: ISlicerRangeConditional[];
  27959. }
  27960. export interface ISlicerData{
  27961. getColumnIndex(columnName: string): number;
  27962. getData(columnName: string, range?: ISlicerRangeConditional): any[];
  27963. getExclusiveData(columnName: string): any[];
  27964. getRowIndexes(columnName: string, exclusiveRowIndex: number): number[];
  27965. getExclusiveRowIndex(columnName: string, rowIndex: number): number;
  27966. getFilteredIndexes(columnName: string, isPreview?: boolean): number[];
  27967. getFilteredOutIndexes(columnName: string, filteredOutDataType: GC.Spread.Slicers.FilteredOutDataType, isPreview?: boolean): number[];
  27968. getFilteredRanges(columnName: string): ISlicerRangeConditional[];
  27969. getFilteredOutRanges(columnName: string): ISlicerRangeConditional[];
  27970. attachListener(listener: ISlicerListener): void;
  27971. detachListener(listener: ISlicerListener): void;
  27972. doFilter(columnName: string, slicerConditional: ISlicerConditional, isPreview?: boolean): void;
  27973. doUnfilter(columnName: string): void;
  27974. clearPreview():void;
  27975. }
  27976. export interface ISlicerDataItem{
  27977. columnName: string;
  27978. rowIndex: number;
  27979. data: any;
  27980. }
  27981. export interface ISlicerFiltedData{
  27982. isPreview: boolean;
  27983. rowIndexes: number[];
  27984. }
  27985. export interface ISlicerListener{
  27986. onFiltered(data: ISlicerFiltedData): void;
  27987. onDataChanged(data: ISlicerDataItem[]): void;
  27988. onRowsChanged(rowIndex: number, rowCount: number, isAdd: boolean): void;
  27989. onColumnNameChanged(oldName: string, newName: string): void;
  27990. onColumnRemoved(columnName: string): void;
  27991. }
  27992. export interface ISlicerRangeConditional{
  27993. min: number;
  27994. max: number;
  27995. }
  27996. /**
  27997. * Represents the kind of filtered out exclusive data index that should be included in the result.
  27998. * @enum {number}
  27999. */
  28000. export enum FilteredOutDataType{
  28001. /**
  28002. * Indicates all of the filtered out data.
  28003. */
  28004. all= 0,
  28005. /**
  28006. * Indicates the data was filtered out based on the current column.
  28007. */
  28008. byCurrentColumn= 1,
  28009. /**
  28010. * Indicates the data was filtered out based on other columns.
  28011. */
  28012. byOtherColumns= 2
  28013. }
  28014. /**
  28015. * Represents the aggregate type.
  28016. * @enum {number}
  28017. */
  28018. export enum SlicerAggregateType{
  28019. /**
  28020. * Calculates the average of the specified numeric values.
  28021. */
  28022. average= 1,
  28023. /**
  28024. * Calculates the number of data that contain numbers.
  28025. */
  28026. count= 2,
  28027. /**
  28028. * Calculates the number of data that contain non-null values.
  28029. */
  28030. counta= 3,
  28031. /**
  28032. * Calculates the maximum value, the greatest value, of all the values.
  28033. */
  28034. max= 4,
  28035. /**
  28036. * Calculates the minimum value, the least value, of all the values.
  28037. */
  28038. min= 5,
  28039. /**
  28040. * Multiplies all the arguments and returns the product.
  28041. */
  28042. product= 6,
  28043. /**
  28044. * Calculates the standard deviation based on a sample.
  28045. */
  28046. stdev= 7,
  28047. /**
  28048. * Calculates the standard deviation of a population based on the entire population using the numbers in a column of a list or database that match the specified conditions.
  28049. */
  28050. stdevp= 8,
  28051. /**
  28052. * Calculates the sum of the specified numeric values.
  28053. */
  28054. sum= 9,
  28055. /**
  28056. * Calculates the variance based on a sample of a population, which uses only numeric values.
  28057. */
  28058. vars= 10,
  28059. /**
  28060. * Calculates the variance based on a sample of a population, which includes numeric, logical, or text values.
  28061. */
  28062. varp= 11
  28063. }
  28064. export class GeneralSlicerData{
  28065. /**
  28066. * Represents general slicer data.
  28067. * @class GC.Spread.Slicers.GeneralSlicerData
  28068. * @param {Array.<Array.<Object>>} data The slicer data; it is a matrix array.
  28069. * @param {Array} columnNames The column names of the slicer data.
  28070. */
  28071. constructor(data: any[][], columnNames: string[]);
  28072. /**
  28073. * Indicates the column names for the general slicer data.
  28074. * @type {Array.<string>}
  28075. */
  28076. columnNames: string[];
  28077. /**
  28078. * Indicates the data source for general slicer data.
  28079. * @type {{Array.<Array.<Object>>}}
  28080. */
  28081. data: any[][];
  28082. /**
  28083. * Aggregates the data by the specified column name.
  28084. * @param {string} columnName The column name.
  28085. * @param {GC.Spread.Slicers.SlicerAggregateType} aggregateType The aggregate type.
  28086. * @param {Object} range The specific range.
  28087. * range.min: number type, the minimum value.
  28088. * range.max: number type, the maximum value.
  28089. * @returns {number} The aggregated data.
  28090. */
  28091. aggregateData(columnName: string, aggregateType: GC.Spread.Slicers.SlicerAggregateType, range?: GC.Spread.Slicers.ISlicerRangeConditional): number;
  28092. /**
  28093. * Attaches the listener.
  28094. * @param {GC.Spread.Slicers.ISlicerListener} listener The listener.
  28095. */
  28096. attachListener(listener: GC.Spread.Slicers.ISlicerListener): void;
  28097. /**
  28098. * Clears the preview filter state.
  28099. */
  28100. clearPreview(): void;
  28101. /**
  28102. * Detaches the listener.
  28103. * @param {Object} listener The listener.
  28104. */
  28105. detachListener(listener: GC.Spread.Slicers.ISlicerListener): void;
  28106. /**
  28107. * Filters the data that corresponds to the specified column name and exclusive data indexes.
  28108. * @param {string} columnName The column name.
  28109. * @param {Object} conditional The conditional filter.
  28110. * conditional.exclusiveRowIndexes: number array type, visible exclusive row indexes
  28111. * conditional.ranges: {min:number, max:number} array type, visible ranges.
  28112. * @param {boolean} isPreview Indicates whether preview is set.
  28113. */
  28114. doFilter(columnName: string, conditional: GC.Spread.Slicers.ISlicerConditional, isPreview?: boolean): void;
  28115. /**
  28116. * Unfilters the data that corresponds to the specified column name.
  28117. * @param {string} columnName The column name.
  28118. */
  28119. doUnfilter(columnName: string): void;
  28120. /**
  28121. * Gets the column index by the specified column name.
  28122. * @param {string} columnName The column name.
  28123. * @returns {number} The column index.
  28124. */
  28125. getColumnIndex(columnName: string): number;
  28126. /**
  28127. * Gets the data by the specified column name.
  28128. * @param {string} columnName The column name.
  28129. * @param {Object} range The specific range.
  28130. * range.min: number type, the minimum value.
  28131. * range.max: number type, the maximum value.
  28132. * @returns {Array.<string>} The data that corresponds to the specified column name.
  28133. */
  28134. getData(columnName: string, range?: GC.Spread.Slicers.ISlicerRangeConditional): string[];
  28135. /**
  28136. * Gets the exclusive data by the specified column name.
  28137. * @param {string} columnName The column name.
  28138. * @returns {Array} The exclusive data that corresponds to the specified column name.
  28139. */
  28140. getExclusiveData(columnName: string): any[];
  28141. /**
  28142. * Gets the exclusive data index by the specified column name and data index.
  28143. * @param {string} columnName The column name.
  28144. * @param {number} rowIndex The index of the data.
  28145. * @returns {number} The exclusive data index that corresponds to the specified column name and data index.
  28146. */
  28147. getExclusiveRowIndex(columnName: string, rowIndex: number): number;
  28148. /**
  28149. * Gets the filtered exclusive data indexes by the specified column name.
  28150. * @param {string} columnName The column name.
  28151. * @returns {Array.<number>} The filtered exclusive data indexes that correspond to the specified column name.
  28152. */
  28153. getFilteredIndexes(columnName: string): number[];
  28154. /**
  28155. * Gets the filtered out exclusive data indexes by the specified column name.
  28156. * @param {string} columnName The column name.
  28157. * @param {GC.Spread.Slicers.FilteredOutDataType} filteredOutDataType Indicates the kind of filtered out exclusive data index that should be included in the result.
  28158. * @returns {Array.<number>} The filtered out exclusive data indexes that correspond to the specified column name.
  28159. */
  28160. getFilteredOutIndexes(columnName: string, filteredOutDataType: GC.Spread.Slicers.FilteredOutDataType): number[];
  28161. /**
  28162. * Gets the filtered out ranges by other columns.
  28163. * @param {string} columnName The column name.
  28164. * @returns {Array.<Object>} The filtered out ranges by other columns that correspond to the specified column name.
  28165. */
  28166. getFilteredOutRanges(columnName: string): GC.Spread.Slicers.ISlicerRangeConditional[];
  28167. /**
  28168. * Gets the filtered out row indexes.
  28169. * @returns {Array} The filtered out row indexes.
  28170. */
  28171. getFilteredOutRowIndexes(): number[];
  28172. /**
  28173. * Gets the filtered ranges by the specified column name.
  28174. * @param {string} columnName The column name.
  28175. * @returns {Array.<Object>} The filtered ranges that correspond to the specified column name.
  28176. */
  28177. getFilteredRanges(columnName: string): GC.Spread.Slicers.ISlicerRangeConditional[];
  28178. /**
  28179. * Gets the filtered row indexes.
  28180. * @returns {Array} The filtered row indexes.
  28181. */
  28182. getFilteredRowIndexes(): number[];
  28183. /**
  28184. * Gets the data indexes by the specified column name and exclusive data index.
  28185. * @param {string} columnName The column name.
  28186. * @param {number} exclusiveRowIndex The index of the exclusive data.
  28187. * @returns {Array} The data indexes that correspond to the specified column name and exclusive data index.
  28188. */
  28189. getRowIndexes(columnName: string, exclusiveRowIndex: number): number[];
  28190. /**
  28191. * Gets whether the slicer is in the preview state.
  28192. */
  28193. inPreview(): boolean;
  28194. /**
  28195. * Changes a column name for the general slicer data.
  28196. * @param {string} oldName The old name of the column.
  28197. * @param {string} newName The new name of the column.
  28198. */
  28199. onColumnNameChanged(oldName: string, newName: string): void;
  28200. /**
  28201. * Removes columns of the general slicer data.
  28202. * @param {number} colIndex The index of the starting column.
  28203. * @param {number} colCount The number of columns to remove.
  28204. */
  28205. onColumnsRemoved(colIndex: number, colCount: number): void;
  28206. /**
  28207. * Changes data items in the data source of the general slicer data.
  28208. * @param {GC.Spread.Slicers.ISlicerDataItem} changedData The changed data item in the data source.
  28209. */
  28210. onDataChanged(changedDataItems: GC.Spread.Slicers.ISlicerDataItem): void;
  28211. /**
  28212. * Occurs after the slicer data has been filtered.
  28213. * @param {Array} filteredIndexes The filtered exclusive data indexes.
  28214. * @param {boolean} isPreview Indicates whether the slicer is in preview mode.
  28215. */
  28216. onFiltered(): void;
  28217. /**
  28218. * Adds rows in the data source of the general slicer data.
  28219. * @param {number} rowIndex The index of the starting row.
  28220. * @param {number} rowCount The number of rows to add.
  28221. */
  28222. onRowsAdded(rowIndex: number, rowCount: number): void;
  28223. /**
  28224. * Removes rows in the data source of the general slicer data.
  28225. * @param {number} rowIndex The index of the starting row.
  28226. * @param {number} rowCount The number of rows to remove.
  28227. */
  28228. onRowsRemoved(rowIndex: number, rowCount: number): void;
  28229. /**
  28230. * Resumes the onFiltered event.
  28231. */
  28232. resumeFilteredEvents(): void;
  28233. /**
  28234. * Suspends the onFiltered event.
  28235. */
  28236. suspendFilteredEvents(): void;
  28237. }
  28238. }
  28239. }
  28240. }