Closed elliotstoner closed 4 years ago
@elliotstoner Nice Work. I actually agree that sheets should be an array, The code I was working with at the time I created the fork was expecting an object.
Just thought of this - if we like this approach, do we want to have the goal of ultimately getting rid of sheet
in favor of sheets
in a future major release? If so, do we want to introduce a deprecation warning for sheet
now? I would also update the docs to reflect any decisions.
Bump @egeriis. It's been almost 9 months - do we want to move forward with this or are we abandoning it? If the latter then I'm going to branch this off onto my own package
This repo seems unmaintained. I'm going to close this pull request in favor of migrating to xljsx-lite! For anyone looking for this functionality, feel free to check out my repo with these improvements, with more to come! There's two versions: v1.0.2 is the closest to this current repo, while v2.0.0 has some additional improvements (automatic typing, even further reduced bundle size). I look forward to feedback about how we can improve this together!
There have been a few previous PRs for adding multi-sheet functionality - this is actually built off of davidryansoftware's fork, but with a few tweaks. I'd love feedback and suggestions, and hopefully we can finally get this merged in!
Some key things from feedback previously given:
sheet
orsheets
propertysheets
is an array (compared to an object in @davidryansoftware's fork)sheetname
to the Sheet object; using either thesheet
orsheets
property, you can specific the name you want for each sheet. If a sheetname is not provided, it defaults to Excel's default naming: "Sheet1", "Sheet2", etc.rId
was previously hardcoded torId3
(not sure why it was offset by 2). After some research, I found that Excel defaults to having relationship IDs start at 1, so I reflected that change in this codeUsing the new sheets property, the config would look like: