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

Free Support Forum - aspose.com

Double Border not showing on initial open

When I open a document where I applied Double Borders to the top or bottom of a cell, only the top line of the double border shows initially. If I change the view in any way (page down and back, change tab then back), then the double border shows correctly. It is only on initial open that the problem shows. If I save the file from Excel and re-open it, then the border shows correctly.

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Dim BOOK As New Aspose.Cells.Workbook

Dim SHEET As Aspose.Cells.Worksheet = BOOK.Worksheets.Item(1 - 1)

SHEET.Cells(6 - 1, 1 - 1).PutValue("15.3", True)

SHEET.Cells(7 - 1, 1 - 1).Formula = "=SUM(A6:A6)"

Dim STYLE As Aspose.Cells.Style = BOOK.Styles.Item(BOOK.Styles.Add)

Dim FLAG As New Aspose.Cells.StyleFlag

FLAG.TopBorder = True

STYLE.Borders.Item(Aspose.Cells.BorderType.TopBorder).LineStyle = Aspose.Cells.CellBorderType.Double

SHEET.Cells.CreateRange(7 - 1, 1 - 1, 1, 1).ApplyStyle(STYLE, FLAG)

BOOK.Save("C:\Testing\A.xls")

End Sub 'Form1_Load

Hi Thomas,

We are unable to reproduce the issue mentioned by you. Please use the attached updated version Aspose.Cells5.2.0.3.zip. Hope this will resolve the issue. We are also attaching the output file for your consideration.

Thanks,

When you ran the report, the watermark page comes up first. When you change the page, the double border shows correctly. This problem only shows up if the worksheet with the Double Border cells is the ActiveSheetIndex. I got the same results using the 5.2.0.3 vesion of Aspose.Cells.dll.

Please re-run the code with your own license.

Dim xlaLIC As New Aspose.Cells.License

xlaLIC.SetLicense(New System.IO.StreamReader("C:\Testing\Aspose.Cells.lic").BaseStream)

I am still getting this problem upon opening the document generated with my registered version of Aspose Cells version 5.2.0.3. When I use Microsoft Excel 2003 SP3 to open the generated A.xls file, I see the double borders on Sheet1 between rows 7 and 8 are missing. It only happens around cells with a formula.

There are similar problems with the Medium and Thick borders.

Dim xlaLIC As New Aspose.Cells.License : xlaLIC.SetLicense(New System.IO.StreamReader("C:\Testing\\Aspose.Cells.lic").BaseStream)

Dim BOOK As New Aspose.Cells.Workbook

Dim SHEET As Aspose.Cells.Worksheet = BOOK.Worksheets.Item(1 - 1)

SHEET.Cells(5 - 1, 1 - 1).PutValue("15.3", True)

SHEET.Cells(6 - 1, 1 - 1).PutValue("15.3", True)

SHEET.Cells(7 - 1, 1 - 1).Formula = "=SUM(A6:A6)"

SHEET.Cells(8 - 1, 1 - 1).Formula = "=SUM(A6:A6)"

Dim STYLE As Aspose.Cells.Style = BOOK.Styles.Item(BOOK.Styles.Add)

Dim FLAG As New Aspose.Cells.StyleFlag

FLAG.TopBorder = True

STYLE.Borders.Item(Aspose.Cells.BorderType.TopBorder).LineStyle = Aspose.Cells.CellBorderType.Double

SHEET.Cells.CreateRange(5 - 1, 1 - 1, 6, 3).ApplyStyle(STYLE, FLAG)

BOOK.Worksheets.ActiveSheetIndex = 0

BOOK.Save("C:\Testing\A.xls")

Hi Thomas,

We are unable to reproduce the issue mentioned by you. For your reference, we are sending the output file.

If the issue persists, please create a sample console demo application, zip it and send it with output excel files. As the sample application will contains the license file, so send it via email not through forum post.

We will look into the issue soon.

Thanks,

The issue is present in the document you presented. I have attached a screen-shot of my Excel application upon opening your borderTest.xls. Cells A7 and A8 are displayed with incomplete borders. My Excel version is Microsoft Office Excel 2003 (11.8328.8329) SP3, part of Microsoft Office Professional Edition 2003.

Hi Thomas,

We are able to find the issue mentioned by you. The issue has been logged with ID CELLSNET-22655. We will update you soon.

Thanks,

<!ā€“[if gte mso 10]> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

<![endif]ā€“>

Hi,


Could you add two coding lines before saving the file, it should work fine.

BOOK.CalculateFormula();

BOOK.Settings.ReCalculateOnOpen = false;

BOOK.Save(@"D:\FileTemp\A.xls");

Thank you.

This fixed the symptom. The problem still exists. Thanks for the work-around.

Iā€™m experiencing the same issue using Aspose.Cellls 7.1.0.0 and Excel 2010 but the workaround is not working for me. The double underline does not show properly until I switch sheets in the workbook and come back or re-save the workbook in Excel. I have attached before and after images of a cell with double underline. A similar issue occurs with a thick border.


Josh
Hi,

Please download and try this fix: Aspose.Cells for .NET v7.1.0.6 and let us know your results.

If you still find the issue, give us your sample/template file(s) and paste your sample code here, we will check it soon.

Thank you.