Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ExcelDataReader.DataSet/ExcelDataReaderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private static string GetUniqueColumnName(DataTable table, string name)

private static DataTable AsDataTable(IExcelDataReader self, ExcelDataTableConfiguration configuration)
{
var result = new DataTable { TableName = self.Name };
var result = new DataTable { TableName = self.Name, CaseSensitive = configuration.CaseSentitive };
result.ExtendedProperties.Add("visiblestate", self.VisibleState);
var first = true;
var emptyRows = 0;
Expand Down
5 changes: 5 additions & 0 deletions src/ExcelDataReader.DataSet/ExcelDataTableConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ namespace ExcelDataReader;
/// </summary>
public class ExcelDataTableConfiguration
{
/// <summary>
/// Gets or sets a value indicating whether the DataTable should be case sensitive. Useful when setting a primary key after loading from Excel.
/// </summary>
public bool CaseSentitive { get; set; }

/// <summary>
/// Gets or sets a value indicating the prefix of generated column names.
/// </summary>
Expand Down