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

Date values from xlsx file didn't convert to string properly #5

Open
wotmshuaisi opened this issue Feb 18, 2020 · 6 comments
Open

Date values from xlsx file didn't convert to string properly #5

wotmshuaisi opened this issue Feb 18, 2020 · 6 comments

Comments

@wotmshuaisi
Copy link

wotmshuaisi commented Feb 18, 2020

default.xlsx

above xlsx file has a date type value 01/09/2019, when i use excel.Read() function to decode the xlsx row to string slice, i got string value 43709

is there any way that i can get data types of each cell?

@szyhf
Copy link
Owner

szyhf commented Mar 3, 2020

I think the fastest way is to set the cell to "text" type, to auto convert the date type to string, may I have a try~

@wotmshuaisi
Copy link
Author

the string 43709 representing how many days passed from 1899-12-30.

But I've found the excel is using integer value type as date type from source file, which made it tricky to get the exact type.

set cell type as "text" sounds like an option, thanks in advance!

@szyhf
Copy link
Owner

szyhf commented Mar 4, 2020

I'm read the document of xlsx format, to slove the problem has to parse another config and it has lots of rules, it may take days to try and test.

@wotmshuaisi
Copy link
Author

thanks for take look into it!

@szyhf
Copy link
Owner

szyhf commented Mar 9, 2020

I'm not sure when I can finish it, I add it to my todo list, but my job is very busy these days, you may use the fast solution first.

@wotmshuaisi
Copy link
Author

I'm not rely on it now, do it anytime you want.

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

2 participants