This is a Python automation script that works with excel sheets using the Openpyxl module. The script performs the following tasks:
- Lists each company with the respective number of products in the inventory.
- Calculates the total inventory value per supplier.
- Lists all products with inventory less than 10.
- Adds a new column to the excel sheet, which is the product of inventory and price.
This script requires the following:
- Python 3.6 or higher
- Openpyxl module
-
Install the Openpyxl module by running the following command:
pip install openpyxl -
Save the script to your preferred directory.
-
Update the file path of the excel sheet on line 3 to match the location of your excel sheet.
-
Run the script by executing the following command in the terminal:
python script_name.py -
The output will be displayed in the terminal and saved in a new excel sheet with the name "inventory_with_total_value.xlsx".
Make sure the script and the excel sheet are in the same directory. If not, provide the absolute file path to the excel sheet on line 3.
This script automates the process of calculating the total inventory value per supplier, listing each company with the respective number of products, and adding a new column to the excel sheet. It helps to save time and minimize errors that could occur during manual calculations.