[英]C# Preprocess excel file - Auto detect rows that is not have structure data (not a datarow in a datatable), and delete it
I have lots of excel files like below, in which:我有很多 excel 文件,如下所示,其中:
Anyone here know the algorithm to delete the red zone or library to pre-process?这里有人知道删除红色区域或库进行预处理的算法吗?
I have too many files like this.我有太多这样的文件。 It takes lots of time to open each file and delete red zone.
打开每个文件并删除红色区域需要花费大量时间。
Thank you.谢谢你。
The EPPlus worksheet object has 2 functions for this, one for deleting rows, one for deleting columns. EPPlus 工作表 object 有两个功能,一个用于删除行,一个用于删除列。 Both functions have an overload.
这两个函数都有重载。
workSheet.DeleteColumn(int column);
workSheet.DeleteColumn(int columnFrom, int columns);
workSheet.DeleteRow(int row);
workSheet.DeleteRow(int rowFrom, int rows);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.