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

Column width support #51

Closed
ghost opened this issue Nov 14, 2018 · 10 comments · May be fixed by #52
Closed

Column width support #51

ghost opened this issue Nov 14, 2018 · 10 comments · May be fixed by #52

Comments

@ghost
Copy link

ghost commented Nov 14, 2018

I've implemented a basic columns width feature that searches for columns config in data.sheet.cols and generates XML according to Microsoft documentation
const data = { filename: 'report', sheet: { data: [ [{ value: 'Test', type: 'string' }, { value: 1000, type: 'number' }] ], cols: [{ width: 150 }, { width: 60 }] } };
As a result this config returns XML as shown below:
<cols><col min="1" max="1" width="25" /><col min="2" max="2" width="10" /></cols>
Pull Request is coming..

@ghost ghost mentioned this issue Nov 14, 2018
@TylerJBrown192
Copy link

@egeriis @Nopzen Hey all, any chance that we could get a timeline on @TrancePaul 's PR potentially being accepted and merged? This definitely would be a nice-to-have.

@emorling
Copy link

emorling commented Feb 5, 2019

I would really like to see this merged.

@egeriis
Copy link
Owner

egeriis commented Feb 7, 2019

The purpose of zipcelx is to create valid XLSX files in the browser, with minimal footprint.

There have been loads of feature requests, but each of those would add weight to said footprint. Considering the surprising amount of request for additional features. I've iterated many times that I find that the proper solution is something that enables more features, but does not add to the footprint of the basic zipcelx build. That may be a plug-in structure or something else, I'm open to suggestions.

Adding features one-by-one to the core of zipcelx will likely not be accepted. Unless that feature is so basic that it's likely to be used by the vast majority of the zipcelx consumers.

I truly appreciate all the effort you're all putting into these requests, even writing code to put up PRs, but it's clearly communicated in the README and in many other issues that the goal is minimal footprint.

@Raiondesu
Copy link

@egeriis, how about a plugins support, at least? Just so the additional functionality can be added manually, without the unneeded forks and excessive functionality of js-xlsx, which you suggest to use.

@egeriis
Copy link
Owner

egeriis commented Mar 8, 2019

@Raiondesu That goes perfectly along with what I've been envisioning from all these requests. I haven't needed it though, so I haven't put in time myself to add that.

@duola8789
Copy link

@TrancePaul Could you please tell me how to adjust column width for now?

@ghost
Copy link
Author

ghost commented Mar 20, 2019

@duola8789 look at pool request I created? #52

@duola8789
Copy link

@TrancePaul thanks

@ncabelin
Copy link

thanks for this package, but I don't understand how column width is not a basic feature though, strings and numbers get broken into new lines most of the time. At least having the ability to set widths should be something a majority would use imho.

@egeriis
Copy link
Owner

egeriis commented May 27, 2019

@ncabelin

I don't understand how column width is not a basic feature

I'll quote myself 🙂

The purpose of zipcelx is to create valid XLSX files in the browser, with minimal footprint.

No talk about basic features. Purpose is minimal footprint to create valid XLSX.

Again, some kind of plugin support to allow for opt-in features would be stellar. And I welcome community contribution and are willing to review any PR attempting to bring on a stable and scalable implementation.

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

Successfully merging a pull request may close this issue.

6 participants