C# 클래스 exceltk.Clipborad.HTable2DataTable

http://blog.hypercomplex.co.uk/index.php/2010/05/parsing-html-tables-into-system-data-datatable/ HtmlTableParser parses the contents of an html string into a System.Data DataSet or DataTable.
파일 보기 프로젝트 열기: fanfeilong/exceltk

공개 메소드들

메소드 설명
ParseDataSet ( this htmlObj ) : DataSet

Given an HTML string containing n table tables, parse them into a DataSet containing n DataTables.

ParseTable ( string tableHtml ) : DataTable

Given an HTML string containing a single table, parse that table to form a DataTable.

비공개 메소드들

메소드 설명
GenerateColumns ( MatchCollection rowMatches ) : DataColumn[]

For tables which do not specify header cells we must generate DataColumns based on the number of cells in a row (we assume all rows have the same number of cells).

ParseColumns ( string tableHtml ) : DataColumn[]

Given a string containing an HTML table, parse the header cells to create a set of DataColumns which define the columns in a DataTable.

ParseRows ( IEnumerable rowMatches, DataTable dataTable ) : void

Add a row to the input DataTable for each row match in the input MatchCollection

RemoveSpan ( this text ) : string
WithoutComments ( string html ) : string

Strip comments from an HTML stirng

메소드 상세

ParseDataSet() 공개 정적인 메소드

Given an HTML string containing n table tables, parse them into a DataSet containing n DataTables.
public static ParseDataSet ( this htmlObj ) : DataSet
htmlObj this An HTML string containing n HTML tables
리턴 DataSet

ParseTable() 공개 정적인 메소드

Given an HTML string containing a single table, parse that table to form a DataTable.
public static ParseTable ( string tableHtml ) : DataTable
tableHtml string An HTML string containing a single HTML table
리턴 DataTable