1 Today is 20180412. If that seems a long time ago, this document might
4 test/t3001-introspection-simple.py shows a sample of using introspection
5 to work with a spreadsheet. Note: you must either "make install" first
6 or else run it the corresponding *.pl file.
8 The following is a list of types and the API that is expected to both
9 be useful in this setting and actually work.
11 This is incomplete. In particular, I'll have to look at
12 * Expressions other than via text
14 * Installing a gi override module for more pythony structure handling
16 -----------------------------------------------------------------------------
17 Note: the Python version of type names excludes the Gnm prefix.
19 Workbook: [GObject, derived from GODoc]
20 new_with_sheets(count)
25 cells(qcomments,visibility)
37 cell_set_value(col,row,value) [1]
38 cell_set_text(col,row,string) [1]
39 cell_get_value(col,row)
44 is_cell_empty(col,row)
45 apply_style(range,style) [1]
51 props.display_formulas
54 props.display_column_header
55 props.display_row_header
56 props.display_outlines
57 props.display_outlines_below
58 props.display_outlines_right
60 props.protected_allow_edit_objects
61 props.protected_allow_edit_scenarios
62 props.protected_allow_cell_formatting
63 props.protected_allow_column_formatting
64 props.protected_allow_row_formatting
65 props.protected_allow_insert_columns
66 props.protected_allow_insert_rows
67 props.protected_allow_insert_hyperlinks
68 props.protected_allow_delete_columns
69 props.protected_allow_delete_rows
70 props.protected_allow_select_locked_cells
71 props.protected_allow_sort_ranges
72 props.protected_allow_edit_auto_filters
73 props.protected_allow_edit_pivottable
74 props.protected_allow_select_unlocked_cells
83 GnmCell: [Boxed structure] [2]
91 GnmSheetSize: [Simple structure]
96 GnmValue: [Boxed union]
119 GnmRange: [Simple structure]
120 init(col,row,col,row)
121 init_full_sheet(sheet)
122 init_cols(sheet,start,end)
123 init_rows(sheet,start,end)
124 init_cellpos(sheet,cellpos)
130 GnmCellPos: [Simple structure]
135 GnmSheetVisibility: [Enum]
155 IGNORE_COMMENTS_AT_ORIGIN
165 GnmStyle: [Boxed structure]
173 set_font_name(string)
177 set_font_italic(bool)
179 set_font_uline(uline)
181 set_font_strike(bool)
183 set_font_script(script)
188 set_format_text(fmtstring)
202 set_shrink_to_fit(bool)
204 set_contents_locked(bool)
205 get_contents_locked()
206 set_contents_hidden(bool)
207 get_contents_hidden()
208 get_effective_text_wrap()
212 GOFormat: [Boxed structure]
239 Gnm (i.e., not in a class):
240 clipboard_copy_range(sheet,range)
246 [1] This function is not calling the obvious C function, but uses
247 introspection's rename-to feature to present a better API.
248 [2] Cells are owned by the sheet. GnmCell's boxed type uses no-op