
説明/参照:
Explanation:
目標1:
名前:AcceptTypes
概要:stringArray = Request.AcceptTypes
クライアントが受け入れたMIME(Multipurpose Internet Mail Extension)型を含む文字列配列を返します。このプロパティを使用して、Internet ExplorerのみでサポートされているWordやExcelなどのアプリケーションタイプを含む、特定の応答タイプをクライアントが受け入れることができるかどうかを判断できます。
ターゲット2、ターゲット3:
例:Response.AddHeader( "content-disposition"、 "attachment; filename = MyExcelFile.xls"); Response.ContentType = "application / ms-excel";参照:ASP.NET MVC 4 C#でデータをExcelファイルにエクスポートする
http://stackoverflow.com/questions/16346227/export-data-to-excel-file-with-asp-net-mvc-4-c-sharp-is- rendering-into-view