Convert excel to PDF getting error

Hi everyone,

I am trying to convert file from excel to pdf, but getting like this

image

and i am trying to convert .xls file to pdf.

Thank you!

Hi @victoryv4569

Can you try like below

Regards,

I tried but getting this error,

UiPath.Excel.ExcelException: Document not saved. —> System.Runtime.InteropServices.COMException: Document not saved. at Microsoft.Office.Interop.Excel._Workbook.ExportAsFixedFormat(XlFixedFormatType Type, Object Filename, Object Quality, Object IncludeDocProperties, Object IgnorePrintAreas, Object From, Object To, Object OpenAfterPublish, Object FixedFormatExtClassPtr)
at UiPath.Excel.SaveOperations.<>c__DisplayClass2_0.b__0()
at UiPath.Excel.ExcelContextHelper.Execute(Action action, ExcelContext context, Object contextParams)
— End of inner exception stack trace —
at UiPath.Excel.ExcelContextHelper.Execute(Action action, ExcelContext context, Object contextParams)
at UiPath.Excel.SaveOperations.SaveAsPdf(String filePath, Nullable1 startPage, Nullable1 endPage, PdfSaveQuality saveQuality)
at UiPath.Excel.Activities.Business.SaveAsPdfX.<>c__DisplayClass25_0.b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
— End of stack trace from previous location —
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
— End of stack trace from previous location —
at UiPath.Excel.Activities.Business.SaveAsPdfX.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)
at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

@victoryv4569

Can you show the screenshot of Workflow…If possible can you send the excel file if the data is not confidential

Regards,

@victoryv4569

Might be the issue is excel file will be large. Can you try below

Excel to PDF.txt (451 Bytes)

Change your file path in this

Regards,