[{"id":"b66f8b1e-cc14-4e89-9679-abd5687d283d","tags":[{"product":null,"links":null,"id":"9e117e35-984a-4c14-95ca-ef0ec7b9fb60","name":"\u65B0\u589E","color":"DarkGreen","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"569bb90a-ea68-46c6-96f1-ab151c120714","tags":[{"product":null,"links":null,"id":"a2f84374-4a3f-4d22-96fd-765e9de495bf","name":"\u66F4\u65B0","color":"Coral","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"5eb52f08-2d1a-4362-9ffc-4871bdc10f3f","tags":[{"product":null,"links":null,"id":"a2f84374-4a3f-4d22-96fd-765e9de495bf","name":"\u66F4\u65B0","color":"Coral","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"341dd607-b97d-4d70-bde2-53acda6b6c95","tags":[{"product":null,"links":null,"id":"a2f84374-4a3f-4d22-96fd-765e9de495bf","name":"\u66F4\u65B0","color":"Coral","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"05349273-414f-4208-9ea2-c4fc8f4ea2cb","tags":[{"product":null,"links":null,"id":"a2f84374-4a3f-4d22-96fd-765e9de495bf","name":"\u66F4\u65B0","color":"Coral","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"86089f76-b778-4d52-821e-6f27de3df613","tags":[{"product":null,"links":null,"id":"9e117e35-984a-4c14-95ca-ef0ec7b9fb60","name":"\u65B0\u589E","color":"DarkGreen","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"b81e4fd6-1fc5-43a0-a258-b6e16a5cbec6","tags":[{"product":null,"links":null,"id":"a2f84374-4a3f-4d22-96fd-765e9de495bf","name":"\u66F4\u65B0","color":"Coral","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"8aa8ce31-43e4-438e-951f-241608435260","tags":[{"product":null,"links":null,"id":"a2f84374-4a3f-4d22-96fd-765e9de495bf","name":"\u66F4\u65B0","color":"Coral","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"37343f41-6ec2-4c7e-b21d-2cc18d5ce1e0","tags":[{"product":null,"links":null,"id":"a2f84374-4a3f-4d22-96fd-765e9de495bf","name":"\u66F4\u65B0","color":"Coral","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"5915e52f-64f8-4146-b8bd-81bead6324a3","tags":[{"product":null,"links":null,"id":"a2f84374-4a3f-4d22-96fd-765e9de495bf","name":"\u66F4\u65B0","color":"Coral","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"836ba889-af9e-460d-a4cc-c24d922795f2","tags":[{"product":null,"links":null,"id":"a2f84374-4a3f-4d22-96fd-765e9de495bf","name":"\u66F4\u65B0","color":"Coral","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"4ae14b06-bb68-4394-a210-a46b8f028346","tags":[{"product":null,"links":null,"id":"a2f84374-4a3f-4d22-96fd-765e9de495bf","name":"\u66F4\u65B0","color":"Coral","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"d8f42066-e9dc-4411-bdcf-43b1a203370c","tags":[{"product":null,"links":null,"id":"9e117e35-984a-4c14-95ca-ef0ec7b9fb60","name":"\u65B0\u589E","color":"DarkGreen","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"7ef86f16-b1a0-49f7-9592-612b9be02b25","tags":[{"product":null,"links":null,"id":"a2f84374-4a3f-4d22-96fd-765e9de495bf","name":"\u66F4\u65B0","color":"Coral","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"b29c7775-a9a4-451e-a1b5-01d19ed5ca5e","tags":[{"product":null,"links":null,"id":"9e117e35-984a-4c14-95ca-ef0ec7b9fb60","name":"\u65B0\u589E","color":"DarkGreen","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"e56f3989-8f81-46af-90fa-a4813eeb976f","tags":[{"product":null,"links":null,"id":"9e117e35-984a-4c14-95ca-ef0ec7b9fb60","name":"\u65B0\u589E","color":"DarkGreen","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"2526c963-f170-45a8-923e-91b0712a9810","tags":[{"product":null,"links":null,"id":"9e117e35-984a-4c14-95ca-ef0ec7b9fb60","name":"\u65B0\u589E","color":"DarkGreen","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"24575cf0-501a-44f9-8426-c40f8f4b5552","tags":[{"product":null,"links":null,"id":"a2f84374-4a3f-4d22-96fd-765e9de495bf","name":"\u66F4\u65B0","color":"Coral","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"1a6f8d7f-acd6-42be-8c4f-f464c6218381","tags":[{"product":null,"links":null,"id":"a2f84374-4a3f-4d22-96fd-765e9de495bf","name":"\u66F4\u65B0","color":"Coral","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"82b176fd-5cab-498c-909e-8fa7d29c38d8","tags":[{"product":null,"links":null,"id":"9e117e35-984a-4c14-95ca-ef0ec7b9fb60","name":"\u65B0\u589E","color":"DarkGreen","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"1708b3a9-4f37-44a8-8f0e-f9a2d2e5d940","tags":[{"product":null,"links":null,"id":"9e117e35-984a-4c14-95ca-ef0ec7b9fb60","name":"\u65B0\u589E","color":"DarkGreen","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"c9ac246e-29fb-4bc4-8231-8439795bb590","tags":[{"product":null,"links":null,"id":"9e117e35-984a-4c14-95ca-ef0ec7b9fb60","name":"\u65B0\u589E","color":"DarkGreen","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"94f2a5c3-2539-436a-af75-23fbbd1a3957","tags":[{"product":null,"links":null,"id":"a2f84374-4a3f-4d22-96fd-765e9de495bf","name":"\u66F4\u65B0","color":"Coral","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"d99594f4-2d40-4df4-9419-ba2ca6aa3f7f","tags":[{"product":null,"links":null,"id":"9e117e35-984a-4c14-95ca-ef0ec7b9fb60","name":"\u65B0\u589E","color":"DarkGreen","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"fd66e72d-0f10-4f57-9807-6db26290ab2e","tags":[{"product":null,"links":null,"id":"a2f84374-4a3f-4d22-96fd-765e9de495bf","name":"\u66F4\u65B0","color":"Coral","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"8f344863-503d-4bc3-a594-3815e7d55f5c","tags":[{"product":null,"links":null,"id":"9e117e35-984a-4c14-95ca-ef0ec7b9fb60","name":"\u65B0\u589E","color":"DarkGreen","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"9be82601-de9d-4c18-948a-23ab6f4dd431","tags":[{"product":null,"links":null,"id":"9e117e35-984a-4c14-95ca-ef0ec7b9fb60","name":"\u65B0\u589E","color":"DarkGreen","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"6495f3c0-b463-47e0-b08a-ca949672211e","tags":[{"product":null,"links":null,"id":"9e117e35-984a-4c14-95ca-ef0ec7b9fb60","name":"\u65B0\u589E","color":"DarkGreen","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"b4bede08-3f08-4839-ba4a-abc7ac195bde","tags":[{"product":null,"links":null,"id":"9e117e35-984a-4c14-95ca-ef0ec7b9fb60","name":"\u65B0\u589E","color":"DarkGreen","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"4afcdfc0-3ff5-4f2b-a223-f8fc042a5bbe","tags":[{"product":null,"links":null,"id":"9e117e35-984a-4c14-95ca-ef0ec7b9fb60","name":"\u65B0\u589E","color":"DarkGreen","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"422062c4-fa40-4771-a86f-008efe6d86e5","tags":[{"product":null,"links":null,"id":"9e117e35-984a-4c14-95ca-ef0ec7b9fb60","name":"\u65B0\u589E","color":"DarkGreen","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"d87e8013-86a7-4840-8d25-6f62e14eb4ac","tags":[{"product":null,"links":null,"id":"9e117e35-984a-4c14-95ca-ef0ec7b9fb60","name":"\u65B0\u589E","color":"DarkGreen","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"a6acedfd-4043-4c64-a5d1-aec3326df9e7","tags":[{"product":null,"links":null,"id":"9e117e35-984a-4c14-95ca-ef0ec7b9fb60","name":"\u65B0\u589E","color":"DarkGreen","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"dbdc0b24-06c4-48b9-8d6c-7455119dc773","tags":[{"product":null,"links":null,"id":"9e117e35-984a-4c14-95ca-ef0ec7b9fb60","name":"\u65B0\u589E","color":"DarkGreen","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"a3856849-954a-4cfc-96a6-382e530d3638","tags":[{"product":null,"links":null,"id":"a2f84374-4a3f-4d22-96fd-765e9de495bf","name":"\u66F4\u65B0","color":"Coral","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]},{"id":"4a39306b-ffa5-433d-80a3-28e41f929b72","tags":[{"product":null,"links":null,"id":"a2f84374-4a3f-4d22-96fd-765e9de495bf","name":"\u66F4\u65B0","color":"Coral","productId":"098be112-50ec-44e4-b746-6bc8bf76af97"}]}]
        
(Showing Draft Content)

配制主题

您可以为单元格,列,行或控件指定主题。

你可以使用 themeFont 方法给单元格、行或列。你可以使用 currentTheme 方法设置表单。

以下主题名称可以与 currentTheme 方法一起使用:

  • Default
  • Office
  • Apex
  • Aspect
  • Concourse
  • Civic
  • Oriel
  • Origin
  • Paper
  • Solstice
  • Technic
  • Trek
  • Urban
  • Verve
  • Equity
  • Flow
  • Foundry
  • Median
  • Metro
  • Module
  • Opulent

下图显示了可以为主题颜色设置的重点。

示例代码

本示例使用 currentTheme 方法设置主题。

activeSheet.currentTheme("Metro");

示例代码

本示例设置主题颜色。

activeSheet.setColumnWidth(0, 22);
activeSheet.setColumnWidth(1, 30);
activeSheet.setColumnWidth(2, 22);
activeSheet.getCell(1, 3, GC.Spread.Sheets.SheetArea.viewport).value("Theme Colors").themeFont("headings").hAlign(GC.Spread.Sheets.HorizontalAlign.center);
activeSheet.addSpan(1, 3, 1, 10);
activeSheet.getCell(2, 3, GC.Spread.Sheets.SheetArea.viewport).text("Background 1").themeFont("Body");
activeSheet.getCell(2, 4, GC.Spread.Sheets.SheetArea.viewport).text("Text 1").themeFont("Body");
activeSheet.getCell(2, 5, GC.Spread.Sheets.SheetArea.viewport).text("Background 2").themeFont("Body");
activeSheet.getCell(2, 6, GC.Spread.Sheets.SheetArea.viewport).text("Text 2").themeFont("Body");
activeSheet.getCell(2, 7, GC.Spread.Sheets.SheetArea.viewport).text("Accent 1").themeFont("Body");
activeSheet.getCell(2, 8, GC.Spread.Sheets.SheetArea.viewport).text("Accent 2").themeFont("Body");
activeSheet.getCell(2, 9, GC.Spread.Sheets.SheetArea.viewport).text("Accent 3").themeFont("Body");
activeSheet.getCell(2, 10).text("Accent 4").themeFont("Body");
activeSheet.getCell(2, 11).text("Accent 5").themeFont("Body");
activeSheet.getCell(2, 12).text("Accent 6").themeFont("Body");
activeSheet.getCell(3, 1).value("100").themeFont("Body");
activeSheet.getCell(3, 3).backColor("Background 1");
activeSheet.getCell(3, 4).backColor("Text 1");
activeSheet.getCell(3, 5).backColor("Background 2");
activeSheet.getCell(3, 6).backColor("Text 2");
activeSheet.getCell(3, 7).backColor("Accent 1");
activeSheet.getCell(3, 8).backColor("Accent 2");
activeSheet.getCell(3, 9).backColor("Accent 3");
activeSheet.getCell(3, 10).backColor("Accent 4");
activeSheet.getCell(3, 11).backColor("Accent 5");
activeSheet.getCell(3, 12).backColor("Accent 6");
activeSheet.getCell(5, 1).value("80").themeFont("Body");
activeSheet.getCell(5, 3).backColor("Background 1 80");
activeSheet.getCell(5, 4).backColor("Text 1 80");
activeSheet.getCell(5, 5).backColor("Background 2 80");
activeSheet.getCell(5, 6).backColor("Text 2 80");
activeSheet.getCell(5, 7).backColor("Accent 1 80");
activeSheet.getCell(5, 8).backColor("Accent 2 80");
activeSheet.getCell(5, 9).backColor("Accent 3 80");
activeSheet.getCell(5, 10).backColor("Accent 4 80");
activeSheet.getCell(5, 11).backColor("Accent 5 80");
activeSheet.getCell(5, 12).backColor("Accent 6 80");
activeSheet.getCell(6, 1).value("60").themeFont("Body");
activeSheet.getCell(6, 3).backColor("Background 1 60");
activeSheet.getCell(6, 4).backColor("Text 1 60");
activeSheet.getCell(6, 5).backColor("Background 2 60");
activeSheet.getCell(6, 6).backColor("Text 2 60");
activeSheet.getCell(6, 7).backColor("Accent 1 60");
activeSheet.getCell(6, 8).backColor("Accent 2 60");
activeSheet.getCell(6, 9).backColor("Accent 3 60");
activeSheet.getCell(6, 10).backColor("Accent 4 60");
activeSheet.getCell(6, 11).backColor("Accent 5 60");
activeSheet.getCell(6, 12).backColor("Accent 6 60");
activeSheet.getCell(7, 1).value("40").themeFont("Body");
activeSheet.getCell(7, 3).backColor("Background 1 40");
activeSheet.getCell(7, 4).backColor("Text 1 40");
activeSheet.getCell(7, 5).backColor("Background 2 40");
activeSheet.getCell(7, 6).backColor("Text 2 40");
activeSheet.getCell(7, 7).backColor("Accent 1 40");
activeSheet.getCell(7, 8).backColor("Accent 2 40");
activeSheet.getCell(7, 9).backColor("Accent 3 40");
activeSheet.getCell(7, 10).backColor("Accent 4 40");
activeSheet.getCell(7, 11).backColor("Accent 5 40");
activeSheet.getCell(7, 12).backColor("Accent 6 40");
activeSheet.getCell(8, 1).value("-25").themeFont("Body");
activeSheet.getCell(8, 3).backColor("Background 1 -25");
activeSheet.getCell(8, 4).backColor("Text 1 -25");
activeSheet.getCell(8, 5).backColor("Background 2 -25");
activeSheet.getCell(8, 6).backColor("Text 2 -25");
activeSheet.getCell(8, 7).backColor("Accent 1 -25");
activeSheet.getCell(8, 8).backColor("Accent 2 -25");
activeSheet.getCell(8, 9).backColor("Accent 3 -25");
activeSheet.getCell(8, 10).backColor("Accent 4 -25");
activeSheet.getCell(8, 11).backColor("Accent 5 -25");
activeSheet.getCell(8, 12).backColor("Accent 6 -25");
activeSheet.getCell(9, 1).value("-50").themeFont("Body");
activeSheet.getCell(9, 3).backColor("Background 1 -50");
activeSheet.getCell(9, 4).backColor("Text 1 -50");
activeSheet.getCell(9, 5).backColor("Background 2 -50");
activeSheet.getCell(9, 6).backColor("Text 2 -50");
activeSheet.getCell(9, 7).backColor("Accent 1 -50");
activeSheet.getCell(9, 8).backColor("Accent 2 -50");
activeSheet.getCell(9, 9).backColor("Accent 3 -50");
activeSheet.getCell(9, 10).backColor("Accent 4 -50");
activeSheet.getCell(9, 11).backColor("Accent 5 -50");
activeSheet.getCell(9, 12).backColor("Accent 6 -50");