How to generate excel files on C#?

How can I create an Excel Spreadsheet with C# without requiring Excel to be installed on the machine that’s running the code?

Why not a CSV file?

2 Likes

yes on CSV file. someone suggest me to use EXCEL SDK. what do you think?

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

You really should try to open a CSV file in Notepad. It would be a good start to fully grasp the nature of the challenge lying ahead of you.

1 Like

Any xlsx library, or if using CSV just write a plain text file, with values comma separated and escaping commas.

You can also manually create Excel files but I recommend you to try ZETEXCEL.