import com.groupdocs.conversion.Converter; import com.groupdocs.conversion.licensing.License; import com.groupdocs.conversion.options.convert.ConvertOptions; public class ConvertTXTtoXLSXusingJava { public static void main(String[] args) { // Set License to avoid the limitations of Conversion library License license = new License(); license.setLicense("GroupDocs.Conversion.lic"); // Import TXT document Converter converter = new Converter("input.txt"); // Get conversion option for final output document ConvertOptions txttoxlsx = converter.getPossibleConversions("xlsx") .getSource().getConvertOptions(); // Save the XLSX to disk converter.convert("result.xlsx", txttoxlsx); } }