This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/dotnet/conversion/any-file-to-office.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Convert any file to Office in .NET | Nutrient .NET SDK
Any File to Office

Nutrient .NET SDK supports converting more than 100 file types to Word, Excel, or PowerPoint. For more information, refer to the full list of supported file types.

Download sample

Office target availability depends on the source file type. Not every input can be meaningfully converted to every Office format.

Prepare the project

Register the SDK license before running conversion operations. For setup details, refer to the getting started with .NET SDK guide.

using GdPicture14;
LicenseManager license = new LicenseManager();
license.RegisterKEY("");

Converting other file types to MS Office

To save a file to Word, Excel, or PowerPoint format, load the source document with LoadFromFile. Then use SaveAsDOCX, SaveAsXLSX, or SaveAsPPTX to select the output format.

The following example converts an RTF document to a DOCX file:

using GdPictureDocumentConverter converter = new();
GdPictureStatus status = converter.LoadFromFile(@"input.rtf", GdPicture14.DocumentFormat.DocumentFormatRTF);
if (status != GdPictureStatus.OK)
{
throw new Exception(status.ToString());
}
status = converter.SaveAsDOCX("output.docx");
if (status != GdPictureStatus.OK)
{
throw new Exception(status.ToString());
}
status = converter.CloseDocument();
if (status != GdPictureStatus.OK && status != GdPictureStatus.Aborted)
{
throw new Exception(status.ToString());
}
Console.WriteLine("The input document has been converted to a DOCX file");

Converting PDF files to MS Office

To convert PDF files to MS Office, refer to the PDF-to-Word, PDF-to-Excel, and PDF-to-PowerPoint guides.

Optional Office conversion properties

You can configure the conversion with properties of the GdPictureDocumentConverter object. For example, DocxImageQuality controls the quality used to compress images embedded in the resulting DOCX document, while RasterizationDPI controls the resolution used when vector content is rasterized.