If you have MS Excel installed on the PC, you can use a PDF printer to achieve this.
Here are the short steps. More detailed steps are below:
- Create a batch file that sends all files in a directory and subfolders inside it to the printer driver, which will then save a separate PDF file for each Excel file.
- Set the default printer to be a virtual printer that saves the print jobs it receives as PDF files.
- Use the Windows Task Scheduler to run the batch file once every day.
Here are the detailed steps:
- Create a .BAT file (for example, name it prntX2Pdf.bat) and paste the following code inside it. Change “C:” to your actual driver letter and change “C:\test\excel” to the actual folder that contains the XLSX files: C:
cd C:\test\excel
for /r %%a in (*.xlsx) do powershell -command "start-process -filepath '%%a' -verb print" - To save the print jobs as PDF, one possible option is LEADTOOLS ePrint, which can be configured to save the output PDF with the same name of the source Excel file. (Disclaimer: I am a LEADTOOLS employee).
- Run the Windows Task Scheduler and define a new scheduled task as shown in the following screenshot:
If you’d like to try this and you don’t have LEADTOOLS ePrint, you can download a free evaluation edition from this page.