Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let buildExport = params => {
for (let col in specification) {
header.push({
value: specification[col].displayName,
style: specification[col].headerStyle || ''
style: specification[col].headerStyle
})

if (specification[col].width) {
Expand Down
6 changes: 4 additions & 2 deletions lib/excel.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ function sheet_from_array_of_arrays(data, merges) {
if(range.e.c < C) range.e.c = C;

let cell;
if(data[R][C] && typeof data[R][C] === 'object' && data[R][C].style && !(data[R][C] instanceof Date)) {
if(data[R][C] && typeof data[R][C] === 'object' && !(data[R][C] instanceof Date)) {
cell = {
v: data[R][C].value,
s: data[R][C].style
};
if (data[R][C].style) {
cell.s = data[R][C].style
}
} else {
cell = {v: data[R][C] };
}
Expand Down