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
20 * Column/Row size manipulation
22 -----------------------------------------------------------------------------
23 Note: the Python version of type names excludes the Gnm prefix.
25 Workbook: [GObject, derived from GODoc]
26 new_with_sheets(count)
31 cells(qcomments,visibility)
41 WorkbookView: [GObject]
42 new_from_uri(uri,opener,iocontext,encoding)
44 save_as(uri,saver,cmdctx)
47 props.preferred_height
52 cell_set_value(col,row,value) [1]
53 cell_set_text(col,row,string) [1]
54 cell_get_value(col,row)
59 is_cell_empty(col,row)
60 apply_style(range,style) [1]
66 props.display_formulas
69 props.display_column_header
70 props.display_row_header
71 props.display_outlines
72 props.display_outlines_below
73 props.display_outlines_right
75 props.protected_allow_edit_objects
76 props.protected_allow_edit_scenarios
77 props.protected_allow_cell_formatting
78 props.protected_allow_column_formatting
79 props.protected_allow_row_formatting
80 props.protected_allow_insert_columns
81 props.protected_allow_insert_rows
82 props.protected_allow_insert_hyperlinks
83 props.protected_allow_delete_columns
84 props.protected_allow_delete_rows
85 props.protected_allow_select_locked_cells
86 props.protected_allow_sort_ranges
87 props.protected_allow_edit_auto_filters
88 props.protected_allow_edit_pivottable
89 props.protected_allow_select_unlocked_cells
98 GnmCell: [Boxed structure] [2]
106 GnmSheetSize: [Simple structure]
111 GnmValue: [Boxed union]
134 GnmRange: [Simple structure]
135 init(col,row,col,row)
136 init_full_sheet(sheet)
137 init_cols(sheet,start,end)
138 init_rows(sheet,start,end)
139 init_cellpos(sheet,cellpos)
145 GnmCellPos: [Simple structure]
150 GnmSheetVisibility: [Enum]
170 IGNORE_COMMENTS_AT_ORIGIN
180 GnmStyle: [Boxed structure]
188 set_font_name(string)
192 set_font_italic(bool)
194 set_font_uline(uline)
196 set_font_strike(bool)
198 set_font_script(script)
203 set_format_text(fmtstring)
217 set_shrink_to_fit(bool)
219 set_contents_locked(bool)
220 get_contents_locked()
221 set_contents_hidden(bool)
222 get_contents_hidden()
223 get_effective_text_wrap()
227 GOFormat: [Boxed structure]
253 GOIOContext: [GObject]
257 GnmCmdContextStderr: [GObject]
261 GOFileSaver: [GObject]
263 for_file_name(filename_or_uri)
264 for_mime_type(mimetype)
271 props.interactive_only
276 GOFileOpener: [GObject]
281 props.interactive_only
284 GOFileFormatLevel: [Enum]
294 Gnm (i.e., not in a class):
295 clipboard_copy_range(sheet,range)
299 GOffice (i.e., not in a class):
300 filename_to_uri(filename)
307 [1] This function is not calling the obvious C function, but uses
308 introspection's rename-to feature to present a better API.
309 [2] Cells are owned by the sheet. GnmCell's boxed type uses no-op