Page 1 of 1
Diagonal borders in XLSX
Posted: Tue Nov 14, 2017 10:12 am
by bturcs
Are diagonal borders in XLSX currently working? Excel 2016 doesn't display them.
Stylesheet content generated by XLSSUIT6:
Code: Select all
<border outline="0" >
<diagonal>
<color auto="1" />
</diagonal>
</border>
Stylesheet content generated by Excel:
Code: Select all
<border diagonalDown="1">
<diagonal style="dotted">
<color auto="1" />
</diagonal>
</border>
Is it possible that the stylesheet attribute diagonaldown is missing?
Notes:
- the xml styleheet code is shortened
- the old DiagLines property from XLSSUIT4 is no longer available
- I could add my delphi code if required
- don't know where the outline attribute comes from, didn't set it in the code
I'm using CmdFormat to set diagonal borders.
Thank your for your help,
Basti
Re: Diagonal borders in XLSX
Posted: Wed Nov 15, 2017 8:38 am
by bturcs
Here is the delphi code:
XLSSUIT6 (not working)
Code: Select all
procedure testd();
var
LDoc: TXLSReadWriteII5;
LFormat: TXLSCmdFormat;
begin
try
LDoc := TXLSReadWriteII5.Create(nil);
LDoc.Sheets[0].AsString[3,3] := '';
LFormat := LDoc.CmdFormat;
LFormat.BeginEdit(LDoc[0]);
LFormat.Border.Style := cbsThin;
LFormat.Border.Color.TColor := $FF00FF;
LFormat.Border.Side[cbsDiagLeft] := true;
LFormat.Apply(3, 3);
LDoc.Filename := 'C:\TEMP\DIAG.XLSX';
LDoc.Write;
finally
freeAndNil(LDoc);
end;
XLSSUIT4 (working)
Code: Select all
uses XlsReadWriteII4, CellFormats4, Cell4, SysUtils;
procedure testd();
var
LDoc: TXLSReadWriteII4;
LCell: TCell;
begin
try
LDoc := TXLSReadWriteII4.Create(nil);
LDoc.Sheets[0].AsString[3,3] := '';
LCell := LDoc.Sheets[0].Cell[3,3];
LCell.BorderDiagStyle := cbsThin;
LCell.BorderDiagLines := dlDown;
LCell.BorderDiagColorRGB := $FF00FF;
LDoc.Filename := 'C:\TEMP\DIAG.XLS';
LDoc.Write;
finally
freeAndNil(LDoc);
end;
end;
Re: Diagonal borders in XLSX
Posted: Thu Nov 16, 2017 8:43 am
by larsa
Hello
Will fix this in the next update.
Re: Diagonal borders in XLSX
Posted: Mon Nov 20, 2017 3:51 pm
by bturcs
We recently purchased the components (v 6.00.21, with source files). Can we receive the update or a patch too?
Re: Diagonal borders in XLSX
Posted: Fri Nov 24, 2017 3:21 pm
by larsa
Hello
This is fixed now. Please download the latest update.
Re: Diagonal borders in XLSX
Posted: Wed Nov 29, 2017 9:33 am
by bturcs
Thank your for the bug fix. I downloaded the latest version and now the diagonal border is showing up in the xlsx file. It
does not work if I use the old file format, though.
Code: Select all
uses XlsReadWriteII5, XLSCmdFormat5, Xc12DataStyleSheet5, Xc12Utils5, SysUtils;
procedure testd();
var
LDoc: TXLSReadWriteII5;
LFormat: TXLSCmdFormat;
begin
try
LDoc := TXLSReadWriteII5.Create(nil);
LDoc.Version := xvExcel97;
LDoc.Sheets[0].AsString[3,3] := '';
LFormat := LDoc.CmdFormat;
LFormat.BeginEdit(LDoc[0]);
LFormat.Border.Style := cbsThin;
LFormat.Border.Color.TColor := $FF00FF;
LFormat.Border.Side[cbsDiagLeft] := true;
LFormat.Apply(3, 3);
LDoc.Filename := 'C:\TEMP\DIAG.XLS';
LDoc.Write;
finally
freeAndNil(LDoc);
end;
end;
No border is shown in Cell D4.
Re: Diagonal borders in XLSX
Posted: Mon Dec 04, 2017 11:38 am
by larsa
Hello
This is fixed in update 6.00.24
Re: Diagonal borders in XLSX
Posted: Mon Dec 11, 2017 7:29 am
by bturcs
I can confirm that it is working now for both filetypes, xls and xlsx. Thank you!