Download & Extend

Ampersand character output as html character code &

Project:Views Excel Export
Version:6.x-1.1-beta1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

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

#1

+1

#2

Anyone 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.

#3

Half a year and no help yet?

#4

I 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.

#5

hi,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));
}
}

#6

Thanks for the workaround! This should really just be rolled into a patch for the module and commited though.

#7

Wrapping 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?

nobody click here