Getting Started with DroidXLS
Requirements
- Android API 26+ (Android 8.0 Oreo)
- Kotlin (Kotlin-only API)
- Gradle with Kotlin DSL
Installation
Step 1: Add JitPack repository
// settings.gradle.kts dependencyResolutionManagement { repositories { google() mavenCentral() maven { url = uri("https://jitpack.io") } } }
Step 2: Add the dependency
// app/build.gradle.kts dependencies { implementation("com.github.youichi-uda:droidxls:0.1.0") }
Step 3: Sync Gradle
Click "Sync Now" in Android Studio, or run ./gradlew :app:dependencies
Commercial License (Optional)
For commercial apps, add license initialization:
class MyApp : Application() { override fun onCreate() { super.onCreate() DroidXLS.initialize(this, licenseKey = "YOUR-LICENSE-KEY") } }
Purchase a license key on Gumroad ($99/year). Personal, open source, NPO, and educational use is free.
Your First Workbook
val workbook = Workbook() val sheet = workbook.addSheet("Hello") sheet["A1"].value = "Hello, DroidXLS!" sheet["A2"].value = 42 sheet["A3"].value = true // Save to a file val file = File(context.filesDir, "hello.xlsx") file.outputStream().use { workbook.save(it) }
Open hello.xlsx in Excel, Google Sheets, or LibreOffice to see your data.
Next Steps
- API Reference — full class and method documentation
- Formula Functions — all ~30 supported functions