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

Free Support Forum - aspose.com

Word cell border style does not work with �HairLine� line style

Using Aspose.Words.dll
When creating .docm or .docx file, the Word cell border is not drawn with the line style as ‘HairLine’.
A .doc format has a ‘HairLine’ line looking as ‘Single’ line (without gaps.).
Thank you for help!

Hi Inga,

Thanks for your inquiry. In your shared code, you have set the Border Style as Hairline but you have not set the Border width. Its value is 1/2 pt by default and both line style (Hairline and Single) has line with 1/2 pt. Hope this answers your query. Please read following documentation links for your kind reference.


I use code:

Aspose.Words.Tables.Cell wordCell = wordDocBuilder.InsertCell();
wordCell.CellFormat.Borders[Aspose.Words.BorderType.Bottom].LineWidth = 2.5;
wordCell.CellFormat.Borders[Aspose.Words.BorderType.Bottom].LineStyle = LineStyle.Hairline;
Aspose.Words.Tables.Cell wordCell1 = wordDocBuilder.InsertCell();
wordCell1.CellFormat.Borders[Aspose.Words.BorderType.Bottom].LineWidth = 2.5;
wordCell1.CellFormat.Borders[Aspose.Words.BorderType.Bottom].LineStyle = LineStyle.Single;

But result is the same: the Hair line is still invisible.
I am attaching created word file.
Thank you!

Hi Inga,

Thanks for sharing the details. I have managed to reproduce the same issue at my side. I have logged this issue as WORDSNET-7167 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-7167) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.