Page 1 of 1
Form Browser - Export To Excel Character Formatting Issues
Posted: Thu Mar 31, 2011 8:34 pm
by LeeUmm
When I export a form to excel file via the form browser, characters like " ' show as up weird characters, and not their html entities.
I've attached a screenshot of what it looks like.
The text looks fine when viewed online in the form browser admin area, this only occurs when exporting to excel.
I've changed the configuration options for the encoding to each option, and nothing appears to change. i.e utf-8, windows-1252, iso-8859-1
Any ideas or has this happened to anybody before?
Re: Form Browser - Export To Excel Character Formatting Issu
Posted: Sat Apr 02, 2011 4:24 am
by tilde
What version of Excel are you using?
Excel 2003 or Excel 2007.
Søren
Re: Form Browser - Export To Excel Character Formatting Issu
Posted: Sat Apr 02, 2011 8:13 am
by uniqu3
Had same Problem with German umlauts and Excel 2007+2010 so i needed a UDT that helped solve the Problem:
UDT: utf_8_decode
Code: Select all
if( isset( $params['datatoconvert'] ) )
{
echo (utf8_decode ($params['datatoconvert']));
}
Then in FormBuilder CSV Template:
Code: Select all
{utf_8_decode datatoconvert=$your_field}
Re: Form Browser - Export To Excel Character Formatting Issu
Posted: Mon Apr 04, 2011 8:34 pm
by LeeUmm
Thanks for the response guys.
uniqu3,
That looks great. Haven't tried it yet because I did some testing and if I save the form as a flat file (.csv) I can import that into excel and there are no issues.
With your method, I guess there is no way to do this for all fields at once? I have multiple forms and multiple fields, so manually creating this for each field isn't ideal. Especially when a client is constantly creating new forms. Right now we have 7 forms and some of them are very long.
Re: Form Browser - Export To Excel Character Formatting Issu
Posted: Mon Apr 04, 2011 8:40 pm
by LeeUmm
Actually, now that I think about it more, I think we're after 2 different things.
I'm using the FormBrowser to export as a .xls file and is built into the module. That's where my issue is.
If I save as a flat file (.txt or .csv) then it works no problem, but the FormBrowser has a better interface and stores the data online. Easier for my client.
Re: Form Browser - Export To Excel Character Formatting Issu
Posted: Mon Apr 11, 2011 2:58 pm
by LeeUmm
I was able to solve this by selecting the option to use "Non-memory Excel exports" in the configuration tab in FormBrowser. This writes a flat file first in your uploads directory and then uses that to generate the excel file instead of doing it all in memory by default.