Open
Conversation
Added custom config or global config to use style.xml.
Then we can use in config :
```
var conf = {
style: 'excel-style.xml',
width: 50,
captionStyleIndex: 1,
beforeCellWrite: function (row, cellData, eOpt) {
// filled cell
if (cellData !== undefined && cellData !== '') {
eOpt.styleIndex = 1;
}
// line question
if (row[0].length === 0) {
eOpt.styleIndex = 2;
}
// cell email
if (row[0] === cellData) {
eOpt.styleIndex = 3;
}
// error
if (cellData === 'undefined') {
eOpt.styleIndex = 4;
}
eOpt.cellType = 'string';
return cellData;
}
};
```
or for each column :
```
var conf = {
style: 'excel-style.xml',
cols: [
{
width: 100,
captionStyleIndex: 4, // index cellXfs
cellType: 'string',
beforeCellWrite : beforeCellWrite
},
{
width: 30,
captionStyleIndex: 4, // index cellXfs
cellType: 'string',
beforeCellWrite : beforeCellWrite
},
{
width: 30,
captionStyleIndex: 4, // index cellXfs
cellType: 'string',
beforeCellWrite : beforeCellWrite
}
]
};
```
Owner
|
I like the ideas. Could you:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added custom config or global config to use style.xml.
Then we can use in config :
or for each column :