Default
Default
In-browser search
Settings
Every public function, one line each, generated from the compiled modules by
dev/cheatsheet.exs; test/sheetshow/cheatsheet_test.exs fails if it drifts.
+ ! marks a function with a raising twin of the same arity. The sections
are the sidebar's.
Start here Sheetshow authenticate/1Trades the workbook's credentials for an access token. beside/1,2Places groups of cells side by side, each starting on the column after the… col/2One column of cells from a list of values, top to bottom. connect/1Makes a workbook ready to use and learns the sheets it has. fetch_sheets/1Asks the spreadsheet which sheets it has, and puts them on the workbook. max_col/1The highest column any cell sits on, or nil for no cells. max_row/1The highest row any cell sits on, or nil for no cells. pad_below/2Adds n empty rows below the cells, so the next stack/1 leaves a gap. pad_right/2Adds n empty columns to the right of the cells; see pad_below/2. plan/2Turns cells into a plan: the ops that write them, in the order they are to… + ! put_sheet/2Puts every cell on a sheet. put_style/2Merges a style into every cell's; see Sheetshow.Cell.put_style/2 . read_cells/2The cells in a range, in reading order, with empty cells left out. + ! read_rows/2The values in a range, as rows: what the cells work out to, rather… + ! records/3One row of cells per record (a map or struct), one column per key, in key… row/2One row of cells from a list of values, left to right. rows/2Cells from rows of values. run/2Carries out a plan and gives back the workbook. shift/3Moves every cell by rows down and cols right; see Sheetshow.Cell.shift/3 . stack/1,2Stacks groups of cells, each starting on the row after the previous group's… to_rows/1Values back from cells, as rows relative to their bounding range; gaps are…
Cells and layout Sheetshow.A1 col_to_letters/10-indexed column to letters. letters_to_col/1Letters to 0-indexed column. parse_ref/1Parses one endpoint of a reference into {col, row}, 0-indexed, where a… quote_sheet/1Quotes a sheet name when A1 notation needs it. ref_like?/1Whether a bare string reads as a cell or range reference rather than a sheet… split_sheet/1Splits an A1 string into {sheet, rest}.
Sheetshow.Cell new/3Builds a cell at a Sheetshow.Coord or an A1 reference (raising if the reference… put_sheet/2Puts the cell on a sheet. put_style/2Merges a style into the cell's, the new keys winning. shift/3Moves the cell by rows down and cols right; see Sheetshow.Coord.shift/3 . valid?/1Whether the term is a valid cell. validate/1Checks the coordinate, value and style.
Sheetshow.Coord compare/2Row-major order within a sheet; sheets order by name, nil first. from_a1/1Parses a single-cell A1 reference. + ! new/3Builds a coordinate. shift/3Moves a coordinate by rows down and cols right. to_a1/1Prints as A1, with the sheet when there is one.
Sheetshow.Range bounded?/1Whether both ends are known. bounding/1The smallest range holding every coordinate or cell given. contains?/2Whether the coordinate lies inside the range. from_a1/1Parses an A1 range. + ! new/3A bounded range from Elixir ranges of rows and columns. to_a1/1Prints as A1.
Sheetshow.Style hex_to_rgb/1A "#RRGGBB" colour as {red, green, blue} in 0..255. keys/0Every key a style may have. rgb_to_hex/1{red, green, blue} in 0..255 as "#RRGGBB".valid?/1Whether the term is a valid style. validate/1Checks every key and value.
Sheetshow.Value default_number_format/1The number format that makes a temporal value readable in Sheets… from_serial/2A serial number back to a Date , NaiveDateTime or Time , rounded to the… kind/1The kind of a valid value. to_serial/1A temporal value as a Sheets serial number. valid?/1Whether the term is a cell value. validate/1Checks a value.
Plans Sheetshow.Op modules/0Every op struct, for guards and tests. op?/1Whether the term is one of the ops. sheet/1The sheet an op works on.
Sheetshow.Op.AppendRows height/1How many rows the op adds. new/2Builds the op from cells.
Sheetshow.Op.DeleteRows count/1How many rows the op removes. new/2Builds the op.
Sheetshow.Op.PutCells col/1The column the run starts at. new/2Builds the op from cells, sorted left to right. range/1The rectangle the op writes, which a backend turns into a grid range. row/1The row the run sits on.
Sheetshow.Op.SetDimensions A database on a tab Sheetshow.Log columns/1The tab's columns, left to right. create/1The plan that makes the tab and writes its header. decode/3Events from the tab's values: rows of cell values, as… + ! fold/1The log as it stands: the latest event for each id, in the order the ids first… header/2The header as cells, bold unless you say otherwise. new/2A log on a tab, with the columns its rows have. plan/2The plan that appends events, as one Sheetshow.Op.AppendRows , so a batch… + ! read/3Every event on the tab, in the order it was written. + ! view/2Cells for a second tab that shows the log as it stands, for a person to look at:…
Sheetshow.Log.Event delete/1The tombstone that takes a row out of the fold. errors?/1Whether a read left anything flagged on this event. new/2An event holding a record, with an id of its own unless you pass one. put/2Merges changes into the record, keeping the id: the update you append next.
Sheetshow.Schema cast/2The values of one row, in schema order, as a record, with an error beside each… cast_boolean/1Reads a cell the way a :boolean column does, which is also how a log… columns/1The column names, in order, as they read in a header row. encode/2A record as the cell values of one row, in schema order. types/0Every type a column can have. validate/1Checks a schema: at least one column, names that are atoms and appear once…
Sheetshow.Table columns/1The columns a new tab is given, left to right. compact/1The plan that takes every soft-deleted row off the tab for good, bottom-up and… create/1The plan that makes the tab and writes its header. decode/3A snapshot from the tab's values: rows of cell values, as… + ! delete/2Takes a row out. empty/1The snapshot of a tab that has just been made: the header create/1 writes, and… fetch/2The live row with this id, if the snapshot has one. header/2The header as cells, bold unless you say otherwise. insert/2A row to add, with an id of its own unless you pass one. live/1The rows a reader would call the table's contents: the ones not tombstoned. new/2A table on a tab, with the columns its rows have. plan/2The plan that carries out these changes against the tab as this snapshot… + ! read/3The tab as it stands, as a snapshot. + ! refresh/2The same snapshot, with the rows found where they are now: one request for the… restore/1Puts a soft-deleted row back: empties its deleted flag. update/2A change to the columns it names on the row with this id, leaving every other…
Sheetshow.Table.Row errors?/1Whether anything on this row would not read.
Sheetshow.ULID generate/1A new identifier, timed by the system clock in microseconds unless you say… timestamp/1The moment an identifier was made. valid?/1Whether the string is one of ours: 26 canonical characters, and a first one low…
Backends Sheetshow.Backend capabilities/1What the workbook's backend promises. ensure/2:ok when the backend promises the capability, and an error naming it when it…known/0Every capability a backend answers for. supports?/2Whether the workbook's backend promises one thing.
Sheetshow.Backend: callbacks authenticate/1Trades credentials for a token. capabilities/1What this backend promises for this workbook. connect/1Makes the workbook ready to use, and learns its sheets. fetch_sheets/1Asks the spreadsheet which sheets it has. read_cells/2The cells in a range. read_rows/2The values in a range, as rows. read_rows_batch/2The values in several ranges, in the order they were asked for. run/2Carries out a plan.
Sheetshow.Client new/2Builds a client for one spreadsheet. ready?/2Whether the client holds a token that is still good.
Sheetshow.Google decode/1Cells from a spreadsheets.get answer. decode_values/1Rows of values from a spreadsheets.values.get answer. default_scopes/0The scopes Sheetshow asks Google for when you name none, whichever kind… encode/2A plan as a spreadsheets.batchUpdate body, given the sheet ids the… + ! sheet_id/2The id a new sheet will claim, given the ids already in use.
Sheetshow.Memory new/1An empty spreadsheet, or one with the sheets named already there. read/2The cells inside a range, in reading order. + ! run/2Carries out an op or a plan, in order, and gives back the spreadsheet it… + ! titles/1The sheet titles, sorted.
Sheetshow.Store conditional_write?/1Whether this store can refuse a write whose precondition no longer… exists?/1Whether the file is there. local/1A file on the machine this is running on. nextcloud/4A file in a Nextcloud account, by the path you would see in the web interface. read/1The bytes, and the version they were at. webdav/2A file on a WebDAV server: Nextcloud, ownCloud, or anything else that speaks it. write/3Writes the bytes, if the precondition still holds.
Sheetshow.Store: callbacks conditional_write?/1Whether this store can refuse a write whose precondition no longer… exists?/1Whether the file is there at all. read/1The bytes, and the version they were at. write/3Writes the bytes, giving back the version they are now at.
Sheetshow.Workbook google/2A workbook over one Google spreadsheet. memory/1A workbook over a Sheetshow.Memory : the spreadsheet that needs no network. titles/1The sheet titles the workbook knows about, sorted. xlsx/2A workbook over an .xlsx file.
Sheetshow.Xlsx decode/1Opens a package and reads every sheet, in one call. + ! memory/1Every sheet, as a Sheetshow.Memory : the whole workbook in the shape the rest… open/1Opens a package: its parts, its sheets, its shared strings and its styles. titles/1The sheet titles, sorted, as every titles/1 in Sheetshow answers.
Credentials Sheetshow.OAuth authorize/3Trades the code for a refresh token, and gives back the same account… + ! challenge/1The challenge that goes in the consent URL: the verifier's SHA-256, which is… code/2The code out of the address the browser landed on, having checked that the state… consent_url/2The URL to send somebody to. exchange_request/3The exchange request as data, where to post and what to post, for… state/0Something random to send as state and compare when it comes back, so an answer… verifier/0A PKCE code verifier: 86 characters of randomness to keep until authorize/3.
Sheetshow.ServiceAccount assertion/2The signed JWT that asks for an access token. from_file/1Reads a service-account key file. + ! from_json/1Reads the JSON of a service-account key file. + ! token_request/2The token request as data, where to post and what to post, for whichever…
Sheetshow.Token authorization/1The Authorization header's value. expired?/2Whether the token has run out. from_response/2A token from what the token endpoint answered, with expires_in… + ! new/3Builds a token.
Sheetshow.UserAccount authorized?/1Whether this account can get a token on its own, that is, whether somebody… from_file/1Reads an authorized_user credential file. + ! from_json/1Reads the JSON of an authorized_user credential. + ! new/3An account from the client id and secret of an app you registered in the Google… to_json/1The account as authorized_user JSON, to write somewhere only you can read. token_request/1The token request as data, where to post and what to post, for whichever…
Errors Sheetshow.CellError new/2Builds one from what Google calls it.