Output response in ANSI character format in ASP.net

I am writing data to the output browser using Response.write (some byte arrangements)

        Response.ContentType = "application/ms-excel";
        Response.ContentEncoding = System.Text.Encoding.Default;
        Response.OutputStream.Write(report, 0, report.Length);
        Response.Flush();
        Response.Close();

      

I have ANSI characters in my file, I need to write ANSI information when I open the excel file. Do I need to add anything.

I coded it in ANSI but didn't work.

0


source to share


1 answer


You say you are writing an array of bytes, but there is no such thing as ANSI byte. A byte is a byte, a byte. You only need ANSI or any other encoding if you are writing strings or characters.



So, if your report is a [] byte representing ANSI text, how did you code it?

+1


source







All Articles