ExcelToPdfOutputFormat Property |
Specify format for output file: PDF, Word, RTF etc. Default value:
Pdf.
Namespace: SautinSoftAssembly: SautinSoft.ExcelToPdf (in SautinSoft.ExcelToPdf.dll) Version: 2024.11.30
Syntaxpublic ExcelToPdfeOutputFormat OutputFormat { get; set; }
Public Property OutputFormat As ExcelToPdfeOutputFormat
Get
Set
Property Value
ExcelToPdfeOutputFormat
ExampleConvert Excel file to RTF file in C#
using System;
using System.IO;
using SautinSoft;
namespace Sample
{
class Sample
{
static void Main(string[] args)
{
ExcelToPdf x = new ExcelToPdf();
x.OutputFormat = SautinSoft.ExcelToPdf.eOutputFormat.Rtf;
string excelFile = Path.GetFullPath(@"..\..\..\test.xlsx");
string rtfFile = Path.ChangeExtension(excelFile, ".rtf"); ;
try
{
x.ConvertFile(excelFile, rtfFile);
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(rtfFile) { UseShellExecute = true });
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
Console.ReadLine();
}
}
}
}
Convert Excel file to RTF file in VB.Net
Imports System
Imports System.IO
Imports SautinSoft
Module Sample
Sub Main()
Dim x As New ExcelToPdf()
x.OutputFormat = SautinSoft.ExcelToPdf.eOutputFormat.Rtf
Dim excelFile As String = Path.GetFullPath("..\..\..\test.xlsx")
Dim rtfFile As String = Path.ChangeExtension(excelFile, ".rtf")
Try
x.ConvertFile(excelFile, rtfFile)
System.Diagnostics.Process.Start(New System.Diagnostics.ProcessStartInfo(rtfFile) With {.UseShellExecute = True})
Catch ex As Exception
Console.WriteLine(ex.Message)
Console.ReadLine()
End Try
End Sub
End Module
See Also