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
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public fun DataFrame.Companion.readExcel(
}
}
} else {
sheet.getRow(0).map { it.columnIndex }
sheet.getRow(skipRows).map { it.columnIndex }
}

val headerRow = sheet.getRow(skipRows)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,10 @@ class XlsxTest {
val df = DataFrame.readExcel(testResource("custom_header_position.xlsx"), skipRows = 1)
df.columnNames() shouldBe listOf("header1", "header2")
}

@Test
fun `consider skipRows when obtaining column indexes`() {
val df = DataFrame.readExcel(testResource("header.xlsx"), skipRows = 6)
df.columnNames() shouldBe listOf("Well", "Well Position", "Omit", "Sample Name", "Target Name", "Task", "Reporter", "Quencher")
}
}
Binary file added dataframe-excel/src/test/resources/header.xlsx
Binary file not shown.