-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Specify data type in html tags using attributes #3445
Specify data type in html tags using attributes #3445
Conversation
There is no any changes. please review my PR. |
0f3a9ca
to
eac0aef
Compare
I had some unwanted changes caused by phpstorm formatter. I fixed them and fixup my commits to new one . |
eac0aef
to
6b85c37
Compare
I think there is probably some merit in this suggestion. I am trying to think through some of its ramifications. Before I start, there is one minor code change that the PR needs - you do not need to call setDataType after setCellValueExplicit. Calling setCellValueExplicit can result in an Exception, e.g. if you supply an invalid data type. Is that what we want to happen here, or are we better off catching the Exception and ignoring the format? Regardless of that decision, we need some unit tests for this. Your example for setting the type to formula is intriguing. However, your test case proves that formulas are already handled without the need to explicitly set the data type. What is not handled is treating a string beginning with an equal sign as a string (by setting quotePrefix to true) rather than a formula. You could accommodate this in your change by checking for this condition if data type is supplied as s. I think that dates are an especially good use case for this change. You should add some examples for type d (ISO date, time, and date/time elements). Note that those will be converted from string to the Excel numeric representation, and that the conversion may fail. |
thanks for your great explanation. |
4a91338
to
b570d75
Compare
b570d75
to
9037905
Compare
2b43aaa
to
ceb87b0
Compare
ceb87b0
to
843830f
Compare
Thank you for your contribution. |
Due to #3444 issue
some times we need specify data type in html using attribute html.
I add new processDomElementDataType function in HTML.php and handle this.