Evo pptx embedded excel updater

From OpenLAIR/OpenSkill · View interactive version

Evo pptx embedded excel updater is an AI agent skill from the GitHub repository OpenLAIR/OpenSkill. Provides utilities for finding and manipulating embedded Excel OLE objects within PPTX files, reading text boxes for context, modifying Excel cell values while preserving formulas, and saving the updated PPTX. Use when you need to extract embedded Excel spreadsheets from PowerPoint presentations, up

How to use this skill

Skill file

evo-pptx-embedded-excel-updater

Overview

End-to-end handling of embedded Excel OLE objects in PPTX files. Covers:

Requirements

Key Domain Knowledge

OLE Object Identification

Excel Blob Access

Formula Preservation

Text Box Reading

Exchange Rate Table Structure

Usage

import sys
sys.path.insert(0, '/app/environment/skills/evo-pptx-embedded-excel-updater/scripts')
from utils import (
    find_embedded_ole_excel_shapes,
    extract_excel_blob_from_ole_shape,
    read_text_boxes_from_slide,
    parse_exchange_rate_from_text,
    load_excel_from_blob,
    update_excel_cell_preserve_formulas,
    save_excel_to_blob,
    replace_ole_blob_in_pptx,
    find_cell_by_currency_pair,
    process_pptx_exchange_rate_update
)

# Quick end-to-end usage:
process_pptx_exchange_rate_update('/root/input.pptx', '/root/results.pptx')

# Or step-by-step:
from pptx import Presentation
prs = Presentation('input.pptx')
slide = prs.slides[0]

# Find Excel objects
excel_shapes = find_embedded_ole_excel_shapes(slide)
shape, ole = excel_shapes[0]

# Read text box for updated rate
text_boxes = read_text_boxes_from_slide(slide)
for name, text in text_boxes:
    rate_info = parse_exchange_rate_from_text(text)
    if rate_info:
        from_curr, to_curr, new_rate = rate_info
        break

# Extract and modify Excel
excel_blob, r_id, target_part = extract_excel_blob_from_ole_shape(shape, slide)
wb, ws = load_excel_from_blob(excel_blob)
cell_coord = find_cell_by_currency_pair(ws, from_curr, to_curr)
old_val, updated = update_excel_cell_preserve_formulas(ws, cell_coord, new_rate)

# Save back
modified_blob = save_excel_to_blob(wb)
replace_ole_blob_in_pptx(target_part, modified_blob)
prs.save('output.pptx')

Functions Reference

| Function | Description |

|---|---|

| find_embedded_ole_excel_shapes(slide) | Returns list of (shape, ole_format) for Excel OLE objects |

| extract_excel_blob_from_ole_shape(shape, slide) | Returns (excel_bytes, r_id, target_part) |

| read_text_boxes_from_slide(slide) | Returns list of (shape_name, text) tuples |

| parse_exchange_rate_from_text(text) | Returns (from_currency, to_currency, rate) or None |

| load_excel_from_blob(excel_bytes) | Returns (workbook, worksheet) with formulas preserved |

| find_cell_by_currency_pair(ws, from_curr, to_curr) | Returns cell coordinate string like 'B3' |

| update_excel_cell_preserve_formulas(ws, cell, value) | Returns (old_value, was_updated); skips formulas |

| save_excel_to_blob(wb) | Returns bytes of modified xlsx |

| replace_ole_blob_in_pptx(target_part, bytes) | Replaces blob in-place |

| process_pptx_exchange_rate_update(in, out) | End-to-end processing |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.