使用EPPLUS查找某个列是否隐藏在excel文件中。

时间:2022-03-15 10:05:17

I have a project which reads in a excel file using EPPlus. However, often the files can include hidden columns.

我有一个项目使用EPPlus读取excel文件。但是,文件通常可以包含隐藏的列。

Is there a way of determining if a column is hidden using EPPlus?

是否有一种方法可以确定是否使用EPPlus隐藏列?

I basically want to ignore any hidden columns.

我想忽略任何隐藏的列。

1 个解决方案

#1


1  

Given an OfficeOpenXml.ExcelWorksheet ws (from the EPPlus assembly)

给定一个OfficeOpenXml。ExcelWorksheet ws(来自EPPlus组件)

var hidden = ws.Columns(1).Hidden;

#1


1  

Given an OfficeOpenXml.ExcelWorksheet ws (from the EPPlus assembly)

给定一个OfficeOpenXml。ExcelWorksheet ws(来自EPPlus组件)

var hidden = ws.Columns(1).Hidden;