Test in a live environment
Test in production without watermarks.
Works wherever you need it to.
Create and output a CSV file easily with IronXL's free for development. The following code shows you how.
First, you must have IronXL installed. There are various options. You can download it directly: https://ironsoftware.com/csharp/excel/docs/
Or you can import the IronXL NuGet package by following the next few steps
Install-Package IronXL.Excel
IronXL.Excel NuGet Package
Easy as that!
Here is the code for this little project. This code loads an existing Excel Workbook, and then simply saves it in the CSV format by using the SaveAsCsv
method.
The Normal Excel workbook contains the following data:
/**
Save as CSV file
anchor-save-workbook-as-csv
**/
using IronXL;
WorkBook wb = WorkBook.Load("Normal_Excel_File.xlsx"); //Import .xls, .csv, or .tsv file
wb.SaveAsCsv("SaveAsCSV.csv", ","); //Saved as : SaveAsCSV.Sheet1.csv
/**
Save as CSV file
anchor-save-workbook-as-csv
**/
using IronXL;
WorkBook wb = WorkBook.Load("Normal_Excel_File.xlsx"); //Import .xls, .csv, or .tsv file
wb.SaveAsCsv("SaveAsCSV.csv", ","); //Saved as : SaveAsCSV.Sheet1.csv
'''
'''Save as CSV file
'''anchor-save-workbook-as-csv
'''*
Imports IronXL
Private wb As WorkBook = WorkBook.Load("Normal_Excel_File.xlsx") 'Import .xls, .csv, or .tsv file
wb.SaveAsCsv("SaveAsCSV.csv", ",") 'Saved as : SaveAsCSV.Sheet1.csv
Additionally, the IronXL Excel library provides the following features:
Learn more and share how to merge, unmerge, and work with cells in Excel spreadsheets using the handy IronXL API Reference Documentation.
IronXL API Reference Documentation10 .NET API products for your office documents