Re: gnumeric api



Hello Jean,
Great !!!
Many thanks for your answer.
Just one question : I not see the libspreadsheet in the source tree it
is a part of another project ?
Best regards
Guy
Le samedi 05 mars 2011 à 09:31 +0100, Jean Brefort a écrit :
Yes, it is possible. You need to use the libspreadsheet library.
Unfortunately, the code is not documented, so you'll have to look at the
source code. src/ss*.c in the gnumeric tree are samples of how to use
this.
Just I can give you a sample I used some times ago:

      /* initialization */
      gnm_init (FALSE);
      GOCmdContext *cc = cmd_context_stderr_new ();
      gnm_plugins_init (GO_CMD_CONTEXT (cc));
      ErrorInfo       *plugin_errs;
      go_plugin_db_activate_plugin_list (
              go_plugins_get_available_plugins (), &plugin_errs);
      if (plugin_errs) {
              /* FIXME: What do we want to do here? */
              error_info_free (plugin_errs);
              std::cerr << "could not activate plugins" << std::endl;
              g_object_unref (cc);
              gnm_pre_parse_shutdown ();
              gnm_shutdown ();
              return 0;
      }
      /* create a workbookwith two shets */
      Workbook *wb = workbook_new_with_sheets (2);
      /* retrieve the first sheet */
      Sheet *sheet = workbook_sheet_by_index (wb, 0);

Best regards,
Jean

Le vendredi 04 mars 2011 à 19:18 +0100, Guy Deleeuw a écrit :
Hello
It is possible to call gnumeric functions from an api in C or C++ ?
for create/open/save/convert sheets ?
If yes where can I find examples and witch library I need to link ?

Regards
Guy

_______________________________________________
gnumeric-list mailing list
gnumeric-list gnome org
http://mail.gnome.org/mailman/listinfo/gnumeric-list



Guy De Leeuw
IT Manager
EUROFER - European Confederation of Iron and Steel Industries
5, avenue Ariane
Building "Integrale" (3rd floor)
1200, Bruxelles
Belgium
Phone/Fax : +32 (2) 738 79 40
Mobile : + 32 (498) 93 65 00
E-Mail : G De_Leeuw eurofer be
www : http://www.eurofer.eu






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]