SpreadSheetGear - read unique values from Excel column

女生的网名这么多〃 提交于 2019-12-13 04:45:56

问题


I want to read a column in Excel worksheet using SpreadSheetGear (.NET) and get unique values in that column back.

Example: From the above Excel worksheet, I need to read column B and get back unique values "John" "Mike" and "Wayne"

In real life, there can be 1,000,000+ rows so efficiency is important. How is that achieved?


回答1:


I Understand that the post is quite old but could be helpful for others: The comment entered by @Michael Moreno will be helpful and I endorse the idea. But the concern is: How one can judge the number of rows or columns to iterate the loop. For this I suggest the Property IWorksheet.UsedRange to get the range of data contained by sheet. Curtsy by: @Chris in his thread



来源:https://stackoverflow.com/questions/19226936/spreadsheetgear-read-unique-values-from-excel-column

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!