public ActionResult Export(int id) { var songList = queries.GetSongList(id); var formatString = "%notes%;%publishdate%;%title%;%url%;%pv.original.niconicodouga%;%pv.original.!niconicodouga%;%pv.reprint%"; var tagString = queries.GetTagString(id, formatString); var enc = new UTF8Encoding(true); var data = enc.GetPreamble().Concat(enc.GetBytes(tagString)).ToArray(); return(File(data, "text/csv", songList.Name + ".csv")); }