Hi Asaf,
From your description, you use ASP.NET web page to expose a Excel document
by GridView. However, you found that the output excel will contain
gibberish sometime when you specify the charset as windows-1255, correct?
Since windows-1255 is a single byte charset(ascii + extended chars...), it
is probably that some certain characters in the excel(gridview) are not
within windows 1255's charset range and that cause the exported excel to
contain gibberish. Have you tried tried find the exact data that can
always repro the problem? You can try removing the problem data/text by
binary search isolation. Also, as you said that when you try save the page
as html, it will use "windows-1254", have you look at the "Encoding" of the
webbrowser (via right click context menu) to see whether it is also auto
changed to 1254 for your page. If so, this means that the browser detect
your page to be matching windows-1254 charset.
Best regards,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?QXNhZg==?= <AG70@newsgroups.nospam>
>Subject: Export GridView to Excel, Encoding problem
>Date: Thu, 20 Mar 2008 07:21:04 -0700
>Hello,
>
[quoted text clipped - 85 lines]
> {
>
GridViewExportUtil.PrepareControlForExport(gv.FooterRow);
> table.Rows.Add(gv.FooterRow);
> }
[quoted text clipped - 61 lines]
> }
>}
Asaf - 21 Mar 2008 08:19 GMT
Hello Steven,
Problem is that I have tried to produce the same data for my Excel export
report and sometimes it generates 1255 and sometimes 1254 for the same data.
On the Windows 2003 server side if I run my ASP.NET website locally the
Excel file is generated correct any time for all data.
I have tried several client computers and problem rose at all of them.
I have also tried to set Encoding to 65001 but no luck.
Is there a way I can check exactly from where the problem rises as I really
don't know where to start from?
Thanks,
Asaf
> Hi Asaf,
>
[quoted text clipped - 189 lines]
> > }
> >}
Asaf - 21 Mar 2008 14:42 GMT
Hello Steven,
Problem has been solved, thanks for your support.
Regards,
Asaf
> Hi Asaf,
>
[quoted text clipped - 189 lines]
> > }
> >}
Steven Cheng - 24 Mar 2008 03:30 GMT
Thanks for your followup Asaf,
I'm glad that you've resolved the problem. BTW, would you share some info
about how the problem got resolved, that'll also benifit other uses that
may run into the same problem.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?QXNhZg==?= <AG70@newsgroups.nospam>
>References: <B34E4076-3259-4D42-A799-9BFE4F72A590@microsoft.com>
<YC83RKwiIHA.5204@TK2MSFTNGHUB02.phx.gbl>
>Subject: RE: Export GridView to Excel, Encoding problem
>Date: Fri, 21 Mar 2008 06:42:01 -0700
>Hello Steven,
>
[quoted text clipped - 197 lines]
>> > }
>> >}
Asaf - 24 Mar 2008 08:16 GMT
Hi Steven,
It was just an adjustment to set Hebrew language to my server.
Asaf
> Thanks for your followup Asaf,
>
[quoted text clipped - 239 lines]
> >> > }
> >> >}