C# API to Convert RTF to EXCEL

Export RTF to EXCEL via C# without using Microsoft® Word or Microsoft® Excel

 

By using Aspose.Total for .NET you can include RTF to EXCEL conversion feature within any .NET, C#, ASP.NET and VB.NET application in two simple steps. Firstly, by using Aspose.Words for .NET , you can export RTF to HTML. After that, by using Aspose.Cells for .NET Spreadsheet Programming API, you can convert HTML to EXCEL.

.NET API to Convert RTF to EXCEL

  1. Open RTF file using Document class
  2. Convert RTF to HTML by using Save method
  3. Load HTML document by using Workbook class
  4. Save the document to XLSX format using Save method and set Xlsx as SaveFormat

Get Started with .NET File Automation APIs

Install from command line as nuget install Aspose.Total or via Package Manager Console of Visual Studio with Install-Package Aspose.Total.

Alternatively, get the offline MSI installer or DLLs in a ZIP file from downloads .

Load RTF Document from Stream via C#

Aspose.Words for .NET also allows you to load RTF document via stream. To open a document from a stream, simply pass a stream object that contains the document into the Document constructor. The following code example shows how to open a document from a stream:

Add Custom Properties in EXCEL File via C#

While converting RTF to EXCEL, Aspose.Cells for .NET enables you to add custom properties in your EXCEL documents. In order to add a custom property, you can use Add method for the CustomDocumentPropertyCollection class. The Add method adds the property to the Excel file and returns a reference for the new document property as an Aspose.Cells.Properties.DocumentProperty object.

Other Conversion Options

RTF TO XLT (Excel 97 - 2003 Template)
RTF TO TSV (Tab Seperated Values)
RTF TO ODS (OpenDocument Spreadsheet)
RTF TO XLS (Microsoft Excel Spreadsheet (Legacy))
RTF TO XLTX (Excel Template)
RTF TO SXC (StarOffice Calc Spreadsheet)
RTF TO XLAM (Excel Macro-Enabled Add-In)
RTF TO XLSB (Excel Binary Workbook)
RTF TO XLSM (Macro-enabled Spreadsheet)
RTF TO XLTM (Excel Macro-Enabled Template)
RTF TO FODS (OpenDocument Flat XML Spreadsheet)
RTF TO DIF (Data Interchange Format)
RTF TO CSV (Comma Seperated Values)
RTF TO XLSX (Open XML Workbook)

RTF What is RTF File Format?

Introduced and documented by Microsoft, the Rich Text Format (RTF) represents a method of encoding formatted text and graphics for use within applications. The format facilitates cross-platform document exchange with other Microsoft Products, thus serving the purpose of interoperability. This capability makes it a standard of data transfer between word processing software and, hence, contents can be transferred from one operating system to another without losing document formatting. The file format specifications are available by Microsoft for public download and can be referred to from developer’s perspective.

Read More

XLSX What is XLSX File Format?

XLSX is well-known format for Microsoft Excel documents that was introduced by Microsoft with the release of Microsoft Office 2007. Based on structure organized according to the Open Packaging Conventions as outlined in Part 2 of the OOXML standard ECMA-376, the new format is a zip package that contains a number of XML files. The underlying structure and files can be examined by simply unzipping the .xlsx file.

Read More