-
Notifications
You must be signed in to change notification settings - Fork 503
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
Added initial support to support HTML formatting. #278
Conversation
def use_html?(index) | ||
ret_val = false | ||
return false if to_a[index].nil? | ||
return true if to_html[index].include?('<sub>') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to use a regexp here, e.g.
to_html[index][/<([biu]|sub|sup)>/]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will change.
Is it possible to add more tests for these situations? |
I will write some unit tests this weekend and add them to git. |
get up-to-date with latest files
…e regex. Added unit tests.
Everything looks good from my side. Thanks, |
@stevendaniels Anything that I can do to push this along. I know that some of my co-workers and developers are looking toward this. Also, sometime next week I was thinking of adding formatting to the output stream so that |
@stevendaniels @welguisz Hi guys! Could you please let me know what state this pull request is in? Are you planning to merge it, and if so, when? Thanks! |
@ilyasgaraev ... It is in a state to be merged. I have not had time to do an output to Excel Cell yet. The import of the HTML tags is ready. Up to @stevendaniels to decide when he wants to pull it in. I don't have the ability to do a merge to the main repository. |
I'll be releasing a new version soon. |
## [2.5.1] 2016-08-26 ### Fixed - Fixed NameError. [337](roo-rb/roo#337) ## [2.5.0] 2016-08-21 ### Fixed - Remove tempdirs via finalizers on garbage collection. This cleans them up in all known cases, rather than just when the #close method is called. The #close method can be used to cleanup early. [329](roo-rb/roo#329) - Fixed README.md typo [318](roo-rb/roo#318) - Parse sheets in ODS files once to improve performance [320](roo-rb/roo#320) - Fix some Cell conversion issues [324](roo-rb/roo#324) and [331](roo-rb/roo#331) - Improved memory performance [332](roo-rb/roo#332) - Added `no_hyperlinks` option to improve streamig performance [319](roo-rb/roo#319) and [333](roo-rb/roo#333) ### Deprecations - Roo::Base::TEMP_PREFIX should be accessed via Roo::TEMP_PREFIX - The private Roo::Base#make_tempdir is now available at the class level in classes that use tempdirs, added via Roo::Tempdir ======= ### Added - Discard hiperlinks lookups to allow streaming parsing without loading whole files ## [2.4.0] 2016-05-14 ### Fixed - Fixed opening spreadsheets with charts [315](roo-rb/roo#315) - Fixed memory issues for Roo::Utils.number_to_letter [308](roo-rb/roo#308) - Fixed Roo::Excelx::Cell::Number to recognize floating point numbers [306](roo-rb/roo#306) - Fixed version number in Readme.md [304](roo-rb/roo#304) ### Added - Added initial support for HTML formatting [278](roo-rb/roo#278)
Would it be possible to add an option to disable this feature? Something like: To be completely honest, this should be disabled by default and the option should be to enable it. Injecting anything into users' data should never be a default behavior. |
This features must be with option to disable. I try to import to my project a XLSX with html. My purpose is to get html like the excel, but roo wrap all my cell content with . Modify content is not very good |
@kaluznyo Here is the pull request for Disable HTML Injection |
Goal: Support HTML Mark-up for sub, sup, b, i, u in individual cells
Method:
** rPr contains the formatting options
** t contains the text
Known Issue: