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

Numeric cells #19

Closed
stefanop1 opened this issue May 19, 2020 · 6 comments
Closed

Numeric cells #19

stefanop1 opened this issue May 19, 2020 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@stefanop1
Copy link

stefanop1 commented May 19, 2020

Thanks for your great plugin.
Is it possible to write numbers in cells and have the sheet treat them as numeric?
Every number I write in a cell results in an alphanumeric cell.
Stefano

@stefanop1 stefanop1 changed the title Numberic cells Numeric cells May 19, 2020
@justkawal
Copy link
Owner

justkawal commented May 20, 2020

We have headed to give the formula functionality so we had made the cell type dynamic which will help you to save your number as numeric.

You will be able to see the changes in the next version.

@justkawal justkawal self-assigned this May 20, 2020
@justkawal justkawal added the enhancement New feature or request label May 20, 2020
@justkawal
Copy link
Owner

justkawal commented Jun 5, 2020

Excel: ^1.0.9 is out https://pub.dev/packages/excel
CellType Functionality is available in order to save numeric cells
Now excel being more faster than before.

Added Functionalities:
Cell Type
Copy Sheet
Rename Sheet
Delete Sheet
Link Sheets
Un-Link Sheets
Font Family (182 Font Family Available)
Font Size
Italic
Underline
Bold

Thank You
Long Live Open S🔥urce

@bakua
Copy link

bakua commented Jun 14, 2020

Hello, I have went though the code, but I don't see a way how to set a cell type when creating a new excel file. There isn't any setter for cell type, just getters.

@justkawal
Copy link
Owner

Hey @bakua , the reason for not giving the setter for cell-type is that, What happens if user sets the setter to int but has String type value in that cell, So when processing the excel file, It will be ambiguous and might lead to corrupted excel file.

So in line : https://github.com/kawal7415/excel/blob/0caf98033f5147f09b96f16270b1a15ce20ccf52/lib/src/sheet/sheet.dart#L877
You can see in the link to internal code that we have taken the load on us and give the users less headache to maintain things.

@justkawal
Copy link
Owner

If you set the value to an int then it automatically sets the type to CellType.int

@bakua
Copy link

bakua commented Jun 14, 2020

I see, that's pretty cool. Thanks for explanation :) Might be worth to mention in docs that cells are auto typed.

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

No branches or pull requests

3 participants