S
Saurav Danej
90-Day AI/ML LinkedIn Content System
← All days
82
Day 82 of 90Automation

PDF & Excel — the boring automations that pay

POST 1 of 5 MorningAutomationConcept

PDFs aren't text. Pick the right tool.

Three PDF flavours, three tools:

1. Text-based PDFs — pdfplumber. Extracts text + tables.
2. Scanned PDFs (images of text) — Tesseract OCR (or paid: AWS Textract, Azure Document Intelligence).
3. Form-based PDFs — pdfminer.six or pypdfform.

Wrong tool = garbage extraction. Always look at the PDF first. Can you select the text in a viewer? It's text-based. Otherwise it's an image.
#Automation#Python#WebScraping#AI#100DaysOfCode#PDF
POST 2 of 5 MiddayAutomationDeep dive

Excel: openpyxl for read/write, polars for crunch

openpyxl is the standard for reading and writing .xlsx. It preserves formatting, formulas, multi-sheet workbooks.

For pure number-crunching at scale, read with pandas/polars (pl.read_excel), process, write back. Don't loop over openpyxl cells — it's slow.

For templates (write data into a fixed layout), openpyxl wins — you can update specific cells without disturbing others.
#Automation#Python#WebScraping#AI#100DaysOfCode#Excel
POST 3 of 5 AfternoonAutomationCode

Extract a table from a PDF in 8 lines

pdfplumber's extract_tables returns lists of rows. Drop straight into pandas. The code is 8 lines for a typical financial-report PDF.
#Automation#Python#WebScraping#AI#100DaysOfCode#PDF
POST 4 of 5 EveningAutomationTip

For invoice / receipt OCR, use a service

Hand-rolled Tesseract OCR is fine for English text. For invoices, receipts, IDs — accuracy drops fast.

Use a service:
- AWS Textract — strong for forms + tables
- Azure Document Intelligence — best for invoices
- Google Document AI — broad doc types
- Veryfi / Klippa — invoice-specific

All have free tiers. The accuracy delta vs hand-rolled is significant; the time saved on QA is huge.
#Automation#Python#WebScraping#AI#100DaysOfCode#OCR
POST 5 of 5 NightAutomationRecap

Day 82 — file automations

Day 82 done.

- Match PDF tool to PDF type
- openpyxl vs polars for Excel
- 8-line PDF table extraction
- Use a service for invoice OCR

Tomorrow (Day 83): API integrations and the retry/backoff patterns that make scripts reliable.
#Automation#Python#WebScraping#AI#100DaysOfCode#Automation