[Qgis-developer] Re: Excel Export from QGIS

Alister Hood alister.hood at synergine.com
Fri Dec 2 02:34:13 EST 2011


Hi Tim,

> -----Original Message-----
> From: Tim Sutton [mailto:lists at linfiniti.com]
> Sent: Friday, 2 December 2011 7:16 p.m.
> To: Alister Hood
> Cc: qgis-developer at lists.osgeo.org
> Subject: Re: [Qgis-developer] Re: Excel Export from QGIS
> 
> Hi Alister
> 
> On Fri, Dec 2, 2011 at 12:55 AM, Alister Hood
> <alister.hood at synergine.com> wrote:
> > Hi everybody,
> > Just a couple of thoughts:
> >
> > As others have mentioned, many people want to export to Excel mainly
> for
> > formatting and printing, perhaps with some added calculations.  The
> > ideal would be to improve formatting and printing in QGIS so that
> this
> > isn't necessary.
> > Spreadsheets aren't particularly great for it anyway, and doing it in
> > QGIS would mean that you wouldn't need to export and format again if
> the
> > data is updated.
> > I imagine this could eventually be quite a lot of work - perhaps it
> > would be a good idea for a Summer of Code project.  I guess it would
> > include work on:
> > - table formatting
> > - number formatting (also see #4426, although that is not about
> > specifying how data in an existing column is displayed).
> > - virtual columns (similar to the new expression based labelling).
> > - easy breaking of tables across multiple pages, page numbering etc.
> >
> > Some people also like to export data to Excel, modify it, and bring
> it
> > back into GIS.  Like someone said, this is a recipe for headaches, if
> > not disaster.  I think it would be great if we could identify any
> > further enhancements to the attribute table and the field calculator
> > which would help people not to do this.
> >
> 
> I recently used a python library called xlwt for a web project to
> generate spreadsheets. I think it should be fairly straightforward to
> create a python plugin that would allow you to do it. I'm not familiar
> with a C++ library for writing excel spreadsheets, but I guess there
> is one out there somewhere.

Sure, import/export of spreadsheet formats would definitely be nice.  It would be great if someone implemented it.  
And I'm not saying it would be a technical disaster; more of an organisational disaster.  After a user exports to excel and formats it all nicely for printing, they would need to export and format again every time they want to print, if the original data changes.  Hopefully they won't be doing much in Excel other than formatting to get the data ready for printing, or it could get quite painful.
If they're exporting to Excel to process the data and then import it back into QGIS, there will be all sorts of added complications e.g. because of separating the attribute data from the features, and because Excel won't respect and preserve the data type of each field.

I'm an engineer - I work with Word and Excel all day every day.  But often (or perhaps mostly) they are not really the right tools for the job, and we need to do all sorts of nasty hackery to get the job done.
Basically I'm just saying that in most of the cases where someone would go from QGIS to Excel, Excel is not the ideal tool for the job, and with some improvements QGIS definitely would be.

Alister


More information about the Qgis-developer mailing list