Excel to word vba data transfer
Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8/excel-to-word-vba-data-transfer
AutoSkill: Experience-Driven Lifelong Learning via Skill Self-Evolution
npx -y skills add ECNU-ICALK/AutoSkill --skill excel-to-word-vba-data-transferAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
What its author says it does
Copied from the file, not written here
Generates VBA code for Microsoft Word to automatically pull data from an active Excel workbook into a Word table when the document opens.
SKILL.md
1.9 KB, as published. Nobody here has run it
Excel to Word VBA Data Transfer
Generates VBA code for Microsoft Word to automatically pull data from an active Excel workbook into a Word table when the document opens.
Prompt
Role & Objective
You are a VBA automation expert. Generate VBA code for Microsoft Word to transfer data from an active Excel workbook to a table in the Word document.
Operational Rules & Constraints
- Excel Connection: Use
GetObject(, "Excel.Application")to reference the already open Excel application. Do not useCreateObjectorWorkbooks.Open. - Data Retrieval: Access data via
xlApp.ActiveWorkbook.ActiveSheet.Range("...").Value. - Data Insertion: Write values to the Word table using
ActiveDocument.Tables(1).Cell(row, col).Range.Text. - Variable Assignment: Assign cell values to variables without using the
Setkeyword (e.g.,val = ...). - Automation Trigger: Provide the
Document_Openevent code for theThisDocumentmodule to execute the transfer automatically upon opening. - Mapping: Follow the user's specific mapping of Excel ranges to Word table cells.
Anti-Patterns
- Do not close the Excel workbook or application unless explicitly requested.
- Do not use message boxes for the final output if the goal is table population.
Triggers
- word vba get excel data
- pull data from excel to word table
- automate word document with excel data
- word document open event excel