MiniExcel icon indicating copy to clipboard operation
MiniExcel copied to clipboard

动态设置ExcelIgnoreAttribute true 列不能隐藏

Open xiaobaxiang opened this issue 3 years ago • 1 comments

Excel Type

  • [X] XLSX
  • [ ] XLSM
  • [ ] CSV
  • [ ] OTHER

Upload Excel File

Please attach your issue file by dragging or droppng, selecting or pasting them.

e.g : https://github.com/shps951023/MiniExcel/files/6538107/demo.xlsx

MiniExcel Version

1.23.1

Description

能通过

 var attr = item.GetType().GetProperty("Name").GetCustomAttribute<ExcelIgnoreAttribute>();
                        if (attr != null)
                            attr.ExcelIgnore = true;

动态设置true,false 显示隐藏列吗?现在只能把内容给隐藏了。但是表头还在 Snipaste_2022-04-11_19-39-29

xiaobaxiang avatar Apr 11 '22 12:04 xiaobaxiang

动态设定需要将Attribute传给MiniExcel,如 image

shps951023 avatar May 09 '22 00:05 shps951023