Hello!
I have a problem with the Ampersand character being output in excel as the html character code &
Original Input:
M & P Project Manager
Output in Excel:
M & P Project Manager
Any idea how to fix this?
Thank you,
- Vince
Hello!
I have a problem with the Ampersand character being output in excel as the html character code &
Original Input:
M & P Project Manager
Output in Excel:
M & P Project Manager
Any idea how to fix this?
Thank you,
- Vince
Comments
Comment #1
Anonymous (not verified) commented+1
Comment #2
vincetingey commentedAnyone try out the CSV export in the views bonus pack?
http://drupal.org/project/views_bonus
CSV over excel format would be just fine for me.
Comment #3
vincetingey commentedHalf a year and no help yet?
Comment #4
hwasem commentedI am also having this problem. Seems like a great module so far! Any ideas on a fix for this? I have & and ' (apostrophe) showing up in my export.
Comment #5
redbread commentedhi,everybody!
you can create "mymodule_preprocess_views_export_xls_view_xls"
copy and edit this code at line 53:
foreach ($fields as $key => $field) {
if (empty($field->options['exclude'])) {
$items[$key] = htmlspecialchars_decode(strip_tags($field->theme($row)));
//$items[$key] = strip_tags($field->theme($row));
}
}
Comment #6
vincetingey commentedThanks for the workaround! This should really just be rolled into a patch for the module and commited though.
Comment #7
aliciatheduff commentedWrapping line 52 in decode_entities() fixed the numeric entity apostrophes for me –
$items[$key] = decode_entities(strip_tags($field->theme($row)));
Do you see anything wrong with this approach?
Comment #8
creaoy commentedCommited fix into dev 4851e84