Re: Creating an Excel spreadsheet file directly from Delphi...



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

.



Relevant Pages

  • Re: Using Access Reports
    ... output the "table" data from Access to an Excel ... I'm not sure that sending me a copy of a Word document is going to be ... table in an Access report is NOT a table of data. ... in almost any other document format other than Access, ...
    (microsoft.public.access.reports)
  • Re: Merge Excel/Word 2007, getting 12:00AM in merge which is NOT i
    ... Ok, I tried changing the format of the column as you describe, that didn't ... suggestion from that page on your Excel sheet (or one of the following ... I am merging data from excel into a word document. ...
    (microsoft.public.word.mailmerge.fields)
  • LINK field in Word - Pasting from Excel
    ... I have some cells in Excel that I wanted to paste into a Word document. ... Copy cell in Excel ... adding \f 4 to format as per the Word document ...
    (microsoft.public.word.docmanagement)
  • Re: Excel format changes as I merge into Word document How can I stop
    ... In the Mail Merge, after you select your Excel file as a data source, ... From that list, choose 'MS Excel Worksheets via DDE ', and your ... fields in the Word document. ... to format the number with two decimal places. ...
    (microsoft.public.excel.misc)
  • Re: Issue with mail merge date field
    ... When I open a Word document and manually perform the mail merge, the date is merged correctly in the format "dd mmm yy". ... I have searched the XL Programming, Word MailMerge and Word programming NGs but unable to locate a solution. ...
    (microsoft.public.excel.programming)