Open Rayvor opened 5 years ago
ReadDirStream() method in ExcelVbaProject.cs:488
case 0x19:
currentModule = new ExcelVBAModule();
currentModule.Name = GetUnicodeString(br, size);
Modules.Add(currentModule);
break;
It get UnicodeString and trying set to currentModule.Name which throw excepltion
Hi. I noticed that if you use Excel with different locale (example Russian), property Workbook.VbaProject.Modules starts throw InvalidOperationException("Vba module names can't contain unicode characters") in follow place:
But if I remove condition if (value.Any(c => c > 255)) I get VbaProject.Modules names without errors.
The fact is that russian Excel create VBA project in new file with cyrillic names by default. Cyrillic names have unicode characters.