Re: Creating an Excel spreadsheet file directly from Delphi...
- From: "Oliver Townshend" <oliveratcodelegaldotcomdotau>
- Date: Fri, 22 Feb 2008 15:14:52 +1100
And while I don't agree with the conclusions, I do agree with the body
of Joel's article: Coding a spreadsheet yourself by using the office
binary file reference is not a smart idea. It is like writing to a
database by directly modifying the file where data is stored instead of
using SQL. It is not because the file formats are bad, it is because
they are complex and they must be and you need an API to access them.
Yes, many years ago (1996?) I got a copy of the Word Binary Format and wrote a program to extract data from it. . But when Office 97 came out, it didn't quite work and I switch to OLE Automation, which is the API I suppose. We had to sign confidentialy clauses for the format, so it sat in a draw for a long time until I tossed it out. Interesting to see it is now avaialble. Since then I've always used Ole Automation or VBA Macros to achieve the results I want. Obvioulsy our paths diverged at this point and I ended up doing less Delphi than I would have liked as a result.
This means you can have a file with macros, a pivot table, some activex
components and even an embedded word document, open it with FlexCel,
insert some rows, change cells values, and save it back. And the macro,
the pivot table, the word document, everything will still be there,
even when FlexCel does not know how what to do with them.
Interesting point. Makes it a useful format to work with I suppose.
In many ways, FlexCel or openoffice will display an Excel 2003 file
much better than Excel 2007. And even so, people uses Excel 2007 and
that is fine, because we don't really need that 100% compatibility that
doesn't exist anyway. We always settle for imperfect solutions after
all.
I think that's because they totally rewrote the 16 bit display routines to work in a 32 and 64 bit environment. There was a very interesting analysis of the whole thing in an article I read, but I can't find it now. It highlights the problems involved in re-writing code, and probably explains why each version of Office looks almost exactly the same as the previous one, because change is painful.
Oliver Townshend
.
- Follow-Ups:
- Re: Creating an Excel spreadsheet file directly from Delphi...
- From: Oliver Townshend
- Re: Creating an Excel spreadsheet file directly from Delphi...
- References:
- Creating an Excel spreadsheet file directly from Delphi...
- From: Jean Dupond
- Re: Creating an Excel spreadsheet file directly from Delphi...
- From: Oliver Townshend
- Re: Creating an Excel spreadsheet file directly from Delphi...
- From: Oliver Townshend
- Creating an Excel spreadsheet file directly from Delphi...
- Prev by Date: Re: Monitor network
- Next by Date: Re: Creating an Excel spreadsheet file directly from Delphi...
- Previous by thread: Re: Creating an Excel spreadsheet file directly from Delphi...
- Next by thread: Re: Creating an Excel spreadsheet file directly from Delphi...
- Index(es):
Relevant Pages
|