Apache POI is very heavy library and it is almost impossible to directly use this library in android for multiple document types like .doc , .docx , .xlsx etc becuase of Methods size. Methods size is greater then 65k. But you can use it by removing classes from jars which are not required by you and it requires too much time and testing. I can suggest you to use Docx4j but is does not support .doc file. Method limit is also very close to 65k in docx4j also.
If you are beginner you can start by creating simple .doc file using Apache Poi here
http://apache-poi.1045710.n5.nabble.com/Creating-new-word-doc-with-POI-td2289680.html
Answer from Rahul Chauhan on Stack OverflowVideos
Apache POI is very heavy library and it is almost impossible to directly use this library in android for multiple document types like .doc , .docx , .xlsx etc becuase of Methods size. Methods size is greater then 65k. But you can use it by removing classes from jars which are not required by you and it requires too much time and testing. I can suggest you to use Docx4j but is does not support .doc file. Method limit is also very close to 65k in docx4j also.
If you are beginner you can start by creating simple .doc file using Apache Poi here
http://apache-poi.1045710.n5.nabble.com/Creating-new-word-doc-with-POI-td2289680.html
http://viralpatel.net/blogs/java-read-write-excel-file-apache-poi/comment-page-1/ http://poi.apache.org/poifs/how-to.html
try above link.i hope its useful to you.
Open your project-level build.gradle file.
Add below code snippet:
allprojects {
repositories {
// ...
maven { url 'https://jitpack.io' }
}
}
Then, inside buildscript, add an object ext as below. Now, define a attribute as poiVersion and assign the value 3.17 to it.
This is similar to defining a variable with name as "poiVersion" and assigning value as "3.17"
buildscript {
repositories {
...
}
ext {
poiVersion = '3.17'
}
dependencies {
...
}
}
And to access that variable you can use ${variable_name} as in your case, you used $poiVersion
$poiVersion is a placeholder. You need to replace it with a particular version