Error while converting xlsx to pdf

I am getting above error after invoking below power shell

"$xlFixedFormat = ‘Microsoft.Office.Interop.Excel.xlFixedFormatType’ -as [type]
$objExcel = New-Object -ComObject excel.application
$objExcel.visible = $false

$workbook = $objExcel.workbooks.open($Excel_P, 3)
$workbook.Saved = $true
$workbook.ExportAsFixedFormat($xlFixedFormat::xlTypePDF, $PDF_Path)
$objExcel.Workbooks.close()

$objExcel.Quit()"

Please help

@amruta_pawar What’s $Excel_P? What is Assigned to it? I guess you haven’t provided the File Name :sweat_smile:

having path in that variable

@amruta_pawar Have you provided the Full path?

yeah

@amruta_pawar Can you hard Code the Paths and Check, or Can you show us the Path that you are using, It Worked very well for me :sweat_smile:

ok thanks