Why CellReference is null?

Tiger Chen 1 Reputation point
2022-12-05T10:32:44.863+00:00

267221-cellreference.png

I created Excel file with some data. Why the CellReference is null while CellValue is something inputed?

I expect the CellReference is automatically created when Cell is created, right?

thanks!

Microsoft 365 and Office | Open Specifications
Microsoft 365 and Office | Open Specifications
Technical documents for protocols, computer languages, standards support, and data portability. The goal with Open Specifications is to help developers open new opportunities to interoperate with Windows, SQL, Office, and SharePoint.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Mike Bowen 2,056 Reputation points Microsoft Employee Moderator
    2022-12-05T20:42:56.553+00:00

    Hi @Tiger Chen ,

    The SDK is based on the Office XSDs from the underlying file format, and they show that it is valid for a cell to not have a CellReference attribute, so it is also valid in the OpenXML SDK. So, if you have a cell with a null CellReference then it must be added manually.

    Best Regards,
    Michael Bowen
    Escalation Engineer - Microsoft Open Specifications

    0 comments No comments

  2. Tiger Chen 1 Reputation point
    2022-12-06T23:31:25.55+00:00

    thank you!

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.