On Thu, Nov 13, 2008 at 5:21 PM, Steve Holden <[EMAIL PROTECTED]> wrote:
>
> m h wrote:
>> On Thu, Nov 13, 2008 at 4:54 PM, Tim Chase
>> <[EMAIL PROTECTED]> wrote:
>>
>>>> I am trying to detemine if there is a way to read the data from an
>>>> Excel xls file into django. I also need to create an xls file. Does
>>>> anyone know how that would be done ?
>>>>
>>> In addition to the other suggestions on the list, Excel (at least
>>> '03, if not other versions) has a "save as XML" format that's
>>> fairly easy to mangle into your own machinations.  We use that
>>> for our internal application so our account-managers have
>>> something they can twiddle in a format they're more accustomed
>>> to.  The basic XML format is pretty easy to reverse engineer
>>> (just create a skeleton document with the content you want and
>>> take a look how things like workbooks, formatting, etc are done),
>>> and works wonderfully with Django's templating language.  The big
>>> draws for us over CSV:
>>>
>>>   - the ability to specify data-type (particularly to preserve
>>> leading zeroes)
>>>
>>>   - the ability to specify formatting (both "this should be
>>> formatted like a phone-number" and "this should be red 18-point
>>> comic-sans" sorts of formatting)
>>>
>>>   - the ability to define multiple tabs (workbooks/worksheets,
>>> whatever you want to call them)
>>>
>>>   - the ability to enter formula values
>>>
>>> Most of our work was pretty basic, but the file-format was
>>> sufficiently easy for our needs that it was a no-brainer.
>>> Additionally, it didn't require Django to be running on a Win32
>>> box with Excel installed (which we don't have installed on our
>>> Win32 servers, let alone our Linux servers hosting Django).
>>>
>>
>> Not trying to start a flame war, but pyexcelerator/xlwt support these
>> as well...
> I think Tim's point is that with XML you can use Excel visually to
> create the spreadsheet you want, then use Django's existing template
> mechanism to tailor the output as required. It struck me as a very neat
> solution to the problem posed.

Good point, I didn't catch it on my way through ;)  Though I've heard
of people doing similar XML manipulation after someone (good with
design) does layout in OpenOffice, and then exporting to (ms) office.

Is the 2K3 xml format supported by other versions of Office?

cheers
-matt

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to