1.3 KiB
Vendored
1.3 KiB
Vendored
Excel
Read from and write to Excel files in `.xls` or `.xlsx` formats with Kotlin DataFrame for seamless spreadsheet integration. Kotlin DataFrame makes it easy to load and save data from Excel files — perfect for working with spreadsheet-based workflows. Learn how to read and write Excel files using Kotlin DataFrame with just a single line of code.Kotlin DataFrame supports reading from and writing to Excel files in both .xls and .xlsx formats.
Requires the dataframe-excel module,
which is included by default in the general dataframe
artifact and in %use dataframe for Kotlin Notebook.
Read
You can read a DataFrame from an Excel file (via a file path or URL)
using the readExcel() method:
val df = DataFrame.readExcel("example.xlsx")
val df = DataFrame.readExcel("https://kotlin.github.io/dataframe/resources/example.xlsx")
Write
You can write a DataFrame to an Excel file using the
writeExcel() method:
df.writeExcel("example.xlsx")