Remove leading and trailing apostrophes in Excel export
Remove leading and trailing apostrophes in Excel export
{
extend: 'excel',
exportOptions: { orthogonal: 'export' }
}
In one of my columns, I may have values such as Farmer's Composit or 'Farmer's Special' or Farmer. A user has asked if when it is exported to Excel that the leading and trailing apostrophes are stripped off. I can't get rid of all apostrophes. I'm already using orthogonal for export (kind of fuzzy what it's actually doing for me), and I wondered if there's something I can put into the extend excel so that I'd just get Farmer's Special and not 'Farmer's Special' on export.
Test case, go to https://npgsweb.ars-grin.gov/gringlobal/search click on "advanced search" and in plant name, type farmer's.
This question has an accepted answers - jump to answer
Answers
Just replace "something" with something that makes sense. Like in here for example:
https://stackoverflow.com/questions/42408126/how-can-i-remove-last-and-first-apostrophe-from-string
Thanks.
This works perfectly in Chrome and Edge, but not in Firefox. In Firefox, it returned col 18, replaced html (worked) but did not replace leading and trailing '
Anyone have any idea why this is so?