How to generate excel files on C#?

I don’t know, I don’t use Excel that’s why I suggested CSV.