Aspose.NET cell's style property "QuotePrefix" sometimes not determined correctly

Hello,

Aspose.NET cell’s style property “QuotePrefix” sometimes not determined correctly, attached is an example with two cells of visually identical format but rendering QuotePrefix differently, though none of them has a quote before the content. Please advise.

Code in C#:

using Aspose.Cells;
using System;

namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
Workbook workbook = new Workbook(“P:\Report_202501.xlsx”);

        Worksheet worksheet = workbook.Worksheets["Sheet"];
        var references = new string[] { "A1", "A2"  };

        foreach(string reference in references)
        {
            var cell = worksheet.Cells[reference];
            var style = cell.GetStyle();

            Console.WriteLine("Cells[" + reference + "]");
            Console.WriteLine(style.QuotePrefix);
            Console.WriteLine(cell.IsErrorValue ? null : cell.Value);
        }
        Console.ReadLine();
    }
}

}
Report_202501.zip (325,0 Ko)

@liujx83,

After initial testing, I am able to reproduce the issue as you mentioned by using your template Excel file. I found that cell’s style property “QuotePrefix” sometimes is not determined correctly.

We require thorough evaluation of the issue. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-57771

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@liujx83
“QuotePrefix” flag is set in style.xml of the template file:

		<xf numFmtId="0" fontId="30" fillId="2" borderId="0" xfId="2" quotePrefix="1" applyNumberFormat="1" applyFont="1" applyFill="1" applyBorder="1" applyAlignment="1" applyProtection="1">
			<alignment horizontal="center" vertical="center"/>
		</xf>

We can not simply remove it.
It should be issue of removing data and style when creating such template file.
And QuotePrefix only works for the cells which contain string value.

Thank you for the analysis. We found a work around.

@liujx83,

It’s good to hear that you’ve sorted out now. Please don’t hesitate to reach out to us again if you have any additional questions or feedback.