Aspose Cells AutoFitColumns with trailing spaces

Last post 08-29-2011, 2:44 AM by aspose.notifier. 5 replies.
Sort Posts: Previous Next
  •  07-20-2011, 4:43 PM 317595

    Aspose Cells AutoFitColumns with trailing spaces

    I am using Aspose Cells DLL version 6.0.1.

    I have found an inconsistency in the AutoFitColumns with cell values containing trailing spaces.  When I only have 9 cells with trailing spaces, the column auto-fits correctly with the header.  When I have 10 cells, the auto-fit ignores the header cell value leaving the column too small.

    Dim BOOK As New Aspose.Cells.Workbook

    Dim SHEET = BOOK.Worksheets.Item(1 - 1)

    SHEET.Cells(0, 2).Value = "ADJUSTMENT"

    For i As Integer = 1 To 10

    SHEET.Cells(i, 2).Value = "Lock "

    Next i

    SHEET.AutoFitColumns()

    BOOK.Save("A.xls", Aspose.Cells.SaveFormat.Excel97To2003)

    Filed under: .Net Cells AutoFit
     
  •  07-20-2011, 5:35 PM 317607 in reply to 317595

    Re: Aspose Cells AutoFitColumns with trailing spaces

    Attachment: Present (inaccessible)
    Hi,

    I could not find the issue as you mentioned. I have attached the output file using your code. Please make sure that you are using latest version v6.0.1.

    Thank you.


    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  07-20-2011, 6:30 PM 317608 in reply to 317607

    Re: Aspose Cells AutoFitColumns with trailing spaces

    I have confirmed that I am using version 6.0.1.  I didn't notice that the trailing spaces were truncated from my post.  This is a better example.

    Dim BOOK As New Aspose.Cells.Workbook

    Dim SHEET = BOOK.Worksheets.Item(1 - 1)

    SHEET.Cells(0, 2).Value = "ADJUSTMENT"

    For i As Integer = 1 To 10

    SHEET.Cells(i, 2).Value = "Lock" & New String(" ", 16)

    Next i

    SHEET.AutoFitColumns()

    BOOK.Save("A.xls", Aspose.Cells.SaveFormat.Excel97To2003)

     

       When you change the loop to end on 9, the problem disappears.

     
  •  07-20-2011, 6:51 PM 317610 in reply to 317608

    Re: Aspose Cells AutoFitColumns with trailing spaces

    Hi,

    Now, I can find the issue as you have mentioned. I have logged a ticket for the issue with an id: CELLSNET-29293. We will figure it out soon.

    thank you.

    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  07-22-2011, 4:28 AM 317899 in reply to 317608

    Re: Aspose Cells AutoFitColumns with trailing spaces

    Attachment: Present (inaccessible)
    Hi,

    We have fixed this issue.Please download Aspose.Cells for .NET v6.0.1.1.
    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Developer
    Aspose Sialkot Team
    Contact Us
    Aspose - The .NET and Java Component Publisher

    Keep in touch! We're on Twitter and Facebook
     
  •  08-29-2011, 2:44 AM 324941 in reply to 317595

    Re: Aspose Cells AutoFitColumns with trailing spaces

    The issues you have found earlier (filed as 29293) have been fixed in this update.


    This message was posted using Notification2Forum from Downloads module by aspose.notifier.
     
View as RSS news feed in XML