We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

BorderCollection vs. Border?

Hello,

If I setup a BorderCollection for a table (BorderCollection borders = builder.CellFormat.Border), is possible to edit parts of that collection? For instance, I need to in one cell remove the border for the top and bottom lines. I tried this by creating a top and lower borders (Border topBorder = builder.RowFormat.Borders[BorderType.Top]) and then setting the LineStyle to none. However the line style stays as Single.

Do I have create and manage a border for each side, or can the BorderCollection be modified?

Thanks.

Hi

Thanks for your request. Could you please attach your document and code that will allow us to reproduce the problem? We will check the issue and provide you more information.

Also, it would be great if you attach the expected output.

Best regards,

It actually wasn’t too hard after all. I was able to find someone else’s code. So for example I have: BorderCollection borders. To edit the top, or bottom I can

borders.Top.LineStyle = LineStyle.None;
borders.Bottom.LineStyle = LineStyle.None;

Pretty simple after all.

Thanks.

Hi

It is perfect that you managed to achieve what you need. Please let us know in case of any issues, we are always glad to help you.

Best regards,