DESCRIPTION
Viewworkbook lets you read spreadsheet-files in text-mode, in a terminal
window. It reproduces the tables which are contained in a spreadsheet file and
lets you navigate through the sheets. The visible part of a sheet is limited
laterally and horizontally by the terminal-size but can be scrolled. You can
adapt the width of table-columns, to render the table more readable and
finally, if you wish, save tables to a text-file. To the author of the
program, the utility serves to take a quick glance at spreadsheets that are
received via email, in the Mutt mail-client, which is itself a terminal
application.
The supported spreadsheet formats are those which are handled by the Ruby-gem
"roo" (February 2017):
- Microsoft™'s xls and xlsx,
- the OpenDocument spreadsheet ods
- and the SoftMaker™ spreadsheet formats pmd and pmdx.
Options
Other than the path to the spreadsheet file, viewworkbook does currently not
interpret any command line arguments.
Menu commands
A list of commands and their associated hotkeys (in parenthesis) is shown
below the current table:
11 |
12.2 |
July |
34000 |
5% |
prior |
1957 |
true |
12 |
2.33 |
July |
1234 |
12.2% |
prior |
1966 |
true |
13 |
50.0 |
August |
334566 |
12% |
in |
1966 |
false |
|
A |
B |
C |
D |
E |
F |
G |
value (v) * save to file (f) * sheet (s) * column (c) * up(i) * down(k) * left(j) * right(l) * quit (q) *
When you enter one of the hotkeys, a command can be executed directly (like "q"
to terminate the program), a sub-menu may be shown (like with "c" which shall
give you control on column properties) or you are confronted with an input
invitation (like with "v", where you have to enter a cell-reference). Read on
for an explanation of each menu command.
- value (v)
- display the value from a cell. This is useful, when columns are not wide
enough to show complete values. After entering "v", you are
immediately invited to enter a cell reference. Cells are referenced in
the format "Column:Row", e.g. D:12 for the cell in column "D" and row
"12".
- save to file (f)
- Save the current or all tables to a text file. The command does initially
show two alternative sub-commands:
- Current sheet (c) * all sheets (a)
- Independently of your choice, in the next step you will have to enter the
path to the output file. You will be warned, if the file already exists
and may choose to either overwrite the existing file or name a different
one.
- sheet (s)
- Navigate to a different sheet in the current workbook. You may choose
between a sheet-number and the name of a sheet. If you want to indicate
the next sheet by name, the list of all available names is first
shown. You just type right away the one that you want.
- column (c)
- Alter the properties of the table-columns. At the time of this writing
(February 2017) the only property that can be changed, is the width of all
columns. When you enter "c" the subcommand column width (w) is shown.
After entering "w" you can enter the desired width in characters.
- Arrows(i, j, k, l)
- Navigate in a sheet that is too big to be displayed entirely at once.
These hotkeys correspond to the default navigation keys in the vi editor.
- quit (q)
- Enter "q" to quit the program at any moment except when an input
invitation is shown.
Hidden (menu-)commands
There is currently only one such command available:
The Escape-key will interrupt an unfinished action and refresh the display.