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 col_set_size_pts(col,pts)
66 row_set_size_pts(row,pts)
67 col_set_size_pixels(col,pix)
68 row_set_size_pixels(row,pix)
69 col_size_fit_pixels(col,startrow,endrow,ignorestrings)
70 row_size_fit_pixels(row,startcol,endcol,ignorestrings)
75 props.display_formulas
78 props.display_column_header
79 props.display_row_header
80 props.display_outlines
81 props.display_outlines_below
82 props.display_outlines_right
84 props.protected_allow_edit_objects
85 props.protected_allow_edit_scenarios
86 props.protected_allow_cell_formatting
87 props.protected_allow_column_formatting
88 props.protected_allow_row_formatting
89 props.protected_allow_insert_columns
90 props.protected_allow_insert_rows
91 props.protected_allow_insert_hyperlinks
92 props.protected_allow_delete_columns
93 props.protected_allow_delete_rows
94 props.protected_allow_select_locked_cells
95 props.protected_allow_sort_ranges
96 props.protected_allow_edit_auto_filters
97 props.protected_allow_edit_pivottable
98 props.protected_allow_select_unlocked_cells
107 GnmCell: [Boxed structure] [2]
115 ColRowInfo: [Boxed structure]
119 GnmSheetSize: [Simple structure]
124 GnmValue: [Boxed union]
147 GnmRange: [Simple structure]
148 init(col,row,col,row)
149 init_full_sheet(sheet)
150 init_cols(sheet,start,end)
151 init_rows(sheet,start,end)
152 init_cellpos(sheet,cellpos)
161 GnmCellPos: [Simple structure]
166 GnmSheetVisibility: [Enum]
186 IGNORE_COMMENTS_AT_ORIGIN
197 GnmStyle: [Boxed structure]
205 set_font_name(string)
209 set_font_italic(bool)
211 set_font_uline(uline)
213 set_font_strike(bool)
215 set_font_script(script)
220 set_format_text(fmtstring)
234 set_shrink_to_fit(bool)
236 set_contents_locked(bool)
237 get_contents_locked()
238 set_contents_hidden(bool)
239 get_contents_hidden()
240 get_effective_text_wrap()
244 GOFormat: [Boxed structure]
270 GOIOContext: [GObject]
274 GnmCmdContextStderr: [GObject]
278 GOFileSaver: [GObject]
280 for_file_name(filename_or_uri)
281 for_mime_type(mimetype)
288 props.interactive_only
293 GOFileOpener: [GObject]
298 props.interactive_only
301 GOFileFormatLevel: [Enum]
311 Gnm (i.e., not in a class):
312 clipboard_copy_range(sheet,range)
316 GOffice (i.e., not in a class):
317 filename_to_uri(filename)
324 [1] This function is not calling the obvious C function, but uses
325 introspection's rename-to feature to present a better API.
326 [2] Cells are owned by the sheet. GnmCell's boxed type uses no-op