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
196 GnmStyle: [Boxed structure]
204 set_font_name(string)
208 set_font_italic(bool)
210 set_font_uline(uline)
212 set_font_strike(bool)
214 set_font_script(script)
219 set_format_text(fmtstring)
233 set_shrink_to_fit(bool)
235 set_contents_locked(bool)
236 get_contents_locked()
237 set_contents_hidden(bool)
238 get_contents_hidden()
239 get_effective_text_wrap()
243 GOFormat: [Boxed structure]
269 GOIOContext: [GObject]
273 GnmCmdContextStderr: [GObject]
277 GOFileSaver: [GObject]
279 for_file_name(filename_or_uri)
280 for_mime_type(mimetype)
287 props.interactive_only
292 GOFileOpener: [GObject]
297 props.interactive_only
300 GOFileFormatLevel: [Enum]
310 Gnm (i.e., not in a class):
311 clipboard_copy_range(sheet,range)
315 GOffice (i.e., not in a class):
316 filename_to_uri(filename)
323 [1] This function is not calling the obvious C function, but uses
324 introspection's rename-to feature to present a better API.
325 [2] Cells are owned by the sheet. GnmCell's boxed type uses no-op