I'm getting a different error in .NET 8.0. Here is my code:
Microsoft.Office.Interop.Excel.Application xl = new();
Workbook wb = xl.Workbooks.Open(filepath);
dynamic noSenseLabel = xl.ActiveWorkbook.SensitivityLabel;
dynamic lblInfo = noSenseLabel.CreateLabelInfo();
lblInfo.LabelId = labelId;
lblInfo.LabelName = "Sensitive";
lblInfo.SiteId = siteId;
noSenseLabel.SetLabel(lblInfo, lblInfo);