This is definitely the direction I'd recommend for most use cases. The gnumeric xml is significantly simpler to generate than either .xls and should be quite simple to generate. You can then use ssconvert to generate any of the formats we can export. If a cmd line interface is undesireably you can try the new libspreadsheet library that is part of gnumeric-1.5.2. We make no promises on the api stability at this point (1.5.x is a development series) but that will allow you to create gnumeric data structures directly then use the xls exporter.
On Tue, Jun 21, 2005 at 11:42:32AM +0100, David J Craigon wrote: > If you want to create all singing, all dancing Excel spreadsheets, and > you are prepared to install gnumeric, I found that writing the .gnumeric > file format (it is XML) very easy, and you can then run that through > ssconvert to produce a genuine Excel spreadsheet. This gives you access > to most of the spreadsheet features. > > In my experience, Spreadsheet::WriteExcel sometimes produces Excel > spreadsheets that don't open in Excel quite right. I think this was > something to do with the fact that I was producing big spreadsheets. > > David > > Jon K Hellan wrote: > >libgsf is not sufficient for writing Excel files. libgsf handles the ole > >container format, but does not help you to generate the Excel (BIFF) > >records. > > > >I'm not sure what your requirements are. If there aren't formulas in > >your data, and you don't care about formatting, you could get away with > >simply writing comma separated (CSV) files, and naming them "foo.xls". > >This will fool Excel. If there are formulas and/or formatting, you could > >try the Perl module Spreadsheet::WriteExcel, or the Java POI library. > > > >You can also convert a CSV file to a "real" Excel file using the > >ssconvert program, which comes with gnumeric. If you get want full > >flexibility, and the Perl and Java modules aren't sufficient, you could > >even try to write your own program using the Gnumeric machinery. > > > >Hope this helps > > > >Jon Kåre > > > >On Mon, 2005-06-20 at 14:27 -0600, Kem Mason wrote: > > > >>I'm not certain this is the right forum, but I looked through the > >>mail.gnome.org archives for this mailing list and it looks close. > >> > >>The problem I'm having is this: > >> > >>I downloaded libgsf in order to write (fairly simple) Excel spreadsheet > >>files on linux. > >> > >>I'm having a hard time understanding the documentation at: > >>http://www.gnome.org/projects/libgsf/ > >> > >>What I'm wondering is this: > >> > >>Are there any really simple examples of how to write an excel > >>spreadsheet? If I had a basic outline for creating one that had data in > >>a cell or two, I don't think I'd have any problem moving forward from > >>there. Obviously looking at the source for gnumeric, or something else > >>that uses libgsf is a possibility (and maybe the route I need to take) -- > >>I'm just hoping there might be some reference I'm missing that would save > >>me a bunch of time -- not really excited about diving into code that's > >>not intended to be an example, although if this route doesn't pan out, > >>that's what I'll do I think. > >> > >>Any suggestions / pointers welcome. > >> > >>Thanks, > >>Kem > >> > >>_______________________________________________ > >>gnumeric-list mailing list > >>[email protected] > >>http://mail.gnome.org/mailman/listinfo/gnumeric-list > >> > >> > > > > > >_______________________________________________ > >gnumeric-list mailing list > >[email protected] > >http://mail.gnome.org/mailman/listinfo/gnumeric-list > > This message has been checked for viruses but the contents of an attachment > may still contain software viruses, which could damage your computer system: > you are advised to perform your own checks. Email communications with the > University of Nottingham may be monitored as permitted by UK legislation. > > _______________________________________________ > gnumeric-list mailing list > [email protected] > http://mail.gnome.org/mailman/listinfo/gnumeric-list > -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [EMAIL PROTECTED] | By definition all answers are replies. Unfortunately, | not all replies are answers. -- JMS 8a:b7:80:f3:7f:df:f5:f6:e0:c0:3a:e0:23:d4:22:13 _______________________________________________ gnumeric-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gnumeric-list
