Last active
April 20, 2023 15:13
How to Convert TXT to XLSX Using C#. For more information, please follow link: https://kb.groupdocs.com/conversion/net/how-to-convert-txt-to-xlsx-using-csharp/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using GroupDocs.Conversion; | |
namespace ConvertTXTtoXLSXUsingCSharp | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// Set License to avoid the limitations of Conversion library | |
License lic = new License(); | |
lic.SetLicense(@"GroupDocs.Conversion.lic"); | |
// Import TXT document | |
var converter = new GroupDocs.Conversion.Converter("input.txt"); | |
// Get conversion option for final output document | |
var txttoxlsxOptions = converter.GetPossibleConversions()["xlsx"] | |
.ConvertOptions; | |
// Save the XLSX to disk | |
converter.Convert("output.xlsx", txttoxlsxOptions); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment