Recorded Spreadsheet Operations Combined for Portable Macro Code

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing systems for generating macro code from user operations in electronic document applications, such as spreadsheets, do not effectively combine operations, leading to inefficient and less readable code.

Innovation Solution

A system and method for combining and aliasing entities in recorded operations, using a recorder application to generate macro code that reduces the number of operations and improves readability by employing a code tree traversal and aliasing entities.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If multiple operations are recorded separately in macro code, then each operation can be individually tracked and executed, but the code becomes lengthy and less readable

Engineering Contradiction:
Improvereadability of macro codeVSAvoidtime to write and maintain macro code
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The patent combines multiple separate operations into a single composite operation by detecting operations of the same type acting on adjacent cells. Instead of recording each cell operation individually, the system merges them into one operation that acts on a range of cells, thereby reducing code length and improving readability while maintaining the ability to track and execute each underlying operation.

Inventive Principle:
Principle #5Merging (Combining)

2Productivity

If operations are combined into fewer lines of code, then the macro code becomes more concise and readable, but the complexity of processing and generating the code increases

Engineering Contradiction:
Improveconciseness of macro codeVSAvoidcomplexity of code generation system
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The code generation system is segmented into distinct functional modules: an operation detection module that identifies operations of the same type, a merging module that combines adjacent operations, and a code generation module that produces the final macro code. This segmentation allows the system to handle the complexity of operation combining through specialized sub-components rather than a monolithic complex system.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs preliminary analysis of recorded operations before generating macro code. It pre-processes the operation sequence to identify and group combinable operations, determining which operations can be merged based on their type and the adjacency of their target cells. This preliminary action simplifies the subsequent code generation process by providing a pre-organized structure of combinable operations.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If macro code is generated to perform operations on specific cells, then the code accurately reproduces user actions, but the code becomes less portable to different spreadsheets

Engineering Contradiction:
Improveaccuracy of operation reproductionVSAvoidportability of macro code
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The generated macro code uses relative references and range-based operations that can adapt to different spreadsheet contexts. By combining operations into range-based commands rather than cell-specific commands, the code becomes more universal and can be applied to different spreadsheets with similar structures, enhancing portability while maintaining accurate reproduction of the intended operations through the range abstraction.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentEP3938945B1Combining recorded operations
Publication Date: 2025.08.20 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP3938945B1 patent drawingFigure 1
  • EP3938945B1 patent drawingFigure 2
  • EP3938945B1 patent drawingFigure 3

AI summary

Disclosed in some examples are methods, systems, devices, and machine-readable mediums for combining activities in recorded code. A method is disclosed that includes receiving a first indication of a first operation and a second indication of a second operation from an electronic document application, the first indication of the first operation indicating that the first operation is performed on a first cell of the electronic document application and the second indication of the second operation indicating the second operation is performed on a second cell. The method may include determining a range of cells expression. The method may further include generating code within the recorder application comprising the range of cells expression that when executed within the recorder application causes an operation of the same type as the first operation and the second operation to be performed by the electronic document application on the first cell and the second cell.