Board index » delphi » Writing Excel files without OLE

Writing Excel files without OLE


2005-04-14 05:16:50 AM
delphi101
Hello,
I'm looking for a component that will allow me to open an existing Excel
file in Delphi 6 and programatically add some cell values and formulas without
using OLE automation. I have looked at a couple of products that can create
Excel files directly (SMExport from www.scalabium.com and NativeExcel from
www.nika-soft.com) but neither one does what I want. NativeExcel can create
new files but doesn't seem to be capable of opening existing ones. I could
use OLE if absolutely necessary but would prefer not to for various reasons
including slow performance and a tendency to leave multiple instances of
Excel running in the background. Any suggestions are welcome.
Glenn
 
 

Re:Writing Excel files without OLE

You might have a look at FlexCel,
www.tmssoftware.com/flexcel.htm
that can do exactly that and more.
--
Kind regards,
Bruno Fierens
TMS software
Productivity components for Windows, Linux, IntraWeb, .NET development
www.tmssoftware.com
 

Re:Writing Excel files without OLE

Quote
I'm looking for a component that will allow me to open an existing Excel
file in Delphi 6 and programatically add some cell values and formulas without
using OLE automation.
I've used XLSReadWrite (www.axolot.com/components/xlsrwii20.htm) for
over 2 years and am very happy with it. Pure Delphi code, reads and writes
Excel files natively without the need for Excel to be installed or OLE.
Updates are not very frequent (there are no serious bugs that I am aware
of), but each time an update came out, my only comment was "Wow !!!"
Olivier
 

Re:Writing Excel files without OLE

Yes, I did try that component and forgot to mention it in my post. It has
got to be the worst-documented piece of software I have ever seen. The help
file consists of mostly blank entries, like it was generated by some
automatic tool. They just never bothered to actually explain how it works.
How did you ever manage to learn to use this thing? I complained about the
help to the vendor a few days but haven't gotten a reply.
Glenn
Quote

I've used XLSReadWrite (www.axolot.com/components/xlsrwii20.htm)
for
over 2 years and am very happy with it. Pure Delphi code, reads and writes
Excel files natively without the need for Excel to be installed or OLE.

Updates are not very frequent (there are no serious bugs that I am aware
of), but each time an update came out, my only comment was "Wow !!!"

Olivier


 

Re:Writing Excel files without OLE

I've been using devexpress spreadsheet component for a while now without
problems ...... apart from it is inability to view/insert 'embeded' graphics
within an xls file. (clients still like to see their logos)
I've ordered TMS flexcel, as the demo viewer can open xls files and show
the images ..... I am just hoping it is fairly straight forward to insert an
image
cheers
 

Re:Writing Excel files without OLE

Quote
got to be the worst-documented piece of software I have ever seen. The help
file consists of mostly blank entries, like it was generated by some
automatic tool. They just never bothered to actually explain how it works.
How did you ever manage to learn to use this thing? I complained about the
help to the vendor a few days but haven't gotten a reply.
Yes, the documentation is not very good (although it ships with tons of
sample projects that are quite instructive). Email replies are not immediate
either. This made me think in the past that this was a product that was
going to be abandoned soon. But everytime they surprised me with a new
version that just amazed me.
As far as I know, it is really unique. Other products mentioned here (the
one from TMS and the one from DevExpress) are GUI components to mimick the
Excel interface. Having happily used other products from these 2 vendors, I
am sure that these 2 products are fine products if you want to create an
Excel GUI clone. But if you want a small code-based library to create, open
and modify Excel files, then XLSReadWrite is really unique and worth
struggling with.
FWIW, my use of Excel is as a traditional spreadsheet. My needs are to
create, open and modify spreadsheets containing text, numbers, formats, and
functions. for that it works fine.
I do not need placement of pictures, or the embedding of OLE objects. These
may be possible, but I have never tried them.
As I said earlier, make sure you look at the sample projects. And if you
have any questions, feel free to contact me (put something related to
XLSReadWrite in the email subject in case it gets caught by the spam
filter).
Olivier
 

Re:Writing Excel files without OLE

Olivier Beltrami writes:
Quote
Other products mentioned here (the
one from TMS and the one from DevExpress) are GUI components to mimick the
Excel interface.
Not true with FlexCel. FlexCel does have a viewer but that is a side tool you may or may not need
to use. I use FlexCel and then display/print in ExpressSpreadSheet/ExpressPrintingSystem.
With FlexCel you create an xls file in Excel just that way you want, adding tags recognizable by
FlexCel of where you want data to appear. You use all the power of Excel to format the page just
the way you want. Only you need Excel, your users will not. In Delphi, you set the name of the xls
file in a property, attach a dataset, and execute. You can create repeating reports where the
entire xls report is repeated for every record or create repeating sections like the details of an
invoice in a master/detail style relationship. Simple to use.
--
-john
 

Re:Writing Excel files without OLE

We use Axolot and agree with your comment on the documentation.
However, my emails and questions are answered almost overnight.
We have found Lars very helpful and the component works well for what we
need to do. So, we will keep using XLSRWII20.
- Eduardo
It took me seven{*word*249} years to get 3,000 hits in baseball.
I did it in one afternoon on the golf course.
-- Hank Aaron
Eminent Domain Software
"Custom Software Development For Your Domain"
Makers of EDSSpell, EDSPrint, EDSZipCodes and
XSpell, the IDE Expert.
Glenn Alcott writes:
Quote
Yes, I did try that component and forgot to mention it in my post. It has
got to be the worst-documented piece of software I have ever seen. The help
file consists of mostly blank entries, like it was generated by some
automatic tool. They just never bothered to actually explain how it works.
How did you ever manage to learn to use this thing? I complained about the
help to the vendor a few days but haven't gotten a reply.

>I've used XLSReadWrite (www.axolot.com/components/xlsrwii20.htm)

 

Re:Writing Excel files without OLE

Quote
As far as I know, it is really unique. Other products mentioned here (the
one from TMS and the one from DevExpress) are GUI components to mimick the
Excel interface. Having happily used other products from these 2 vendors,
I am sure that these 2 products are fine products if you want to create an
Excel GUI clone. But if you want a small code-based library to create,
open and modify Excel files, then XLSReadWrite is really unique and worth
struggling with.

FWIW, my use of Excel is as a traditional spreadsheet. My needs are to
create, open and modify spreadsheets containing text, numbers, formats,
and functions. for that it works fine.

I do not need placement of pictures, or the embedding of OLE objects.
These may be possible, but I have never tried them.

As I said earlier, make sure you look at the sample projects. And if you
have any questions, feel free to contact me (put something related to
XLSReadWrite in the email subject in case it gets caught by the spam
filter).

Olivier
One thing I have not found in TMS's or Scalabium's offering is the ability to
have differently formatted sheets in a final product. With either one, I've
had to make multiple worksheets and have the users merge them. I was told
that the .Net offering of Flexcel included this, but I am still developing
VCL programs. The .Net world is still a few years off for me. Does
XLSReadWrite allow you to have multiple sheets that are not clones of each
other, or are you restricted to outputting one layout per workbook as well?
 

Re:Writing Excel files without OLE

Quote
One thing I have not found in TMS's or Scalabium's offering is the ability
to have differently formatted sheets in a final product. With either one,
I've had to make multiple worksheets and have the users merge them. I was
told that the .Net offering of Flexcel included this, but I am still
developing VCL programs. The .Net world is still a few years off for me.
Does XLSReadWrite allow you to have multiple sheets that are not clones of
each other, or are you restricted to outputting one layout per workbook as
well?
Reading the posts from other people about FlexCel I realize that they use it
to open an XLS file, replace some pre-set tags, and save the file.
XLSReadWrite can certainly do this.
However, XLSReadWrite can create a workbook sheet from scratch, so you can
(in code) add as many new sheets as you want to a workbook, and specify the
formatting of each new sheet/cell as you see fit, in your Delphi code. I'll
send you some sample workbooks automatically generated from within my
software.
Olivier
 

Re:Writing Excel files without OLE

We use XLSReadWriteII (1.5) too and I very satisfied with abilities and
performance.
--
Sincerely,
Alex Zencovich
-----------------------------------
Head of PivotWare Lab - OLAP solution for Delphi, C++ Builder and ActiveX
environment
"Olivier Beltrami" <olivier(some@junk)ae-soft(someother.junk)net>wrote in
message news:XXXX@XXXXX.COM...
Quote
>One thing I have not found in TMS's or Scalabium's offering is the ability
>to have differently formatted sheets in a final product. With either
>one, I have had to make multiple worksheets and have the users merge them.
>I was told that the .Net offering of Flexcel included this, but I am
>still developing VCL programs. The .Net world is still a few years off
>for me. Does XLSReadWrite allow you to have multiple sheets that are not
>clones of each other, or are you restricted to outputting one layout per
>workbook as well?

Reading the posts from other people about FlexCel I realize that they use
it to open an XLS file, replace some pre-set tags, and save the file.
XLSReadWrite can certainly do this.

However, XLSReadWrite can create a workbook sheet from scratch, so you can
(in code) add as many new sheets as you want to a workbook, and specify
the formatting of each new sheet/cell as you see fit, in your Delphi code.
I'll send you some sample workbooks automatically generated from within my
software.

Olivier

 

Re:Writing Excel files without OLE

Thanks, the example Holidays by Date shows that multiple formats can be
created. I have a dataset generated daily that has a single location that
differs from the others, and have been running 2 programs to get the
spreadsheets. I will be looking into trying XLSReadWrite as a possible
replacement.
Quote
Reading the posts from other people about FlexCel I realize that they use
it to open an XLS file, replace some pre-set tags, and save the file.
XLSReadWrite can certainly do this.

However, XLSReadWrite can create a workbook sheet from scratch, so you can
(in code) add as many new sheets as you want to a workbook, and specify
the formatting of each new sheet/cell as you see fit, in your Delphi code.
I'll send you some sample workbooks automatically generated from within my
software.
Flexcel uses a template file, but the VCL version allows only one template
sheet for all output sheets. The author, working with TMS, said that
multiple format output is included in the .Net, and it is being attempted to
add it into the VCL version.
SMExport creates on the fly as well, but I had problems with formatting,
which I think has been updated, though I had already gone to Flexcel to get
the project done.
Both have been good in doing the job, and support has been great for both.
Still, it would be great to have a program that removes the user requirement
to merge spreadsheet files.
Thanks again for the examples.
Charles Collins
 

Re:Writing Excel files without OLE

Poorly documented components are a pet peeve of mine, and I have seen plenty
of them. But this is beyond poor to almost nonexistent, and they charge an
outrageous $199 for the product. You would think that in the 6 or 7 years
this product has been around they would have had time to write some decent
help. It would probably benefit the developer also because then he wouldn't
have to waste time answering support emails about stuff that isn't
explained. Instead I have to spend hours of valuable time figuring out the
thing, and I really don't want to support a product that forces me to do
that. I'd rather just use OLE.
"Eduardo A. Salgado" <XXXX@XXXXX.COM>writes
Quote
We use Axolot and agree with your comment on the documentation.

However, my emails and questions are answered almost overnight.

We have found Lars very helpful and the component works well for what we
need to do. So, we will keep using XLSRWII20.

- Eduardo
It took me seven{*word*249} years to get 3,000 hits in baseball.
I did it in one afternoon on the golf course.
-- Hank Aaron

Eminent Domain Software
"Custom Software Development For Your Domain"

Makers of EDSSpell, EDSPrint, EDSZipCodes and
XSpell, the IDE Expert.


Glenn Alcott writes:
>Yes, I did try that component and forgot to mention it in my post. It
has
>got to be the worst-documented piece of software I have ever seen. The
help
>file consists of mostly blank entries, like it was generated by some
>automatic tool. They just never bothered to actually explain how it
works.
>How did you ever manage to learn to use this thing? I complained about
the
>help to the vendor a few days but haven't gotten a reply.
>
>>I've used XLSReadWrite (www.axolot.com/components/xlsrwii20.htm)
>
 

Re:Writing Excel files without OLE

I use TMS flexcel to read write natively excelfiles. Works great!
Greetings,
Hans-Peter
 

Re:Writing Excel files without OLE

Hans-Peter,
Do you edit a spreadsheet in a visual grid, or through code.?
I've looked at the xlsViewer demo ... it doesn't seem to like
updating cell with formulas when the formula target sells are altered....
but I suppose it must ... I will look harder
cheers
"Hans-Peter Suter" <XXXX@XXXXX.COM>writes
Quote
I use TMS flexcel to read write natively excelfiles. Works great!

Greetings,
Hans-Peter