Advanced AI Document Editing with Hatz
We have upgraded the Python Code Interpreter to support Advanced AI Document Editing. This update removes previous limitations, allowing you to seamlessly manipulate, create, and analyze documents, presentations, and spreadsheets directly within your chat or workflow.
Whether you are automating a slide deck, cleaning a massive dataset, or extracting content from PDFs, Hatz turns your files into programmable assets.
Getting Started
This feature is integrated directly into the core Hatz experience.
No Setup Required: You do not need to enable specific tool toggles.
Native Integration: It works automatically without requiring the "Auto-tool" toggle.
Editing Older Uploads: Documents uploaded before this feature was enabled may not be editable. This includes files in existing chats, and constants referenced in Agents, Apps and Workflows. If you encounter an error, please re-upload the document and try again.
How to Use (Quick Start)
Upload: Drag and drop your document or spreadsheet into the chat (or use it as a constant in an App, Agent, or Workflow).
Prompt: Tell Hatz exactly what you want changed, analyzed, or produced.
Download: Hatz will process the file using code execution and provide a secure download link for your updated version.
Supported File Types
To ensure successful editing, please use the following modern formats.
File Type | Extension |
Documents | .docx, .pdf, .pptx |
Spreadsheets | .csv, .xlsx |
Note on Legacy Files: Old formats like .doc, .xls, and .ppt are not supported. Please open these in Microsoft Office and "Save As" their modern equivalents (.docx, .xlsx, .pptx) before uploading.
Capabilities by File Type
Word Documents (.docx)
Intelligent Editing: Edit and replace text while preserving the original paragraph structure.
Global Formatting: Update fonts, headers, and styles across the entire document instantly.
Content Generation: Generate entirely new reports, insert images, or update tables based on your instructions.
Spreadsheets (.csv / .xlsx)
Data Hygiene: Instantly clean complex datasets, standardize formats, and remove duplicates.
Deep Analysis: Calculate metrics, generate summary tables (e.g., sales totals by region), and create charts.
Mass Merging: Combine multiple CSVs or Excel sheets into one master file using complex join logic.
PowerPoint Presentations (.pptx)
Template Automation: Upload a template and a dataset to generate dozens of slides instantly (e.g., one slide per product).
Mass Updates: Find and replace text, update footers, or standardize fonts across 100+ slides in seconds.
Slide Management: Merge multiple decks, reorder slides, or extract images into a folder.
PDFs (.pdf)
Content Reconstruction: Extract text and tables from a PDF to rebuild them into an editable Word document (.docx).
Structural Control: Merge multiple PDFs, split pages into separate files, rotate pages, or reorder them.
Overlays: Apply watermarks (e.g., "CONFIDENTIAL") or stamp page numbers on existing documents.
Files, Downloads, and Persistence
Original File Preservation: Your original upload is never overwritten. Hatz always creates a brand-new output file for any edits made.
Link Expiration: Download links generated by Hatz typically expire after approximately 1 hour for security. If a link expires, simply ask Hatz to regenerate it.
Environment Pausing: The code execution environment may pause after a period of inactivity to save resources. It will resume automatically as soon as you continue the conversation.
Pro Tip: Iterative Editing
When you want to perform a sequence of edits—such as converting a PDF to Word and then replacing text, or looking to continuously update a pptx —you must explicitly tell Hatz to look at the new file. Users may want to upload the newly created file to guarantee changes are included.
Incorrect phrasing: "Now filter the data." (Hatz might look back at your original upload).
Correct phrasing: "Now filter the data in the new file you just created."
Important Notes & Limitations
Password Protection: Hatz cannot process encrypted or password-protected files. Please upload an unlocked copy.
Scanned PDFs: If your PDF is a scanned image rather than digital text, Hatz may not be able to read or edit the content without Optical Character Recognition (OCR), which varies in accuracy.
PDF to Word Conversion: This process extracts text and tables to build a new editable document. It does not perform a pixel-perfect visual conversion. Complex layouts (like magazines or brochures with floating images) may be simplified to linear text to ensure editability.
Excel Pivot Tables: Hatz calculates data summaries (e.g., "Sales by Region") and writes the static results to cells. It does not create interactive Pivot Table objects that allow you to drag and drop fields within Excel.
Visual Fidelity: When converting files, slight shifts in margins, fonts, or image placement are normal as the system reconstructs the document.
Example Prompts to Try
DOCX: "Update the attached .docx: replace every instance of 'ACME Co' with 'Acme Corporation', update the address block to [New Address], make the font blue, and return the edited document."
PPTX: "Rebrand this deck: change the primary color of the headers to #0B5FFF, update the footer to 'Q1 2026', and add a title slide. Return the updated .pptx."
PDF: "Merge these two PDFs into one, rotate pages 3-5 to portrait, and return the merged PDF."
Spreadsheet to Report: "Analyze this CSV, calculate month-over-month growth, create a bar chart for the top 5 regions, and return an Excel file plus a PDF summary."
Working with PDFs and Word Documents
Understanding the technical differences between a PDF and a Word Document (.docx) is the key to getting the results you want. While code can perform powerful operations on both formats, the type of operations available differs significantly.
1. Working Directly with PDFs ("Page-Level" Editing)
Think of a PDF as "Digital Paper." Once a PDF is created, the text and images are "baked" into specific coordinates on the page. Because of this, Hatz Code Execution treats the file as a collection of fixed pages rather than a stream of editable words.
What Hatz CAN do directly to a PDF:
Merge & Combine: We can take multiple PDF files (or a PDF and a Word doc) and staple them together into a single document.
Split & Extract: We can slice a document apart. For example, "Extract pages 1–3 into a new file" or "Split every page into its own separate file."
Rotate & Reorder: If pages were scanned upside down or out of order, we can fix the orientation and sequence.
Watermark & Stamp: We can apply overlays on top of the existing page. This is useful for adding "DRAFT," "CONFIDENTIAL," or page numbers.
Security: We can add password protection to encrypt the file.
The Limitation: We generally cannot rewrite a specific sentence inside a PDF without breaking the layout or leaving blank gaps.
2. Converting to Word ("Content-Level" Editing)
To perform deep editing, the best workflow is to have Hatz convert the PDF to a Word Document (.docx) first.
Think of a Word Document as a "Fluid Canvas." In this format, the text is alive—it flows, wraps, and adjusts automatically. Converting your PDF to Word "unlocks" a new tier of editing capabilities that are impossible in the PDF format.
What Hatz CAN do once the file is converted to Word:
A. Intelligent Find & Replace
What it is: We can scan the entire document for specific terms and replace them.
Why it works in Word: When we replace a short word (e.g., "USA") with a long phrase (e.g., "The United States of America"), the Word document automatically pushes the rest of the text forward to make room. In a PDF, this would simply type over the existing text.
B. "Reflowing" Content
What it is: Adding or removing large blocks of text.
Why it works in Word: If you ask us to remove a paragraph, the text below it slides up to fill the empty space. If we add a new image, the text wraps around it. This ensures the document never looks "broken."
C. Formatting & Styling
What it is: changing fonts, colors, headers, and bolding.
Why it works in Word: We can apply global style changes (e.g., "Make all headers Blue and Bold") instantly.
D. Data Analysis
What it is: Extracting lists or tables.
Why it works in Word: Once converted, tables become editable grids. We can extract this data into Excel or reformat the table borders and shading.
Summary Comparison
Feature | Direct PDF Editing | Converted to Word Editing |
Primary Use | Organizing pages, security, and archiving. | Rewriting text, formatting, and changing content. |
Combine Files? | ✅ Yes (Merge) | ✅ Yes (Append) |
Delete Pages? | ✅ Yes | ✅ Yes |
Delete Paragraphs? | ❌ No (Leaves a blank gap) | ✅ Yes (Text moves up automatically) |
Edit Text? | ❌ No (Text is fixed) | ✅ Yes (Fully editable) |
Change Fonts? | ❌ No | ✅ Yes |
Pro Tip: The "Round Trip" Workflow
If you need a PDF as your final result but need to change the text inside it, ask Hatz to perform a "Round Trip":
Convert the PDF to Word.
Make the necessary text edits in the Word doc.
Save the file back as a PDF.
Known Limitations
While Hatz Code Execution is powerful, file conversion is complex. Please be aware of the following limitations when requesting edits or conversions:
Complex Layouts & Formatting: PDFs with heavy design elements—such as multiple columns, floating images, or background graphics—may not convert perfectly to Word. You may notice text boxes shifting, margins changing, or images moving slightly in the converted file.
Scanned Documents (Images): If your PDF is a scanned image (e.g., a photo of a document) rather than a digital text file, Hatz may not be able to "read" or edit the text without performing Optical Character Recognition (OCR). The accuracy of this depends heavily on the clarity of the scan.
Font Substitutions: PDFs often contain proprietary or custom fonts. When converting to Word or generating new PDFs, Hatz may substitute these with standard system fonts (like Arial or Times New Roman) if the original font is not available in our system.
Interactive Elements: Fillable forms, checkboxes, digital signatures, and drop-down menus are often "flattened" during conversion. They will become static images or text and will no longer be clickable or interactive.
"Round Trip" Fidelity: If you convert a PDF to Word, edit it, and convert it back to PDF, the final document may not look pixel-perfectly identical to the original. Slight variations in spacing and layout are normal.
Here is a polished, high-energy support article that highlights the powerful automation capabilities of Hatz Code Execution for PowerPoint, followed by the necessary technical limitations.
Working with PPTX
PowerPoint is the standard for presentations, but manual editing can be tedious and prone to errors. Hatz Code Execution transforms PowerPoint from a static design tool into a dynamic, automatable engine.
By using Python code to interact with your .pptx files, Hatz allows you to perform tasks that would take hours by hand in just a few seconds. Here is how you can use Hatz to scale your presentation workflows.
1. Intelligent Templating & Bulk Generation
This is the true "superpower" of Hatz. Instead of manually copy-pasting data into 50 different slides, you can treat a PowerPoint file as a template.
From Excel to Deck: Upload an Excel spreadsheet (e.g., a list of 50 employees or 100 products) and a single PowerPoint template slide. Hatz can loop through your data and generate a 50-slide presentation instantly, where every slide is perfectly formatted with that specific row's data.
Dynamic Placeholders: You can set up "keys" in your slide (like
{{Client_Name}}or{{Date}}). Hatz can scan the deck and programmatically replace those keys with real values across the entire presentation.Use Cases:
Generating customized sales pitches for 20 different prospects at once.
Creating certificates of completion for a class of 500 students.
Building a product catalog where every slide follows the exact same layout.
2. Instant Global Updates
Hatz provides "Command Center" control over your slides. Because the code iterates through every object on every slide, you can ensure 100% consistency without missing a spot.
Mass Find & Replace: Need to update a project code, a year (2024 $\rightarrow$ 2025), or a company name across a 100-slide deck? Hatz does it instantly, preserving the original formatting of the text.
Font & Color Standardization: If you have a messy deck where headers are a mix of Arial, Calibri, and Times New Roman, Hatz can enforce a single style rule (e.g., "Make every Title bold, size 24, and blue") across the entire file.
Footer & Note Management: You can instantly append "Confidential - Internal Use Only" to the footer of every slide or clear out all speaker notes before sharing a file externally.
3. Deck Merging & Organization
Stop struggling with "Copy Slide," "Keep Source Formatting," and broken layouts. Hatz manages the file structure cleanly.
Seamless Merging: You can combine multiple separate files (e.g., a "Marketing Update," a "Financial Report," and a "Strategy Deck") into a single, cohesive Master Presentation.
Smart Splitting: Conversely, you can take a massive Master Deck and ask Hatz to "Save slides 1-10 as 'Executive Summary.pptx' and slides 11-30 as 'Appendix.pptx'."
Asset Extraction: Need the original images from a presentation? Hatz can "unzip" the PowerPoint and give you a folder containing every high-resolution image used in the deck.
4. Data-Driven Charts
Hatz can interact with the data that powers your PowerPoint charts.
Update Chart Data: If you have a standard "Monthly Revenue" slide with a bar chart, you don't need to redraw it. You can provide Hatz with the new numbers for this month, and it can update the underlying data table, causing the chart to reflect the new values automatically.
Known Limitations
While Hatz offers powerful automation for structure and text, PowerPoint is a visual medium, and code has no "eyes." Please keep the following in mind:
Text Overflow (The "Box" Problem): Code inserts text into the box you tell it to. If you try to put a 500-word paragraph into a small text box designed for a title, the text will run off the bottom of the slide. Code does not automatically resize fonts or create new slides to handle overflow.
Complex Layout Reflow: Hatz cannot "intelligently" rearrange a slide layout based on visual balance. For example, if you swap a vertical image for a horizontal one, it might overlap with text or look stretched.
Animations & Transitions: Hatz cannot easily create or modify complex animations (e.g., "Fade in logo after 2 seconds"). These settings are stored in complex XML structures that are risky to modify via code.
SmartArt: SmartArt (hierarchy charts, cycle diagrams) are complex grouped objects. Hatz generally cannot add new nodes or bullets to a SmartArt graphic without breaking it.
File Format: These features work with modern
.pptxfiles. Older.ppt(Binary) files from the Office 97-2003 era must be saved as.pptxbefore Hatz can edit them.
Working with .csv, .xlsx
Spreadsheets are the backbone of business data, but managing them manually is slow, error-prone, and tedious. Hatz Code Execution changes the game by treating your data as a programmable asset.
Whether you are cleaning messy data, merging complex reports, or performing deep analysis, Hatz can process millions of rows in seconds. Here is how you can unlock the full potential of your data.
1. Instant Data Hygiene & Standardization
Messy data is the enemy of insight. Hatz acts as an automated cleaner that scrubs your data until it sparkles.
Intelligent De-Duplication: Instantly identify and remove duplicate rows based on specific criteria (e.g., "Remove duplicates only if the Email AND Phone Number match").
Format Standardization: Fix those annoying inconsistencies. Hatz can scan columns to ensure all phone numbers follow
(555) 123-4567format, all dates areMM/DD/YYYY, and all names are Title Cased.Fill the Gaps: Hatz can intelligently handle missing data—filling blank cells with "N/A," "0," or even calculating the average of the column to fill the gap.
2. Advanced Transformation & "Magical" Merging
Stop manually copy-pasting or struggling with fragile VLOOKUPs. Hatz handles data relationships with robust logic.
The "Super Merge": Have 3 different CSV files? Hatz can stitch them all together into one Master Workbook in the blink of an eye.
Complex Joins: Hatz can perform SQL-style joins. You can upload a "Sales" sheet and a "Customer" sheet, and Hatz will merge them into a single view based on Customer ID, even if the files are formatted differently.
Splitting & Partitioning: The reverse is also true. Upload a Master Sales Report and ask Hatz to "Create a separate Excel file for every Sales Rep," and it will generate individual files containing only that rep's data.
3. Deep Analysis & Calculation
Hatz turns static rows into actionable insights without you needing to write a single complex formula.
Pivot Tables & Aggregation: Ask Hatz to "Summarize total revenue by Region and Product Category," and it will generate a clean summary table instantly.
Complex Math: Need to apply a complex commission tier logic to 10,000 rows? Hatz can run the calculation on every row and write the result into a new column—faster and more accurately than drag-filling formulas.
Filtering & Logic: "Keep only rows where the Status is 'Active' and the Date is after Jan 1st." Hatz filters the noise so you can focus on the signal.
4. Professional Styling & Formatting
Once the data is crunched, Hatz can make it look presentation-ready.
Visual Polish: Hatz can apply professional styling to your new spreadsheet—bolding headers, freezing the top row, adjusting column widths to fit the text, and changing font colors.
Conditional Formatting: Hatz can highlight data programmatically. "Highlight any cell in the 'Profit' column that is negative in Red, and anything over $10,000 in Green."
Known Limitations
While Hatz is an incredible tool for data manipulation, Excel files are complex containers. Here are the limitations to keep in mind:
VBA Macros (.xlsm): Hatz generally strips out or ignores VBA Macros; it focuses on the data, not the internal code of the file.
Images & Objects: If you have floating images, charts, or embedded objects (like a PDF inside an Excel cell), these may be lost or removed during processing. Hatz reads the grid (rows/columns), not the "layer" above it.
Live Formulas vs. Values: When Hatz performs a calculation (e.g., adding Column A + Column B), it typically writes the result (e.g., "10") into the cell, not the formula (e.g.,
=SUM(A1, B1)). This ensures the data is correct, but it means the cell won't update dynamically if you change the inputs later.Password Protection: Hatz cannot open or edit password-protected spreadsheets unless you remove the password first.
Pivot Table Interactivity: While Hatz can create a summary table that looks like a pivot table (calculated data), it generally does not create a native "Live Pivot Table" object that you can drag and drop fields within inside Excel. It creates the result of the pivot.