Expand description
Inserting and removing rows and columns, and what that does to the rest of the workbook.
A reference the edit deletes outright becomes #REF!, as it does in Excel;
one that merely loses part of a range is narrowed instead. $ does not
protect a reference here: an absolute address names a cell, and inserting a
row above that cell moves the cell.
Structs§
- Deduplicated
- What
remove_duplicatesdid. - Flash
Fill - A way of making an output from the cells left of it, learnt from examples.
- Outline
Group - One group of an outline: lines
first..=last, 0-based, atlevel. - Pivot
Captions - The words a report is laid out with.
{}in a template stands for the field or item name.Defaultis what an English Excel writes; the caller passes another language, which this crate does not know. - SortKey
- One key of
sort_range: what to compare and in which direction. - Sort
Options - How
sort_range_withreads its range. - Subtotals
- How
subtotalsummarises a list.
Enums§
- Axis
- Which way the grid is being edited.
- Copy
Origin - Where inserted rows or columns take their formatting from: Excel’s
CopyOriginonRange.Insert. - Filter
Output - Where
advanced_filterputs what passes. - SortBy
- What a
SortKeycompares. - SplitBy
- How
text_to_columnscuts a cell’s text. - Subtotal
Function - What a
subtotalrow computes: the eleven aggregates ofSUBTOTAL.
Constants§
- MAX_
OUTLINE_ LEVEL - The deepest outline Excel keeps: eight level buttons, seven levels of groups.
Functions§
- advanced_
filter - Filters a list by a criteria range: Excel’s Data - Advanced.
- collapse_
columns collapse_rowsfor columns.- collapse_
rows - Hides the detail of a group: Data - Hide Detail, or the outline’s minus
button.
rownames the group as the button does: the group whose summary row it is, or else the innermost group it is in. Returns whether there was such a group. - column_
groups - The groups of a sheet’s columns, outer ones first.
- consolidate
- Combines ranges into one table: Excel’s Data - Consolidate, without links to the sources.
- copy_
range - Copies a rectangle of cells, formatting and all, so that its top left
corner lands on
to. - expand_
columns expand_rowsfor columns.- expand_
rows - Shows the detail of a group again: Data - Show Detail, or the plus button. Groups inside it that were collapsed on their own stay so.
- fill
- Copies the first row of
areainto every row below it (Axis::Rows, Excel’s Ctrl+D), or its first column into every column to the right (Axis::Columns, Ctrl+R). Values, formatting and formulas go ascopy_rangetakes them: a relative reference moves with each copy. - fill_
series - Fills
areathe way dragging the fill handle does: down each column forAxis::Rows, right along each row forAxis::Columns. - fill_
series_ back fill_seriesthe other way: the fill handle dragged up (Axis::Rows) or left (Axis::Columns). The seed is the run of filled cells at the end of the area, and the series runs back from it:1, 2above goes0, -1, a singleКв3goesКв2,Кв1, a single date steps back a day.- filter_
table - Sets what one column of a table keeps, then hides the data rows that the
table’s criteria reject and shows the rest, as applying a filter in Excel
does.
columncounts from 0 at the table’s first column;Nonetakes the column’s criterion off. The table is found by name anywhere in the book. - flash_
fill - Fills the empty cells of
at’s column by example: Excel’s Data - Flash Fill (Ctrl+E), run withatin the column to fill. - group_
columns group_rowsfor columns.- group_
rows - Groups rows
first..=lastone level deeper: Data - Group. Rows already grouped become a group inside their group. - insert_
cells - Inserts blank cells over
area, pushing what was there down or right. - insert_
cells_ with insert_cells, with the new cells styled like the line beside them: above or to the left forBefore, below or to the right forAfter.- insert_
columns - Inserts
countcolumns before columnat, 0-based. - insert_
columns_ many insert_rows_manyfor columns: the result ofinsert_columns_withcalled once per place from right to left.- insert_
columns_ with insert_columns, with the new columns formatted like a neighbour: cell styles, the column’s own style and its width.- insert_
rows - Inserts
countrows before rowat, 0-based. Everything from there down moves, and every reference to it follows. - insert_
rows_ many - Inserts rows at several places in one pass over the workbook: each
(at, count)putscountrows before rowat, 0-based. - insert_
rows_ with insert_rows, with the new rows formatted like a neighbour: cell styles, the row’s own style and its height.- move_
range - Moves a rectangle of cells so that its top left corner lands on
to, leaving the source empty. - move_
sheet - Moves the sheet at
fromto positiontoin the tab bar. - refresh_
all_ pivots - Refreshes every pivot table of the workbook, as Excel’s Refresh All does, and returns how many were laid out.
- refresh_
pivot - Lays out pivot table
tableof sheetsheetfrom its source data, and returns the cells the report now covers. - remove_
cells - Removes the cells of
area, pulling what was below or to the right of them back over the hole. - remove_
columns - Removes
countcolumns starting at columnat, 0-based. - remove_
columns_ many remove_rows_manyfor columns: the result ofremove_columnscalled once per block from right to left, with overlapping blocks merged.- remove_
duplicates - Removes the rows of
areathat repeat a row above them: Excel’s Data - Remove Duplicates. - remove_
rows - Removes
countrows starting at rowat, 0-based. - remove_
rows_ many - Removes several blocks of rows in one pass over the workbook: each
(at, count)namescountrows from rowat, 0-based. - remove_
sheet - Removes the sheet at
sheet, turning every reference into it into#REF!. - rename_
sheet - Renames the sheet at
sheet, rewriting every formula that names it. - row_
groups - The groups of a sheet’s rows, outer ones first.
- show_
outline_ level - The outline’s level buttons: shows rows, columns or both down to outline
level
n, where 1 shows only the outermost summaries andMAX_OUTLINE_LEVEL + 1shows everything.Noneleaves that side alone. - sort_
range - Sorts the rows of
areabykeys, the first key deciding first: Excel’s Data - Sort on a range with no header row.sort_range_withtakes a header row and sorts columns. - sort_
range_ with - Sorts the rows (or columns) of
areabykeys, the first key deciding first. - sort_
table - Sorts the data rows of the table called
name- its header and totals rows stay put - with keys naming its columns bySortBy::Headeror by sheet column. - subtotal
- Adds a total row under each group of a sorted list and a grand total under all of them, and outlines the result: Excel’s Data - Subtotal with “Summary below data”.
- text_
to_ columns - Splits the text of each cell in the first column of
sourceacross the columns fromdestinationrightwards: Excel’s Data - Text to Columns, with every column in the General format. - ungroup_
columns ungroup_rowsfor columns.- ungroup_
rows - Takes rows
first..=lastone level out of their outline: Data - Ungroup. A row that leaves the outline altogether is shown again.
Type Aliases§
- Consolidate
Source - One source of
consolidate: a sheet and a range on it.