Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Tue Mar 15, 2022 3:15 pm

Hi,

I am using Spire.Officefor.NETStandard 7.2.3 with Dotnet 6.03 on Windows and have noticed quite a few regressions. I am putting them in separate topics to help better track them.

Code like:

....
var listStyle =
new ListStyle(document, Spire.Doc.Documents.ListType.Numbered)
{
Name = listStyleName
};
for (var i = 0; i < 7; i++)
{
listStyle.Levels[i].PatternType = docPatternType;
listStyle.Levels[i].NumberPrefix = listNumberPrefix;
listStyle.Levels[i].NumberSufix = listNumberSuffix;
listStyle.Levels[i].IsLegalStyleNumbering = isLegalStyleNumbering;
var orderedListLevel = new OrderedListLevels
{
ListStyleName = listStyleName,
MarginLeft = string.Empty,
ListLevel = i
};
OrderedListLevelsList.Add(orderedListLevel);
}
document.ListStyles.Add(listStyle);

is normally used to generate list styles which are then applied when word lists are created (ordered in this case, but the same happens with unordered). Under the dotnet version of Spire.Office, this works perfectly. Under the netstandard version neither the Prefix nor the Suffix are applied. I have not tested all the properties, so there may be others that also do not work.

The workaround is to instead apply them with each list item instead of letting the style take care of it.

Cheers,

Alex

alexneblett01
 
Posts: 14
Joined: Sat Oct 18, 2014 2:09 pm

Wed Mar 16, 2022 8:21 am

Hello,

Glad to hear that the issue has been resolved by you.
If you encounter other issues related to our products in the future, please feel free to contact us.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.XLS