Board index » delphi » Excel andStyles

Excel andStyles

Hy together

Has anybody experiences with getting style-object from Excel. It seems that
the borders-constant are not the same as from the range-object. Also the
font-object works other than direct retreving from the cell. I worked the
whole day long on this styles and everytime i think "now its ok" the next
bug occurs!

pls help!
thanx
--
cu
Mario

 

Re:Excel andStyles


<Mario Rothacher:
 Has anybody experiences with getting style-object
from Excel. It seems that the borders-constant are
not the same as from the range-object. Also the
font-object works other than direct retreving from the cell.

Quote

I've just tried it out, and the whole Styles.Borders
property seems pretty buggy to me! (I'm using Excel 97,
SR1.) I can't get any but the diagonal lines to show
colours properly, and half the time I get diagonals
when I don't want them, etc.

It might be worth nipping over to
microsoft.public.excel.programming and enquiring
about this, I think.

Deborah Pate

Re:Excel andStyles


Deborah Pate <D...@djpate.freeserve.co.uk> schrieb im Beitrag
<7ufhok$s...@forums.borland.com>...

Quote
> I've just tried it out, and the whole Styles.Borders
> property seems pretty buggy to me! (I'm using Excel 97,
> SR1.) I can't get any but the diagonal lines to show
> colours properly, and half the time I get diagonals
> when I don't want them, etc.

Thanx for your confirmation! That's exactly the same as i get... After a
lot of experinces with VBA i guess i have the right values for the
borders-index in the style-Object:

xlEdgeLeft := 1;
xlEdgeRight := 2;
xlEdgeTop := 3;
xlEdgeBottom := 4;
xlDiagonalDown := 9;
xlDiagonalUp := 10;

This seems to work with Excel97 to get and set the Borders in a
Style-Object.

--
cu
Mario

Re:Excel andStyles


<<Mario Rothacher:
After a lot of experinces with VBA i guess i have the
right values for the borders-index in the style-Object:

Quote

Thanks for passing that on - and please let me know
if you ever get the colours to work!

Deborah Pate

Re:Excel andStyles


Deborah Pate <D...@djpate.freeserve.co.uk> schrieb im Beitrag
<7uioad$o...@forums.borland.com>...

Quote
> Thanks for passing that on - and please let me know
> if you ever get the colours to work!

Hi Deborah

I've no problems with the colour when i use my xl-Constant as described in
the posting before. It works on both directions: Delphi->Excel->Delphi...
--
cu
Mario

Re:Excel andStyles


<<Mario Rothacher:
 I've no problems with the colour when i use my
xl-Constant as described in the posting before.

Quote

Ah, you're right - but it seems you have to specify
the colour *after* setting the linestyle/thickness,
not before. :)

I'll put your solution, with proper credit to you,
on my Excel problems web page. Thanks for that!

Deborah Pate

Re:Excel andStyles


Deborah Pate <D...@djpate.freeserve.co.uk> schrieb im Beitrag
<7ujuie$3e...@forums.borland.com>...
Quote
> Ah, you're right - but it seems you have to specify
> the colour *after* setting the linestyle/thickness,
> not before. :)

The same problem i had with the horizontalAlignment... I set the alignment
before a indent. But when you set a indent, the horizontalAlignment always
is left... It cost's me several hours to localize this. On some days i hate
Excel ;-)
Quote

> I'll put your solution, with proper credit to you,
> on my Excel problems web page. Thanks for that!

You're welcome! And thanks for publishing my solution!
--
cu
Mario

Other Threads