By selecting the worksheet with the print area you activate the print function for your app. This enables you to save the content of your calculation as a PDF file and send it by email.
- General information about the "Export as PDF" functionality
- Add "Export as PDF" action button with additional options
- Define the PDF file name
- Upload recorded data
- Hide and show "print as PDF" action button depending on conditions
General information about the "Export as PDF" functionality
First, make sure your source Excel file contains a worksheet that contains the relevant info for your print data. For more information about how to define print areas, please visit the article "Set or clear a print area on a worksheet".
If you want the printout to be in landscape orientation, change the page orientation in your source file. (See: "Print a Worksheet in Landscape or Portrait")
Attached please find a sample file in which the worksheet "angebot" is used as a print sheet for the app.
Please be advised that charts will not be visible in the PDF, especially if your source file is a .xlsx file. Sometimes charts are printed if you save your file as .xls and use this version as source file for your app. In this article, you can find out how to switch/update the source file of your app: https://support.openasapp.net/hc/en-us/articles/207939275
Add "Export as PDF" action button with additional options
It is possible to print different sheets from Excel, depending on which action button the user clicks.
To add a "PDF Print" button to your app, do the following:
- Open your app in the web portal.
- Click the "Add Element" (+) icon on the right side of the preview.
- Pick the box "Export as PDF" (or "Action Button" > then select "PDF Export" Action).
- In the item editor which pops up after adding the item you can change the caption in the "Main" tab. This text will be displayed in the action button.
- Click on the gear icon.
- Specify which worksheet's print area should be turned into a PDF when the button is pressed: (1) by selecting the print sheet (2) by defining the cell in your spreadsheet that contains the sheet name of the range you want to print:
- Save your changes.
- Update your app.
Now you have a button in the app which generates the PDF file immediately after clicking on it.
Define the PDF file name
(1) Define the name in the element or (2) make it a dynamical name from a cell in your spreadsheet
Upload recorded data
Uploads the current app data to the server, before triggering the main action. You can later access this data via the "show change protocol" view. This is based on "allow sending calculations" functionality.
You can learn more about the upload feature in this article: How to turn an Excel form into an app and collect data
Hide and show "print as PDF" action button depending on conditions
Enter the address of the cell in the workbook whose value decides if this element is shown or not. The cell should evaluate to TRUE or FALSE.
More about the functionality can be found here: Show or Hide elements based on conditions
Comments
0 comments
Please sign in to leave a comment.