This project has moved. For the latest updates, please go here.

Export to excel and html issue

May 20, 2009 at 6:19 AM

Hi Matt,

First of all big thanks for the great job you have done on doddle report. I appreciate it very much.

Now to my issue: when I export to PDF everything works perfect, but when I try the same to excel or html all the chracters of local alphabet (czech) get displayed wrong.

1) excel

when I had a look at the generated excel file using notepad I noticed it contains what I believe is an error (see below). I think the part printed in red is redundant and should not be there. When I remove that part using notepad and then open the file in excel everything is diplayed fine. (I should also add that in notepad all the local alphabet charecters were displayed correctly so the issue lies somewhere in excel not understandig the generated file.)

<html>

            <style type='text/css'>
                body { font: 10px Verdana; }
                td { font-size: 10px; }
                th { font-size: 10px; font-weight: normal; text-align: left; }
                h1 { font-size: 14pt; margin-bottom: 10px; }

<html xmlns:o='urn:schemas-microsoft-com:office:office'
xmlns:x='urn:schemas-microsoft-com:office:excel'
xmlns='http://www.w3.org/TR/REC-html40'>
<head>......

2) html

I have a very similar issue with local alphabet characters diplayed incorrectly when exporting to html. The beginning of the generated file looks very similar to case 1)

<html>

            <style type='text/css'>
                body { font: 10px Verdana; }
                td { font-size: 10px; }
                th { font-size: 10px; font-weight: normal; text-align: left; }
                h1 { font-size: 14pt; margin-bottom: 10px; }
               

</style>
<body>

No redundant part here but as soon as I change Verdana to say Arial everything works fine again.

I would be very grateful if you could have a look especially at the excel issue and perhaps suggest a solution. It's an issue that makes otherwise excelent piece of software unusable for international users.

Thnaks

Jiri

May 12, 2010 at 6:27 PM
Edited May 12, 2010 at 6:31 PM
Hey, This has nothing to do with the doddle report(at least for the HTML part). The problem is with the encoding of the html page. I was having the same issue as you here, but my language is portuguese. This is how i fixed it: Check the HtmlReportWriter which is the class responsible for creating the html. All I did was add this line to the head of the html document, to force the encoding of the html page: <meta http-equiv="Content-Type" content="text/html; charset=uft-8"> So the resulting code would be something like this: Html.AppendLine("<html>"); Html.AppendLine("<head>"); Html.AppendLine("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=uft-8\" />"); ....//continues the rest of the code This fixed my issue here, if it doesn't work for you, try a diferent encoding(don't know what encoding french uses) Hope it helps. Regards