 |
ExcelToPdfConvertFile(String, ExcelFormat) Method |
Converts the workbook at the given path to pdf, reading it as the given format.
Namespace: SelectPdf.UniversalAssembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.6
Syntaxpublic PdfDocument ConvertFile(
string filePath,
ExcelFormat format
)
Public Function ConvertFile (
filePath As String,
format As ExcelFormat
) As PdfDocument
Parameters
- filePath String
- The path of the workbook. Cannot be null or empty.
- format ExcelFormat
- The format the file is read as.
Return Value
PdfDocument
A
PdfDocument containing the converted content. The caller is responsible for
saving and closing the returned document.
Exceptions| Exception | Condition |
|---|
| ExcelToPdfException |
Thrown when filePath is null or empty, the file does not exist, or the
workbook cannot be read or rendered.
|
See Also