Skip to content
Merged
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
6 changes: 3 additions & 3 deletions lib/stream/xlsx/workbook-writer.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var WorkbookWriter = module.exports = function(options) {

// using shared strings creates a smaller xlsx file but may use more memory
this.useSharedStrings = options.useSharedStrings || false;
this.streamedValues = new SharedStrings();
this.sharedStrings = new SharedStrings();

// style manager
this.styles = options.useStyles ? new StylesXform(true) : new StylesXform.Mock(true);
Expand Down Expand Up @@ -259,7 +259,7 @@ WorkbookWriter.prototype = {
},
addSharedStrings: function() {
var self = this;
if (this.streamedValues.count) {
if (this.sharedStrings.count) {
return new Bluebird(function(resolve) {
var sharedStringsXform = new SharedStringsXform();
var xml = sharedStringsXform.toXml(self.sharedStrings);
Expand All @@ -277,7 +277,7 @@ WorkbookWriter.prototype = {
{rId: 'rId' + (count++), type: RelType.Styles, target: 'styles.xml'},
{rId: 'rId' + (count++), type: RelType.Theme, target: 'theme/theme1.xml'}
];
if (this.streamedValues.count) {
if (this.sharedStrings.count) {
relationships.push(
{rId: 'rId' + (count++), type: RelType.SharedStrings, target: 'sharedStrings.xml'}
);
Expand Down