Skip to main content

EXCEL TO PDF

    
 EXCEL TO PDF

Introduction

This tutorial will guide you through creating an automated workflow using Microsoft Power Automate to convert Excel files (.xlsx) uploaded to OneDrive for Business into PDF format. This workflow will monitor a specific folder in OneDrive for Business, convert any newly uploaded Excel files to PDFs, and save the converted files back into a designated folder.

Create a New Flow

Now, let's create a workflow that converts Excel files to PDFs.

1. Start with a Blank Flow:

   - Click on "Create" from the left sidebar and choose "Automated cloud flow".

   - Give your flow a name, such as "Excel to PDF Converter", and select "When a file is created (OneDrive for Business)" as the trigger.

2. Set Up the Trigger:

·  Choose the OneDrive for Business account and specify the folder where you want to monitor for new Excel files.

·  Select "When a file is created" as the trigger condition. This ensures the flow starts when ever a new file is uploaded to the specified folder.




Step 3: Define Actions

Next, define the actions that will convert the Excel file to PDF and save it back to OneDrive for Business.

1. Get File Content:

   - Add an action to retrieve the content of the newly created file 

- Choose "Get file content" from the list of actions.

   - Configure it to use the same OneDrive for Business connection and specify the file ID from the trigger output.



 

2. Create file:

·       Add an action to Create File.

·       Select the folder path

·      Select "Create file" and specify the file Name and File content retrieved in the previous step.


2. Convert File to PDF:

  • Add an action to convert the Excel file content to PDF.
  • Select "Convert file" and specify the file content retrieved in the previous step.
  • Set the file type to PDF.



3. Create File Copy:

  • Finally, add an action to create a copy of the converted PDF file.
  • Choose "Create file" and specify the folder where you want to save the PDF. 
  • Use dynamic content to name the PDF file (e.g., use the original file name with ".pdf" extension).


Step 4: Save and Test the Flow

1. Save and Enable:

  • Click on "Save" to save your flow. 
  • Once saved, click on "Enable" to activate the flow. This allows it to start monitoring the specified OneDrive for Business folder.


2. Test the Flow:

  • Upload an Excel file (.xlsx) to the monitored folder in OneDrive for Business.
  • Check the flow run history to ensure it triggers correctly and completes all actions (retrieve file content, convert to PDF, create file copy).

Conclusion

In this tutorial, you've learned how to create a Microsoft Power Automate workflow to automatically convert Excel files to PDF format using OneDrive for Business. By setting up triggers and actions, you can streamline document conversion processes and improve efficiency in handling file formats across your organization.

 

Comments

Popular posts from this blog

Generate 500 Excel sheet names in 5 seconds😉

Prerequisites 1. Open Your Workbook: Open the Excel workbook in which you want to list the sheet names . 2. Create a New Sheet: Insert a new worksheet where you will display the list of sheet names. For this example, name the new sheet Index. Enable Macros To use some advanced Excel functions, you need to enable macros: 1. Go to Developer Tab: If you don’t see the Developer tab, you need to enable it from Excel Options. 2. Enable Macros: Click on Developer > Macro Security and ensure macros are enabled. Use the GET.WORKBOOK Function 1. Define Name: Since GET.WORKBOOK is an old Excel 4.0 macro function, you need to define it as a named range.     Go to Formulas > Define Name.     Name it SheetNames.     In the Refers to box, enter:   =REPLACE(GET.WORKBOOK(1),1,FIND("]",GET.WORKBOOK(1)),"") 2. Reference Sheet Names Dynamically with `INDEX` To keep things organized, assign serial numbers to each sheet name in cell A1 and drag it down. Use the formul...