ARTICLE DETAIL

资讯详情

深耕编程入门与网站建设的一线实战洞察。

声明式 Excel 导出,jquick-excel 42 种主题随心配——这才是 Java 报表该有的优雅

声明式 Excel 导出,jquick-excel 42 种主题随心配——这才是 Java 报表该有的优雅 JQuick Excel 主题模板 / Excel Theme Templates本文档列出JExcelThemeType中所有内置主题每个主题通过code与template/目录下的预览图片一一对应。This document lists all built-in themes defined inJExcelThemeType. Each theme is mapped to a preview image in thetemplate/directory via itscode.源码地址 / Source Code项目已开源欢迎 Star 和 ForkGitHubhttps://github.com/paohaijiao/jquick-excel使用方式 / Usage// 1. 通过 code 创建主题 / Create theme by codeJExcelThemethemeJExcelThemeFactory.create(oceanBlue);// 2. 在导出模型中指定主题 / Specify theme in export modelJExcelExportModelmodelnewJExcelExportModel();model.setTheme(royalGold);// 3. 获取所有可用主题编码 / Get all available theme codesListStringcodesJExcelThemeFactory.allCodes();//4. 如何指定模板导出 / Export with templateJQuickParseHandlerparsernewJQuickExcelExportXmlParseFactory(template_code,rows,fileOutputStream);主题预览 / Theme Preview经典与商务 / Classic Business1.default— 经典皇家蓝 / Classic Royal Blue与默认导出样式保持一致的皇家蓝主题灰色斑马纹千分位数字格式。适合通用业务报表导出。Consistent with default export style: royal blue header, grey zebra stripes, thousand-separator number format. Suitable for general business report exports.2.minimalistGrey— 极简灰 / Minimalist Grey炭黑表头搭配极浅灰斑马纹左对齐文本克制简洁。适合正式文档型导出。Charcoal header with light grey zebra stripes, left-aligned text. Suitable for formal document exports.3.slate— 板岩灰 / Slate Grey板岩灰表头搭配浅灰蓝斑马纹冷静商务。适合咨询、法务类报表。Slate header with light grey-blue stripes, calm business style. Suitable for consulting and legal reports.4.charcoal— 炭灰 / Charcoal炭灰表头搭配浅灰斑马纹沉稳内敛。适合正式、行政类导出。Charcoal header with light grey stripes, understated. Suitable for formal administrative exports.5.navyBlue— 海军蓝 / Navy Blue海军蓝表头搭配浅蓝斑马纹稳重专业。适合政企、合规类报表。Navy blue header with light blue stripes, professional. Suitable for enterprise and compliance reports.蓝色系 / Blue Family6.oceanBlue— 海洋蓝 / Ocean Blue深蓝表头搭配浅蓝斑马纹清新通透。适合财务、销售类报表。Deep blue header with light blue stripes, fresh and transparent. Suitable for financial and sales reports.7.skyBlue— 天空蓝 / Sky Blue天空蓝表头搭配浅蓝斑马纹明快清爽。适合互联网、SaaS 类报表。Sky blue header with light blue stripes, bright and fresh. Suitable for Internet and SaaS reports.8.azure— 蔚蓝 / Azure蔚蓝表头搭配冰蓝斑马纹通透辽阔。适合气象、物流类数据。Azure header with ice-blue stripes, vast and transparent. Suitable for meteorological and logistics data.9.steelBlue— 钢蓝 / Steel Blue钢蓝表头搭配浅灰蓝斑马纹冷静理性。适合制造、工程类数据。Steel blue header with light grey-blue stripes, rational. Suitable for manufacturing and engineering data.10.denim— 牛仔蓝 / Denim Blue牛仔蓝表头搭配浅蓝灰斑马纹随性干练。适合零售、电商类导出。Denim blue header with light blue-grey stripes, casual and capable. Suitable for retail and e-commerce.11.indigo— 靛蓝 / Indigo靛蓝表头搭配浅蓝紫斑马纹沉静深邃。适合科技、研发类数据。Indigo header with light blue-purple stripes, deep and calm. Suitable for tech and RD data.12.periwinkle— 长春花蓝 / Periwinkle长春花蓝表头搭配浅紫蓝斑马纹柔和梦幻。适合设计、文创类导出。Periwinkle header with light purple-blue stripes, soft and dreamy. Suitable for design and creative industries.绿色系 / Green Family13.forestGreen— 森林绿 / Forest Green深绿表头搭配嫩绿斑马纹自然沉稳。适合库存、农业、环保类数据。Deep green header with light green stripes, natural and steady. Suitable for inventory, agriculture, and environmental data.14.emerald— 祖母绿 / Emerald祖母绿表头搭配浅绿斑马纹宝石质感。适合金融、财富管理类报表。Emerald header with light green stripes, gem-like texture. Suitable for financial and wealth management reports.15.jade— 翡翠绿 / Jade Green翡翠绿表头搭配浅薄荷斑马纹清润通透。适合环保、健康类导出。Jade green header with light mint stripes, clear and transparent. Suitable for environmental and health exports.16.mintFresh— 清新薄荷 / Mint Fresh海绿表头搭配薄荷绿斑马纹轻盈通透。适合教育、公益、生活服务类数据。Sea green header with mint stripes, light and transparent. Suitable for education, public welfare, and lifestyle services.17.sage— 鼠尾草绿 / Sage Green鼠尾草绿表头搭配浅绿斑马纹柔和舒缓。适合健康、冥想类数据。Sage green header with light green stripes, soft and soothing. Suitable for health and wellness data.18.oliveGreen— 橄榄绿 / Olive Green橄榄绿表头搭配嫩黄绿斑马纹质朴自然。适合农业、户外类数据。Olive green header with light yellow-green stripes, rustic and natural. Suitable for agriculture and outdoor data.青色系 / Teal Cyan Family19.tropicalTeal— 热带青 / Tropical Teal青绿表头搭配薄荷斑马纹清爽明亮。适合医疗、健康、旅游类数据。Teal header with mint stripes, fresh and bright. Suitable for medical, health, and travel data.20.turquoise— 绿松石 / Turquoise绿松石表头搭配薄荷斑马纹明艳灵动。适合珠宝、旅游类数据。Turquoise header with mint stripes, vivid and agile. Suitable for jewelry and travel data.21.cyan— 青色 / Cyan青色表头搭配浅青斑马纹清新通透。适合水务、环保类数据。Cyan header with light cyan stripes, fresh and transparent. Suitable for water and environmental data.红色与橙色系 / Red Orange Family22.sunsetOrange— 落日橙 / Sunset Orange暖橙表头搭配杏色斑马纹热情明亮。适合营销、运营类报表。Warm orange header with apricot stripes, passionate and bright. Suitable for marketing and operations reports.23.coral— 珊瑚 / Coral珊瑚红表头搭配粉白斑马纹明快活泼。适合促销、活动类数据展示。Coral red header with pink-white stripes, lively. Suitable for promotions and event data.24.peach— 蜜桃 / Peach蜜桃橙表头搭配粉橙斑马纹甜美柔和。适合母婴、生活服务类数据。Peach orange header with pink-orange stripes, sweet and soft. Suitable for maternal and lifestyle services.25.crimsonRed— 深红 / Crimson Red深红表头搭配浅红斑马纹热烈庄重。适合预警、风控、重要指标类报表。Crimson header with light red stripes, solemn. Suitable for alerts, risk control, and key metrics.26.wineRed— 酒红 / Wine Red酒红表头搭配浅红斑马纹醇厚典雅。适合高端餐饮、礼品类数据。Wine red header with light red stripes, mellow and elegant. Suitable for high-end dining and gift data.粉色与紫色系 / Pink Purple Family27.sakuraPink— 樱花粉 / Sakura Pink樱花红表头搭配粉白斑马纹柔美温婉。适合电商、美妆、用户运营类报表。Sakura red header with pink-white stripes, gentle and beautiful. Suitable for e-commerce, beauty, and user operations.28.roseQuartz— 粉晶 / Rose Quartz玫瑰粉表头搭配浅粉斑马纹柔美温婉。适合美妆、母婴类导出。Rose pink header with light pink stripes, soft and gentle. Suitable for beauty and maternal exports.29.lavenderPurple— 薰衣草紫 / Lavender Purple深紫表头搭配淡紫斑马纹优雅高贵。适合设计、文创类数据展示。Deep purple header with light lavender stripes, elegant. Suitable for design and creative data.30.amethyst— 紫水晶 / Amethyst紫水晶表头搭配淡紫斑马纹神秘高雅。适合设计、奢侈品导出。Amethyst header with light purple stripes, mysterious and elegant. Suitable for design and luxury exports.31.plum— 紫梅 / Plum深梅紫表头搭配浅紫斑马纹神秘优雅。适合奢侈品、文创类导出。Deep plum purple header with light purple stripes, mysterious and elegant. Suitable for luxury and creative exports.金色与棕色系 / Gold Brown Family32.royalGold— 皇家金 / Royal Gold纯黑表头搭配金色字体与金色边框米色斑马纹华贵大气。适合年报、金融、奢侈品类导出。Black header with gold font and gold border, beige stripes, luxurious. Suitable for annual reports, finance, and luxury exports.33.champagne— 香槟金 / Champagne Gold香槟色表头搭配米白斑马纹低调奢华。适合金融、礼仪类导出。Champagne header with cream stripes, understated luxury. Suitable for finance and ceremonial exports.34.amber— 琥珀 / Amber琥珀金表头搭配浅黄斑马纹温润光泽。适合珠宝、收藏品类数据。Amber gold header with light yellow stripes, warm luster. Suitable for jewelry and collectibles data.35.mustard— 芥末黄 / Mustard Yellow芥末黄表头搭配米黄斑马纹复古温暖。适合文创、手作类数据。Mustard yellow header with cream-yellow stripes, retro and warm. Suitable for creative and handcraft data.36.bronze— 青铜 / Bronze青铜表头搭配浅棕斑马纹古朴厚重。适合博物馆、文物类数据。Bronze header with light brown stripes, antique and heavy. Suitable for museum and cultural relic data.37.vintageSepia— 复古棕 / Vintage Sepia咖啡色表头搭配米色斑马纹与奶油色文字左对齐怀旧温润。适合档案、文史类导出。Coffee header with cream stripes and cream text, left-aligned, nostalgic. Suitable for archival and historical exports.38.espresso— 浓缩咖啡 / Espresso浓缩咖啡表头搭配奶白斑马纹与奶油色文字浓郁醇厚。适合咖啡、烘焙类数据。Espresso header with cream-white stripes and cream text, rich and mellow. Suitable for coffee and baking data.39.mahogany— 红木 / Mahogany红木色表头搭配浅褐斑马纹沉稳大气。适合房地产、古典类导出。Mahogany header with light brown stripes, steady and grand. Suitable for real estate and classical exports.40.terracotta— 陶土 / Terracotta陶土棕表头搭配浅褐斑马纹质朴温润。适合手工艺、家居类数据。Terracotta brown header with light brown stripes, rustic and warm. Suitable for handcraft and home data.特殊风格 / Special Styles41.midnightDark— 午夜深色 / Midnight Dark深色背景搭配浅色文字护眼且具科技感。适合大屏看板、监控类数据导出。Dark background with light text, eye-friendly and tech-savvy. Suitable for dashboards and monitoring data.42.pearl— 珍珠 / Pearl珍珠灰紫表头搭配珠光斑马纹温润优雅。适合美妆、婚庆类数据。Pearl grey-purple header with pearlescent stripes, warm and elegant. Suitable for beauty and wedding data.主题结构说明 / Theme Structure每个主题由以下样式组件构成 / Each theme consists of the following style components:组件 / Component方法 / Method说明 / Description表头样式 / Header StylebuildHeaderStyle表头行的背景色、字体、边框和对齐方式。Background, font, border, and alignment for header rows.偶数行样式 / Even Row StylebuildDataEvenStyle数据偶数行的斑马纹样式。Zebra stripe style for even data rows.奇数行样式 / Odd Row StylebuildDataOddStyle数据奇数行的样式。Style for odd data rows.标题样式 / Title StylebuildTitleStyle合并单元格大标题的样式。Style for merged cell titles.页脚样式 / Footer StylebuildFooterStyle页脚文本样式。Footer text style.公式单元格样式 / Formula Cell StylebuildFormulaCellStyle公式计算单元格的强调样式。Accent style for formula cells.主题编码汇总 / Theme Code Summary序号 / No.Code中文名称 / Chinese Name1default经典皇家蓝2minimalistGrey极简灰3slate板岩灰4charcoal炭灰5navyBlue海军蓝6oceanBlue海洋蓝7skyBlue天空蓝8azure蔚蓝9steelBlue钢蓝10denim牛仔蓝11indigo靛蓝12periwinkle长春花蓝13forestGreen森林绿14emerald祖母绿15jade翡翠绿16mintFresh清新薄荷17sage鼠尾草绿18oliveGreen橄榄绿19tropicalTeal热带青20turquoise绿松石21cyan青色22sunsetOrange落日橙23coral珊瑚24peach蜜桃25crimsonRed深红26wineRed酒红27sakuraPink樱花粉28roseQuartz粉晶29lavenderPurple薰衣草紫30amethyst紫水晶31plum紫梅32royalGold皇家金33champagne香槟金34amber琥珀35mustard芥末黄36bronze青铜37vintageSepia复古棕38espresso浓缩咖啡39mahogany红木40terracotta陶土41midnightDark午夜深色42pearl珍珠
返回列表