Print Page | Close Window

SetCellFormat with TFlxApplyFormat on empty cells

Printed From: TMS Software
Category: .NET Components
Forum Name: .NET Flexcel
Forum Discription:
URL: http://www.tmssoftware.com/site/forum/forum_posts.asp?TID=8838
Printed Date: 22 Oct 2019 at 4:18pm


Topic: SetCellFormat with TFlxApplyFormat on empty cells
Posted By: Sandoz Jean-Luc
Subject: SetCellFormat with TFlxApplyFormat on empty cells
Date Posted: 04 Apr 2018 at 5:59pm
Hello,
My application fills an xlsx file with data and must sometimes separate rows by setting bottom border.

Here is the code used to set the bottom border:
    private void SetRowBottomBorder(XlsFile p_xfData, int p_nRow, TFlxBorderStyle p_bsStyle)
    {
      var l_tffBottomBorder = p_xfData.GetDefaultFormat;
      l_tffBottomBorder.Borders.Bottom = new TFlxOneBorder(p_bsStyle, TExcelColor.Automatic);
      var l_tafApply = new TFlxApplyFormat();
      l_tafApply.SetAllMembers(false);
      l_tafApply.Borders.Bottom = true;
      p_xfData.SetCellFormat(p_nRow, 1, p_nRow, (int)ExcelColumns.Count -1, l_tffBottomBorder, l_tafApply);
    }


Here is the empty Excel document my software fills with data:
Empty document

And here is the filled document, with problem regarding to vertical borders only on EMPTY CELLS:


Can you please help me solve the format problem?

Thank you in advance

Greetings

J-D Gasser



Replies:
Posted By: Adrian Gallero
Date Posted: 05 Apr 2018 at 2:05pm
Hi,
This does indeed seem like a bug. SetCellFormat in this overload is not checking the exiting column format, so it is failing to recognize that the new empty cell added in order to show the bottom line should also have a right line.

I think we have it fixed here, but I need to check it a little more. As soon as this is ready we will be releasing a new version with this fixed.


Posted By: Sandoz Jean-Luc
Date Posted: 02 May 2018 at 10:43am

Hello Adrian,
Thank you for your answer.

Did you released the new version? Our customers are waiting on it. Or do you have a workaround?

Thank you in advance for xour answer.

Greetings

J-D Gasser



Posted By: Adrian Gallero
Date Posted: 02 May 2018 at 12:54pm
A new is coming in a couple of days, sorry about the delays. We are just polishing everything right now to make sure the release is fine.


Posted By: Sandoz Jean-Luc
Date Posted: 02 May 2018 at 1:33pm
Great, thank you !



Print Page | Close Window