Multiple Sheets opens in 'Group' mode in Excel
tukutela opened this issue · 13 comments
First of all, thanks Guyon for the library, it's awesome! You're making a lot of us look good.
The only problem for me is that if I create 2 worksheets with data via
// create the sheets
var leadsheet = workbook.addWorksheet('Leads');
var actionssheet = workbook.addWorksheet('by Actions');
// create some dummy data
leadsheet.addRow(['Sheet 1'])
actionssheet.addRow(['Sheet 2'])
I can save the file but when I open it I open up two Excel windows, they appear to be 'grouped'.
To get back to normal you need to close the second excel window, then single select one of sheets, then save. There's got to be an 'active' sheet configuration somewhere although I couldn't see it in code. Any help appreciated.
@guyonroche Also experiencing this issue.
@guyonroche experiencing this issue too.
My bad - it was overzealous sheet-view code.
Fixed in 0.2.13
Just grabbed the latest code base and encountering the same probem.
@24HrDeveloper could you send (or post here) a code example that reproduces this?
I'm reading from file, a spreadsheet that has 5 worksheets. I'm populating the first worksheet with data and then saving to a different location. Opening the excel spreadsheet causes groupings. I've checked the original file to make sure the worksheets aren't group. Let me know if you need anything else and/or if I'm doing something wrong.
var workbook = new Excel.Workbook();
workbook.xlsx.readFile(templateFileName)
.then(function (data) {
console.log('Have workbook');
_.each(personModels, function (item) {
if (item != undefined) {
var row = [
0,
item.ExternalId,
item.Name,
item.Type,
'',
item.MailingAddress1,
item.MailingAddress2,
item.MailingAddress3,
item.MailingCity,
item.MailingState,
item.MailingPostalCode,
item.MailingCountry,
item.PermanentAddress1,
item.PermanentAddress2,
item.PermanentAddress3,
item.PermanentCity,
item.PermanentState,
item.PermanentPostalCode,
item.PermanentCountry,
item.RegisteredAddress1,
item.RegisteredAddress2,
item.RegisteredAddress3,
item.RegisteredCity,
item.RegisteredState,
item.RegisteredPostalCode,
item.RegisteredCountry,
item.IsIndividual,
0,
'',
'',
'',
'',
'false',
'false',
'false',
'false',
'false',
'false',
'false',
'',
'',
'',
'false',
'',
'',
'false',
'',
''
];
data._worksheets[1].addRow(row);
}
});
data.xlsx.writeFile(fullfileName)
.then(function (data) {
console.log('File Written');
resolve();
})
.catch(function (error) {
console.error('FileWrite:' + error);
reject(error);
});
Ahh - I think I know what might be happening. I'll look into this now.
Thanks,
Have an update?
@24HrDeveloper let me know if 0.2.14 fixes your issue.
Will do. Thanks.
@guyonroche problem solved. Thanks!
Excellent! Thanks for your patience 😄
yep.... thanks!
On Sat, Aug 13, 2016 at 5:48 PM, Guyon Roche notifications@github.com
wrote:
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#162 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAUzIDXgbPifR5Q33QMUpa7GgG-j118vks5qfXbggaJpZM4JbSSi
.
Mark Walker
Maestro Results