Closed (won't fix)
Project:
Views data export
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Dec 2014 at 17:22 UTC
Updated:
6 Dec 2024 at 14:23 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
caminadaf commentedComment #2
caminadaf commentedComment #3
uv516 commentedI have tried this, but in my MS Excel (2007) it doesn't works.
Comment #4
Anonymous (not verified) commentedThis might be slightly off-topic, but I had a similar problem with
<br>tags (being output as separate rows). I made the attached patch, based off the one above, that converts<br>tags to new lines instead.The problem with converting
<li>tags to new lines is that the<ul>/<ol>tags are left there, which doesn't seem right. I also had a problem with extra new lines being added between fields...You may be able to use this patch instead of the above one if you change any multi-valued fields in views from displaying as an (un)ordered list to being separated by the
<br>tag.Comment #5
Anonymous (not verified) commentedActually, it turns out my patch doesn't work in Microsoft/Windows either (works in Libre Office on Linux though)...
Comment #6
philyThe problem with
<br>tag in Excel is that it adds a new row, not a new line inside the same cell.In order to add new line and stay in the same cell, the tag to add is
<br style="mso-data-placement:same-cell;" />So, in patch #4, the line
+ $output = preg_replace('/<\/?(br) ?.*?>/', " ", $output); // replace 'br' tags with a new line charactershoud be replaced by
+ $output = preg_replace('/<\/?(br) ?.*?>/', "<br style=\"mso-data-placement:same-cell;\" />", $output); // replace 'br' tags with a new line characterI've tested it with Excel 2010 for Windows and Excel 16.13 for Mac with success.
But be warned it will add new rows in LibreOffice Calc unless the file has been saved from Excel before...
Updated patch is attached.
Comment #7
andras_szilagyi commentedPatch #6 works in office 365 Excell, Patch #1 does not.
I suggest a new patch that resolves both li and br.
Comment #8
andras_szilagyi commentedHere is the new patch which solves both issues in Excell office 365.
Comment #9
kris77 commentedPatch in #8 works fine for me.
Thanks @Andras_Szilagyi
Comment #10
steven jones commentedSorry for the lack of attention to your issue, please accept my apologies.
Drupal 7 is going to be end-of-life'd by the community in approximately 1 month.
As such, I am closing all non-critical looking, non-PHP compatibility issues for Views Data Export to tidy up the issue queues and reduce the noise. You can read about this on #3492246: Close down Drupal 7 issues.
If you feel like this issue has been closed by mistake, please do comment about re-opening it.
If you feel like the ticket is still relevant for the 8.x-1.x version of the module, then please search for a duplicate issue first, and if there really isn't one (and you've looked properly) then change the version on the ticket and re-open.
Thanks to everyone involved in this issue: for reporting it, and moving it along, it is truly appreciated.
The Drupal community wouldn't be what it is today without your involvement and effort, so I'm sorry that we couldn't get this issue resolved. Hopefully we'll work together in a future issue though, and get that one resolved :)