ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Grid export to CSV adds lots of null characters at the end
Title:
B
I
{code}
?
I see your sample https://demo.aspnetawesome.com/GridExportToExcelDemo I tried .csv export and one page export run all ok on all page mode, instead at the and of file there are many NUL characters Can you help me ?
Save Changes
Cancel
mtugnoli
asked at 29 Oct 2020
Answers
B
I
{code}
?
this removed the empty characters at the end for me: https://stackoverflow.com/questions/27268994/why-do-i-have-a-million-null-characters-at-the-end-of-my-csv-file basically replace: return File(memoryStream.GetBuffer()... with: return File(memoryStream.ToArray()...
Save Changes
Cancel
Omu
answered at 29 Oct 2020
Yes, now is ok ! Thank You
at 29 Oct 2020
mtugnoli
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK