PPA Tools: Excel
Summary
This module contains actions used to create Microsoft Excel workbooks.
Actions
ppa_tools.excel.
create_from_dictionaries
Generate an Excel workbook & save it as a file in the task workspace.
Supports creating workbooks with a single sheet or multiple sheets.
The file will be saved using the xlsx extension.
Minimum Plugin Version: 5.0.0
Input (Single Sheet)
-
header: a list of column names
-
keys: a list of dictionary keys used to retrieve the value for each column
-
data: a list of dictionaries used to populate each row in the spreadsheet
-
file_name: the name of the file to create (an xlsx extension will be added if not provided)
Input (Multiple Sheets)
-
header: a list of column names
-
keys: a list of dictionary keys used to retrieve the value for each column
-
data: a dictionary containing sheet names & dictionaries used to populate each sheet
-
file_name: the name of the file to create (an xlsx extension will be added if not provided)
Output
Nothing is outputted by this action.
Example 1 - Single Sheet
- Getting Remote Desktop Users from Active Directory & saving them as
rdp_users
1 2 3 4 5 |
|
- Creating an Excel spreadsheet from
users
with 4 attributes from each user
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
- Sending the created file as an email attachment
1 2 3 4 5 6 7 8 9 |
|
Example 2 - Multiple Sheets
-
Getting users from 3 groups in Active Directory
-
Creating an Excel spreadsheet with a sheet per group & 4 attributes per user
-
Sending the spreadsheet as an email attachment
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|
Header & Keys Length
The length of the header
& keys
inputs must be the same.