Cornet: Learning Table Formatting Rules By Example
Mukul Pratap Singh, José Cambronero, Sumit Gulwani et al. · Proceedings of the VLDB Endowment · 2023
Spreadsheets are widely used for table manipulation and presentation. Stylistic formatting of these tables is an important property for presentation and analysis. As a result, popular spreadsheet software, such as Excel, supports automatically formatting tables based on rules. Unfortunately, writing such formatting rules can be challenging for users as it requires knowledge of the underlying rule language and data logic. We present Cornet, a system that tackles the novel problem of automatically learning such formatting rules from user-provided formatted cells. Cornet takes inspiration from advances in inductive programming and combines symbolic rule enumeration with a neural ranker to learn conditional formatting rules. To motivate and evaluate our approach, we extracted tables with over 450K unique formatting rules from a corpus of over 1.8M real worksheets. Since we are the first to introduce the task of automatically learning conditional formatting rules, we compare Cornet to a wide range of symbolic and neural baselines adapted from related domains. Our results show that Cornet accurately learns rules across varying setups. Additionally, we show that in some cases Cornet can find rules that are shorter than those written by users and can also discover rules in spreadsheets that users have manually formatted. Furthermore, we present two case studies investigating the generality of our approach by extending Cornet to related data tasks (e.g., filtering) and generalizing to conditional formatting over multiple columns.
Cited by 9 works. doi:10.14778/3603581.3603600 Open-access PDF
Authors
References
- Finding Groups in Data: An Introduction to Cluster Analysis.
- Proceedings of the 2014 ACM SIGMOD International Conference on Management of Data
- Proceedings of the 2021 International Conference on Management of Data
- The Active Modeler: Mathematical Modeling with Microsoft Excel
- Query from examples
- Learning programs by learning from failures
- Active layout engine: Algorithms and applications in variable data printing
- Exemplar queries: a new way of searching
- FlashMeta: a framework for inductive program synthesis
- Spreadsheet Conditional Formatting: An Untapped Resource for Mathematics Education