Gathering detailed insights and metrics for xlsx-js-style
Gathering detailed insights and metrics for xlsx-js-style
Gathering detailed insights and metrics for xlsx-js-style
Gathering detailed insights and metrics for xlsx-js-style
style-xlsx-m
style-xlsx-m is a custom xlsx and xlsx-js-style versions library
js-xlsx-style-node
This is a package that processes xlsx through JS, while supporting processing styles(一个支持设置样式的 xlsx 插件)
dep-xlsx-js-style
SheetJS Spreadsheet Community Edition plus Basic Cell Styles
xlsx-style-plus
A package for support js-xlsx style completely
SheetJS Community Edition + Basic Cell Styles
npm install xlsx-js-style
Typescript
Module System
Min. Node Version
Node Version
NPM Version
97.7
Supply Chain
98.2
Quality
75
Maintenance
100
Vulnerability
100
License
JavaScript (97.55%)
TypeScript (1.46%)
HTML (0.87%)
Makefile (0.09%)
Shell (0.02%)
Total Downloads
6,833,643
Last Day
2,192
Last Week
87,930
Last Month
342,648
Last Year
3,739,667
Apache-2.0 License
438 Stars
582 Commits
65 Forks
6 Watchers
4 Branches
1 Contributors
Updated on May 17, 2025
Minified
Minified + Gzipped
Latest Version
1.2.0
Package Id
xlsx-js-style@1.2.0
Unpacked Size
2.63 MB
Size
920.31 kB
File Count
14
NPM Version
8.1.0
Node Version
16.13.0
Cumulative downloads
Total Downloads
Last Day
-1.6%
2,192
Compared to previous day
Last Week
5.1%
87,930
Compared to previous week
Last Month
-11.5%
342,648
Compared to previous month
Last Year
71.5%
3,739,667
Compared to previous year
SheetJS with Style! Create Excel spreadsheets with basic styling options using JavaScript.
Install npm:
1npm install xlsx-js-style
Install browser:
1<script src="dist/xlsx.bundle.js"></script>
1// STEP 1: Create a new workbook 2const wb = XLSX.utils.book_new(); 3 4// STEP 2: Create data rows and styles 5let row = [ 6 { v: "Courier: 24", t: "s", s: { font: { name: "Courier", sz: 24 } } }, 7 { v: "bold & color", t: "s", s: { font: { bold: true, color: { rgb: "FF0000" } } } }, 8 { v: "fill: color", t: "s", s: { fill: { fgColor: { rgb: "E9E9E9" } } } }, 9 { v: "line\nbreak", t: "s", s: { alignment: { wrapText: true } } }, 10]; 11 12// STEP 3: Create worksheet with rows; Add worksheet to workbook 13const ws = XLSX.utils.aoa_to_sheet([row]); 14XLSX.utils.book_append_sheet(wb, ws, "readme demo"); 15 16// STEP 4: Write Excel file to browser 17XLSX.writeFile(wb, "xlsx-js-style-demo.xlsx");
alignment
, border
, fill
, font
, numFmt
.Style Prop | Sub Prop | Default | Description/Values |
---|---|---|---|
alignment | vertical | bottom | "top" or "center" or "bottom" |
horizontal | left | "left" or "center" or "right" | |
wrapText | false | true or false | |
textRotation | 0 | 0 to 180 , or 255 // 180 is rotated down 180 degrees, 255 is special, aligned vertically | |
border | top | { style: BORDER_STYLE, color: COLOR_STYLE } | |
bottom | { style: BORDER_STYLE, color: COLOR_STYLE } | ||
left | { style: BORDER_STYLE, color: COLOR_STYLE } | ||
right | { style: BORDER_STYLE, color: COLOR_STYLE } | ||
diagonal | { style: BORDER_STYLE, color: COLOR_STYLE, diagonalUp: true/false, diagonalDown: true/false } | ||
fill | patternType | "none" | "solid" or "none" |
fgColor | foreground color: see COLOR_STYLE | ||
bgColor | background color: see COLOR_STYLE | ||
font | bold | false | font bold true or false |
color | font color COLOR_STYLE | ||
italic | false | font italic true or false | |
name | "Calibri" | font name | |
strike | false | font strikethrough true or false | |
sz | "11" | font size (points) | |
underline | false | font underline true or false | |
vertAlign | "superscript" or "subscript" | ||
numFmt | 0 | Ex: "0" // integer index to built in formats, see StyleBuilder.SSF property | |
Ex: "0.00%" // string matching a built-in format, see StyleBuilder.SSF | |||
Ex: "0.0%" // string specifying a custom format | |||
Ex: "0.00%;\\(0.00%\\);\\-;@" // string specifying a custom format, escaping special characters | |||
Ex: "m/dd/yy" // string a date format using Excel's format notation |
COLOR_STYLE
{object} PropertiesColors for border
, fill
, font
are specified as an name/value object - use one of the following:
Color Prop | Description | Example |
---|---|---|
rgb | hex RGB value | {rgb: "FFCC00"} |
theme | theme color index | {theme: 4} // (0-n) // Theme color index 4 ("Blue, Accent 1") |
tint | tint by percent | {theme: 1, tint: 0.4} // ("Blue, Accent 1, Lighter 40%") |
BORDER_STYLE
{string} PropertiesBorder style property is one of the following values:
dashDotDot
dashDot
dashed
dotted
hair
mediumDashDotDot
mediumDashDot
mediumDashed
medium
slantDashDot
thick
thin
Border Notes
Borders for merged areas are specified for each cell within the merged area. For example, to apply a box border to a merged area of 3x3 cells, border styles would need to be specified for eight different cells:
This project is a fork of SheetJS/sheetjs combined with code from sheetjs-style (by ShanaMaid) and sheetjs-style-v2 (by Raul Gonzalez).
All projects are under the Apache 2.0 License
Please consult the attached LICENSE file for details. All rights not explicitly granted by the Apache 2.0 License are reserved by the Original Author.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/15 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
Project has not signed or included provenance with any releases.
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
13 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-05-12
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More