Skip to content

Commit 9182ad6

Browse files
committed
- Fixed variable use in added function for documentation
Signed-off-by: LeandroC89 <[email protected]>
1 parent 679d7ff commit 9182ad6

File tree

2 files changed

+6
-6
lines changed
  • docs/StardustDocs/topics
  • tests/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api

2 files changed

+6
-6
lines changed

docs/StardustDocs/topics/write.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ Add new sheets without using Apache POI directly by using a parameter to keep us
123123

124124
```kotlin
125125
// Create a new Excel workbook with a single sheet called "allPersons", replacing the file if it already exists -> Current sheets: allPersons
126-
val allPersonsSheet = df.writeExcel(file, sheetName = "allPersons")
126+
df.writeExcel(file, sheetName = "allPersons")
127127
// Add a new sheet to the previous file without replacing it, by setting keepFile = true -> Current sheets: allPersons, happyPersons
128-
val happyPersonsSheet = df.filter { person -> person.isHappy }.remove("isHappy").writeExcel(file, sheetName = "happyPersons", keepFile = true)
128+
df.filter { person -> person.isHappy }.remove("isHappy").writeExcel(file, sheetName = "happyPersons", keepFile = true)
129129
// Add a new sheet to the previous file without replacing it, by setting keepFile = true -> Current sheets: allPersons, happyPersons, unhappyPersons
130-
val unhappyPersonsSheet = df.filter { person -> !person.isHappy }.remove("isHappy").writeExcel(file, sheetName = "unhappyPersons", keepFile = true)
130+
df.filter { person -> !person.isHappy }.remove("isHappy").writeExcel(file, sheetName = "unhappyPersons", keepFile = true)
131131
```
132132

133133
<!---END-->

tests/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/Write.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ class Write : TestBase() {
126126
useTempFile { file ->
127127
// SampleStart
128128
// Create a new Excel workbook with a single sheet called "allPersons", replacing the file if it already exists -> Current sheets: allPersons
129-
val allPersonsSheet = df.writeExcel(file, sheetName = "allPersons")
129+
df.writeExcel(file, sheetName = "allPersons")
130130
// Add a new sheet to the previous file without replacing it, by setting keepFile = true -> Current sheets: allPersons, happyPersons
131-
val happyPersonsSheet = df.filter { person -> person.isHappy }.remove("isHappy").writeExcel(file, sheetName = "happyPersons", keepFile = true)
131+
df.filter { person -> person.isHappy }.remove("isHappy").writeExcel(file, sheetName = "happyPersons", keepFile = true)
132132
// Add a new sheet to the previous file without replacing it, by setting keepFile = true -> Current sheets: allPersons, happyPersons, unhappyPersons
133-
val unhappyPersonsSheet = df.filter { person -> !person.isHappy }.remove("isHappy").writeExcel(file, sheetName = "unhappyPersons", keepFile = true)
133+
df.filter { person -> !person.isHappy }.remove("isHappy").writeExcel(file, sheetName = "unhappyPersons", keepFile = true)
134134
// SampleEnd
135135
}
136136
}

0 commit comments

Comments
 (0)