I have a nested list of strings that I would like to write to a CSV file using CSV helper. So, it is a list called Entries and each element has a list of strings called Entry.
My current code is exporting a blank CSV file.
Entry example:
{"Date", "param1", "param2", "param3", "param4"}

and the Entries list will have a list of those.
I would like to write to a CSV file with each entry being a new line.
Intended outcome:
"Date", "param1", "param2", "param3", "param4"
"Date", "param1", "param2", "param3", "param4"
"Date", "param1", "param2", "param3", "param4"
"Date", "param1", "param2", "param3", "param4"

My current code:
var rawDataList = await _siteRepository.GetRawSiteData(siteGuid);

var Entries = _siteRepository.GetSiteData(rawDataList);
var writer = new StreamWriter("YodelTesting.csv");
var csv = new CsvWriter(writer, CultureInfo.InvariantCulture);

foreach(var record in Entries)
{
    csv.WriteRecord(record);
}

Help would be appreciated!

Writing a Nested List of Strings to CSV using CSV helper
I used the current code to get it working
using (var stream = new MemoryStream())
using (var writer = new StreamWriter("yodelTesting.csv"))
using (var reader = new StreamReader(stream))
using (var csv = new CsvWriter(writer, CultureInfo.InvariantCulture))
{
    foreach (var record in output)
    {
        foreach (var field in record)
        {
            csv.WriteField(field);

        }
        csv.NextRecord();
    }
    //not sure what this does tbh
    writer.Flush();
    stream.Position = 0;
}

