Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 from docx import Documentimport math products = [ Parka , Boots, Snowshoes, Climbing Rope, Oxygen Tank, Ice Pick, Crampons ] for i
from docx import Documentimport math products Parka "Boots", "Snowshoes", "Climbing Rope", "Oxygen Tank", "Ice Pick", "Crampons" for i in rangenumFiles: invoiceNum strizfill for j in rangerandomrandint: if product in productList: else: subtot roundrandomrandomrandomrandint total roundsubtot tax, aDoc Document pProd aDoc.addparagraphPRODUCTS
pProd.addrunfkey:productListkey
aDoc.savefINVinvoiceNumdocX" the file makedocs.py holds a script that when run will create a set of randomized invoices in the form of word documents. your task is to create a python script that processes all docx files created into a single spreadsheet that has a row for each invoice and columns for: invoice id total number of products purchased, subtotal, tax, and total. the file aexxslx contains an example spreadsheet. read documents extract data write spreadsheets please i want answer of this question in an easy way without using pandas with full file paths for my reference if you want you can upload images too
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started