You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For generating CSV out of a typed `List<T>` of objects:
@@ -75,13 +77,33 @@ Configuring is done via constructor parameters:
75
77
76
78
```c#
77
79
varmyExport=newCsvExport(
78
-
columnSeparator: ",",
80
+
columnSeparator: ',',
79
81
includeColumnSeparatorDefinitionPreamble: true, //Excel wants this in CSV files
80
82
includeHeaderRow: true
81
83
);
82
84
```
83
85
84
-
Also, methods `ExportToFile` and `ExportAsMemoryStream` and `ExportToBytes` offer an optional encoding parameter.
86
+
Also, methods `ExportToFile` and `WriteToStream` and `ExportToBytes` offer an optional encoding parameter.
87
+
88
+
### Using with ASP.NET Core:
89
+
90
+
For big CSV files (megabytes) use `WriteToStreamAsync` and write to `Response.Body` directly. This is very important to save memory usage. Here's a handy heper class:
0 commit comments