Excelerate: Towards Compiling Excel to Human Readable Code

Microsoft Excel is the most widely used end-user programming platform, yet its formula calculation engine presents a challenge for large scale calculations in the form of long delays and unreliability. This thesis presents Excelerate, a novel source-to-source compiler that compiles Excel files to idiomatic C# libraries while preserving complete computational semantics.

The compiler employs a three-phase pipeline: a Structural Model parses the Excel Workbook to extract spreadsheets and tables; a Compute Model derives the dependency graph of formula compositions; and a Code Model emits imperative C# through the use of the Roslyn API. Building on this approach, this thesis introduces structure-aware compilation that automatically detects higherlevel spreadsheet structures, such as tables and recursive tables. It is able to produce readable, and
comprehensive code.

Evaluation is done on five real-world Microsoft Excel templates and demonstrates semantic equality with Excels native calculation engine. Excelerate exhibits a speed-up of 1710x over Excel, indicating substantial performance improvements. These findings show that complex Excel formula compositions within a workbook can be transformed into idiomatic C# code.