1 Today is 20180412. If that seems a long time ago, this document might
4 Note: For tests you must either "make install" first or else run the
5 python script via the corresponding *.pl file.
7 test/t3001-introspection-simple.py shows a sample of using introspection
8 to work with a spreadsheet.
10 test/t3002-introspection-io.py shows a sample of using introspection
11 to load and save files.
14 The following is a list of types and the API that is expected to both
15 be useful in this setting and actually work.
17 This is incomplete. In particular, I'll have to look at
18 * Expressions other than via text
19 * Installing a gi override module for more pythony structure handling
21 -----------------------------------------------------------------------------
22 Note: the Python version of type names excludes the Gnm prefix.
24 Workbook: [GObject, derived from GODoc]
25 new_with_sheets(count)
30 cells(qcomments,visibility)
40 WorkbookView: [GObject]
41 new_from_uri(uri,opener,iocontext,encoding)
43 save_as(uri,saver,cmdctx)
46 props.preferred_height
51 cell_set_value(col,row,value) [1]
52 cell_set_text(col,row,string) [1]
53 cell_get_value(col,row)
58 is_cell_empty(col,row)
59 apply_style(range,style) [1]
65 props.display_formulas
68 props.display_column_header
69 props.display_row_header
70 props.display_outlines
71 props.display_outlines_below
72 props.display_outlines_right
74 props.protected_allow_edit_objects
75 props.protected_allow_edit_scenarios
76 props.protected_allow_cell_formatting
77 props.protected_allow_column_formatting
78 props.protected_allow_row_formatting
79 props.protected_allow_insert_columns
80 props.protected_allow_insert_rows
81 props.protected_allow_insert_hyperlinks
82 props.protected_allow_delete_columns
83 props.protected_allow_delete_rows
84 props.protected_allow_select_locked_cells
85 props.protected_allow_sort_ranges
86 props.protected_allow_edit_auto_filters
87 props.protected_allow_edit_pivottable
88 props.protected_allow_select_unlocked_cells
97 GnmCell: [Boxed structure] [2]
105 GnmSheetSize: [Simple structure]
110 GnmValue: [Boxed union]
133 GnmRange: [Simple structure]
134 init(col,row,col,row)
135 init_full_sheet(sheet)
136 init_cols(sheet,start,end)
137 init_rows(sheet,start,end)
138 init_cellpos(sheet,cellpos)
144 GnmCellPos: [Simple structure]
149 GnmSheetVisibility: [Enum]
169 IGNORE_COMMENTS_AT_ORIGIN
179 GnmStyle: [Boxed structure]
187 set_font_name(string)
191 set_font_italic(bool)
193 set_font_uline(uline)
195 set_font_strike(bool)
197 set_font_script(script)
202 set_format_text(fmtstring)
216 set_shrink_to_fit(bool)
218 set_contents_locked(bool)
219 get_contents_locked()
220 set_contents_hidden(bool)
221 get_contents_hidden()
222 get_effective_text_wrap()
226 GOFormat: [Boxed structure]
252 GOIOContext: [GObject]
256 GnmCmdContextStderr: [GObject]
260 GOFileSaver: [GObject]
262 for_file_name(filename_or_uri)
263 for_mime_type(mimetype)
270 props.interactive_only
275 GOFileOpener: [GObject]
280 props.interactive_only
283 GOFileFormatLevel: [Enum]
293 Gnm (i.e., not in a class):
294 clipboard_copy_range(sheet,range)
298 GOffice (i.e., not in a class):
299 filename_to_uri(filename)
306 [1] This function is not calling the obvious C function, but uses
307 introspection's rename-to feature to present a better API.
308 [2] Cells are owned by the sheet. GnmCell's boxed type uses no-op