C1Excel File Error

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

    • Post Options:
    • Link

    Posted 9 August 2020, 7:16 pm EST

    Hi,

    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;}…”

    Environment

    Windows 7, Vistual studio 2017 (VB.Net), Microsoft Office 2007, C1Excel 2020v1

  • Posted 10 August 2020, 4:10 pm EST

    Hi,

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

    C1Excel_SheetValue.zip

    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.

    Regards,

    Jitender

  • Posted 10 August 2020, 7:44 pm EST

    Hi,

    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?

    Regards,

    Test_C1Excel.zip

  • Posted 10 August 2020, 8:11 pm EST - Updated 3 October 2022, 10:50 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

    https://drive.google.com/file/d/124zcBGq1Wo4irzW8DR2BQY737oAyR5kY/view?usp=sharing

    Regards,

    Dennis

  • Posted 13 August 2020, 5:33 am EST

    Hi Dennis,

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

    Regards,

  • Posted 14 August 2020, 3:39 am EST

    Hi,

    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