Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Sheets opens in 'Group' mode in Excel #162

Closed
tukutela opened this issue Aug 3, 2016 · 13 comments
Closed

Multiple Sheets opens in 'Group' mode in Excel #162

tukutela opened this issue Aug 3, 2016 · 13 comments

Comments

@tukutela
Copy link

tukutela commented Aug 3, 2016

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'.

screen shot 2016-08-03 at 2 11 23 pm

screen shot 2016-08-03 at 2 11 30 pm

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.

@timcosta
Copy link

@guyonroche Also experiencing this issue.

@yixi8524
Copy link

@guyonroche experiencing this issue too.

@guyonroche
Copy link
Collaborator

My bad - it was overzealous sheet-view code.
Fixed in 0.2.13

@24HrDeveloper
Copy link

Just grabbed the latest code base and encountering the same probem.

@guyonroche
Copy link
Collaborator

@24HrDeveloper could you send (or post here) a code example that reproduces this?

@24HrDeveloper
Copy link

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);
        });

@guyonroche
Copy link
Collaborator

Ahh - I think I know what might be happening. I'll look into this now.
Thanks,

@guyonroche guyonroche reopened this Aug 11, 2016
@24HrDeveloper
Copy link

Have an update?

@guyonroche
Copy link
Collaborator

@24HrDeveloper let me know if 0.2.14 fixes your issue.

@24HrDeveloper
Copy link

Will do. Thanks.

@24HrDeveloper
Copy link

@guyonroche problem solved. Thanks!

@guyonroche
Copy link
Collaborator

Excellent! Thanks for your patience 😄

@tukutela
Copy link
Author

yep.... thanks!

On Sat, Aug 13, 2016 at 5:48 PM, Guyon Roche [email protected]
wrote:

Closed #162 #162.


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants