Comments (6)
That's part of the protobi/js-xlsx fork, not the main branch. Styles in general aren't exported with the main branch yet.
The API is the same as for the .s
attribute. On testing just now, it seems that Excel is only paying attention to the font.name and font.sz attributes, not fill color.
XLSX.writeFile(workbook, OUTFILE, {defaultCellStyle: { font: { name: "Courier New", sz: 18}}});
For other cells, you might define a constant style and reference that for other cells:
from workbook.
This worked for me:
defaultCellStyle: {
font: {name: 'Arial', sz: '12'},
fill: {
fgColor: { rgb: 'FFFFFFFF' }
}
}
Are there docs on what styles are available for the s
attribute?
from workbook.
Not yet. That's important to add. For now can use the example.js as a reference.
from workbook.
@protobi good enough, for now.
I don't see anything about borders, are those supported yet?
from workbook.
Sorry! Borders aren't in yet. Shouldn't be too difficult to add now there's a framework for it. May get to that this coming week, is that sufficient for your timeline?
from workbook.
That's more then fine! If you need any help let me know.
from workbook.
Related Issues (10)
- Publish to npm HOT 1
- file gets exported for example 3 but without any color or font
- does this support dropdowns read and write?
- Support for cell width
- TypeError: Cannot read property 'v' of null
- Add border styles
- Sheet API - rows and cells HOT 3
- Style export not working from browser HOT 2
- Would be nice to make the workbook object an actual class
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from workbook.