A string which contains password for Excel workbook. It is necessary when you are converting password-protected Excel document.
Namespace:
SautinSoftAssembly: SautinSoft.ExcelToPdf (in SautinSoft.ExcelToPdf.dll) Version: 3.0.9.6
Syntax
Remarks
Examples
using System; using System.IO; namespace Sample { class Sample { static void Main(string[] args) { //Convert password protected workbook SautinSoft.ExcelToPdf x = new SautinSoft.ExcelToPdf(); //Set PDF format for output document x.OutputFormat = SautinSoft.ExcelToPdf.eOutputFormat.Pdf; //Password for Excel workbook x.Password = "qwerty"; string excelPath = @"..\..\..\..\..\test.xls"; string pdfPath = @"..\..\..\..\..\test.pdf"; if (x.ConvertFile(excelPath, pdfPath)==0) { System.Diagnostics.Process.Start(pdfPath); } } } }
Imports System.IO Module Sample Sub Main() 'Convert password protected workbook Dim x As New SautinSoft.ExcelToPdf() 'Set PDF format for output document x.OutputFormat = SautinSoft.ExcelToPdf.eOutputFormat.Pdf 'Password for Excel workbook x.Password = "qwerty" Dim excelPath As String = "..\..\..\..\test.xls" Dim pdfPath As String = "..\..\..\..\test.pdf" If x.ConvertFile(excelPath, pdfPath) = 0 Then System.Diagnostics.Process.Start(pdfPath) End If End Sub End Module