Created
February 6, 2018 09:48
-
-
Save mosheeshel/4768e3b857322e7dc3433b44be40df00 to your computer and use it in GitHub Desktop.
Convert Xlsx To Csv Example using https://github.com/kenshoo/file-format-streaming-converter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.kenshoo.xlsx2csv.XlsxToCsvConverter; | |
import java.io.*; | |
public class Converter { | |
private final static String SOURCE_FILE_PATH = "/path/example-input.xslx" | |
private final static String DEST_FILE_NAME = "/path/example-result.csv" | |
//building a new converter with default parameters | |
private final XlsxToCsvConverter xlsxToCsvConverter = new XlsxToCsvConverter.Builder().build(); | |
public void function convert() { | |
final FileOutputStream outputStream = new FileOutputStream(new File(DEST_FILE_NAME)); | |
final InputStream inputStream = new FileInputStream((SOURCE_FILE_PATH); | |
xlsxToCsvConverter.convert(inputStream, outputStream); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment