VintaSoft Imaging .NET SDK 15.1: Documentation for .NET developer
Vintasoft.Imaging.Office.OpenXml Namespace / OpenXmlDocumentConverter Class / ConvertCsvToXlsx Methods / ConvertCsvToXlsx(String,String) Method
Syntax Example Requirements SeeAlso
In This Topic
ConvertCsvToXlsx(String,String) Method (OpenXmlDocumentConverter)
In This Topic
Converts a CSV (Comma Separated Values) file to an XLSX document.
Syntax
'Declaration

Public Overloads Shared Sub ConvertCsvToXlsx( _
ByVal csvFilename
The filename of input CSV file.
As System.String, _
ByVal xlsxFilename
The filename of output XLSX document.
As System.String _
)
public static void ConvertCsvToXlsx(
System.String csvFilename,
System.String xlsxFilename
)

Parameters

csvFilename
The filename of input CSV file.
xlsxFilename
The filename of output XLSX document.
Example

This C#/VB.NET code shows how to convert CSV document to a XLSX document.


''' <summary>
''' Converts CSV file to a XLSX file.
''' </summary>
''' <param name="csvFilePath">Path to a source CSV file.</param>
''' <param name="xlsxFilePath">Path to a result XLSX file.</param>
Public Shared Sub ConvertCsvToXlsx(csvFilePath As String, xlsxFilePath As String)
    Vintasoft.Imaging.Office.OpenXml.OpenXmlDocumentConverter.ConvertCsvToXlsx(csvFilePath, xlsxFilePath)
End Sub


/// <summary>
/// Converts CSV file to a XLSX file.
/// </summary>
/// <param name="csvFilePath">Path to a source CSV file.</param>
/// <param name="xlsxFilePath">Path to a result XLSX file.</param>
public static void ConvertCsvToXlsx(string csvFilePath, string xlsxFilePath)
{
    Vintasoft.Imaging.Office.OpenXml.OpenXmlDocumentConverter.ConvertCsvToXlsx(csvFilePath, xlsxFilePath);
}

Requirements

Target Platforms: .NET 10; .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

See Also