データのテーブルを CSV 形式にエクスポートしています。例:
"COL1","COL2","COL3"
"1","some text", "£232.00"
"2","some more text", "£111.00"
"3","other text", "£2.00"
エクスポートするコードは、ashx ハンドラーを使用して非常に単純です。
context.Response.Clear()
context.Response.ContentType = "text/csv"
context.Response.AddHeader("Content-disposition", "attachment;filename=data.csv")
context.Response.AddHeader("Cache-Control", "must-revalidate")
context.Response.AddHeader("Pragma", "must-revalidate")
context.Response.Write(data)
context.Response.Flush()
context.Response.End()
Â
私の問題は、Excelがエクスポートされたファイルを£
開こうとすると£232.00
、値が£232.00
.