Hello @Gaurav ,
Ensure there is only one sheet in the Excel file.
If there is more tha one required sheet, delete those unwanted sheets using Delete sheet activity.
Refer to this thread you may get some idea
In unattended mode, the robot might not have the necessary permissions to access or
modify the Excel file. Check and ensure that the robot has the required permissions to read
the Excel file and create a PDF in the specified location.
Instead of relying on relative paths, use full file paths in your automation.
Use Delay before the “Save Excel as Pdf” activity
Debug the code to ensure the code the running as you expect