Skip to content

Instantly share code, notes, and snippets.

How to Convert XLSX to DOCX using C#. For more information, please follow link: https://kb.conholdate.com/total/net/how-to-convert-xlsx-to-docx-using-csharp
using GroupDocs.Conversion;
namespace ConvertXLSXtoDOCXusingCSharp
{
class Program
{
public static void Main(string[] args)
{
// Set the license to avoid the limitations of the Conversion library
License license = new License();
license.SetLicense(@"GroupDocs.Conversion.lic");
// Import the XLSX document
var converter = new GroupDocs.Conversion.Converter("input.xlsx");
// Get the conversion options for DOCX output
var docxConversionOptions = converter.GetPossibleConversions()["docx"]
.ConvertOptions;
// Save the DOCX to disk
converter.Convert("ConvertXLSXtoPDFusingCSharp.docx", docxConversionOptions);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment