Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
static void ExportAdsToCsv(List<AdDetails> lstAdDetails, string Keyword){
using(var writer = new StreamWriter($@"/Users/guest/Desktop/ScrapySharp_scraper/CSVs/{Keyword}_{DateTime.Now.ToFileTime()}.csv"))
using(var csv = new CsvWriter(writer, CultureInfo.InvariantCulture)){
csv.WriteRecords(lstAdDetails);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment