C1Excel File Error

Posted by: dennis on 9 August 2020, 7:16 pm EST

  • Posted 9 August 2020, 7:16 pm EST


    I used C1Excel to create a xlsx File, and edit it by MS Office. After MS Office edited, I used C1Excel to read the value of the file, but it give me the format!!.

    1. Use XLSheet.Item(1,1).Value= "Test123" to Create a file
    2. MS Office edit B2 of the file to "Test234
    3. Use A=XLSheet.Item(1,1).Value , but A="{\rtf1{\fonttbl{\f0\fnil Arial;}............."

    Windows 7, Vistual studio 2017 (VB.Net), Microsoft Office 2007, C1Excel 2020v1
  • Replied 10 August 2020, 4:10 pm EST


    I could not observe the value in rich text format using the above steps. Please see the attached sample for the same.


    Also, note that this can happen when a cell text is partially formatted in Excel (for instance, making only 'Test' part of 'Test234' bold). To preserve the formatting, Excel stores the value (with formatting) in rich text format.

    From the partial cell text you have posted ("{\rtf1{\fonttbl{\f0\fnil Arial;}............."), it does seem like part of the text is bold. Please check if that's the case.

  • Replied 10 August 2020, 7:44 pm EST


    The issue is not reproducible at our end. Please try to run the attached application and share if you can observe the issue with it?

  • Replied 10 August 2020, 8:11 pm EST

    Hi, Ruchir,

    It is the same result by Test_C1Excel.zip.

    Export File: ExcelExport-NoEdit.xlsx
    Modify File: ExcelExport-Edit-byExcel2007.xlsx
    Import Result: Capture.JPG


  • Replied 13 August 2020, 5:33 am EST

    Hi Dennis,

    I have escalated the issue for further investigation [ID: 457447] and will keep you updated.

  • Marked as Answer

    Replied 14 August 2020, 3:39 am EST


    The team has confirmed that its by design. To get your expected output, use the Text property instead, as follows:
    Dim text = book.Sheets(0).Item(1, 1).Text
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels