My application is generating a CSV file which opens in Microsoft excel and Notepad++ correctly. But fails to open in Vim (linux text editor). I tried multiple ways to generate this csv but it does not show the data in vim correctly.
If i open that CSV in excel and again save it as csv extension then only it works in vim application.
My current code is as follows -
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("content-disposition", "attachment; filename=mytest.csv");
Response.BufferOutput = true;
Response.OutputStream.Write(doc.File_Stream, 0, doc.File_Stream.Length);
Response.End();
I tried below code as well
Response.ContentType = "text/csv";
Response.AddHeader("content-disposition", "attachment; filename=myTest.csv");
Response.BufferOutput = true;
Response.OutputStream.Write(doc.File_Stream, 0, doc.File_Stream.Length);
Response.End();
still not working with VIM. It shows the output of file as follows