MiniExcel
MiniExcel copied to clipboard
Allow text Localization
Excel Type
- [x] XLSX
- [ ] XLSM
- [X] CSV
- [ ] OTHER
Please add column name localization; actually I overrided the DisplayNameAttribute class:
public sealed class ExcelColumnNameLocalize : DisplayNameAttribute
{
private ResourceManager? _resourceManager;
private Type? _resourceType;
public ExcelColumnNameLocalize(string displayName)
: base(displayName)
{
}
public Type? ResourceType
{
get => _resourceType;
set
{
if (_resourceType != value)
{
_resourceType = value;
if (value is not null)
{
_resourceManager = new ResourceManager(value);
}
}
}
}
public override string DisplayName => _resourceManager?.GetString(DisplayNameValue) ?? DisplayNameValue;
}
but I prefer an integrated solution.
Thanks.