question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Semantic Error : Attribute 'si' should be present when the value of attribute 't' is 'shared'.

See original GitHub issue

Is this a:

  • Issue with the OpenXml library
  • Question on library usage

Description

Semantic Error : Attribute ‘si’ should be present when the value of attribute ‘t’ is ‘shared’. On 2 separate valid Office 365 Excel documents.

Information

  • .NET Target: NET 4.6.2
  • DocumentFormat.OpenXml Version: 2.11.0

Repro

class Program
    {
        static void Main(string[] args)
        {
            OpenXmlPackage spreadsheetDocument1 = SpreadsheetDocument.Open("DiversenBerekeningen.xlsm", false);
            List<ValidationErrorInfo> errorInfos1 = ValidateDocument(spreadsheetDocument1);

            foreach (ValidationErrorInfo info in errorInfos1)
            {
                Console.WriteLine(string.Format("DiversenBerekeningen.xlsm Error Occurred {0}", info.Description)); 
            }

            OpenXmlPackage spreadsheetDocument2 = SpreadsheetDocument.Open("DiversenGrafiekenPeltier.xlsm", false);
            List<ValidationErrorInfo> errorInfos2 = ValidateDocument(spreadsheetDocument2);

            foreach (ValidationErrorInfo info in errorInfos2)
            {
                Console.WriteLine(string.Format("DiversenGrafiekenPeltier.xlsm Validaton Error Occurred {0}", info.Description));
            }

            Console.ReadKey();
        }

        static List<ValidationErrorInfo> ValidateDocument(OpenXmlPackage package)
        {
            OpenXmlValidator validator = new OpenXmlValidator(FileFormatVersions.Office2019);
            List<ValidationErrorInfo> validationErrors = validator.Validate(package).ToList();

            return validationErrors;
        }
    }

Observed

The following validation error was reported on both files.

Semantic Error : Attribute ‘si’ should be present when the value of attribute ‘t’ is ‘shared’

Expected

Both files should have been validated successfully without errors.

Invalid Files.zip

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
twsouthwickcommented, Jul 10, 2020

Cool. It’s merged in now and will be available via CI. We’ll probably cut a 2.11.1 release soon as we’ve got a few other fixes to get out.

1reaction
06needhamtcommented, Jul 9, 2020

@twsouthwick Thanks for the fix. I should have been more clear that I was referring to that one specific validation issue the others that you reported were expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: can't set attribute in python
v <8 how do I do it, I just tried using a temporary variable to store its value and then use this for...
Read more >
6.33.1 Common Function Attributes
The access attribute specifies that a function to whose by-reference ... Unless the pointer is null the pointed-to object must exist and have...
Read more >
Attributes in Clang — Clang 18.0.0git documentation
The return_typestate attribute can be applied to functions or parameters. When applied to a function the attribute specifies the state of the returned...
Read more >
Why, How, and When to Use Semantic HTML and ARIA
If the browser can't differentiate between pieces of content, then it can't present that content to the user in a meaningful way.
Read more >
Don't Use The Placeholder Attribute
The placeholder attribute contains a surprising amount of issues that prevent it from delivering on what it promises. Let's clarify why you ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found