All C# extension methods for type datatable
-
ToXml
Converts entire DataTabel To XDocument
-
CreateExcel
Transforms a DataTable in Excel (xls). Requires Excel Library (https://code.google.com/p/excellibrary/)
-
SelectDistinct
"SELECT DISTINCT" over a DataTable. Handles multiple columns selection.
-
SelectRows
Wraps the usage of some DataTable.DefaultView properties to return sorted rows filtered on a custom filterexpression. For documentation on what to put in the whereExpression and the orderByExpression, refer to the MSDN documentation of DataTable.DefaultView.RowFilter and DataTable.DefaultView.Sort.
-
Dedup
This method will take any DataTable and remove duplicate rows based on any column.
-
EqualsByContent
Checks if two DataTable objects have the same content.
-
RenameColumn
Rename a code that allows only stating the current name column and a new name.
-
WriteXMLForReport
Many times you need an XSD file for a report. I have created this extension to write the xsd based on the data table I feed it into the directory I set.
-
RemoveColumn
Code that allows deleting a column stating the name
-
Perason Correlation Coefficient for a datatable
An extension method that add the possibility calculate the Pearson correlation coefficient using the names of two columns of the data table in question.