// for more examples, please visit https://github.com/aspose-cells-cloud/aspose-cells-cloud-java try { // Get ClientID and ClientSecret from https://dashboard.aspose.cloud/ String clientId = "XXXX-XXXX-XXXX-b4d2-b9809741374e"; String clientSecret = "XXXXXXXXXXXXX7e741a29987bb"; // create an instance of CellsApi using client credentials CellsApi api = new CellsApi(clientId,clientSecret); // name of input XML file String name = "source.xml"; // resultant file format String format = "JSON"; // load file from local system File file = new File("/Users/nayyershahbaz/Downloads/"+name); // upload input XML to the cloud storage api.uploadFile("input.xml", file, "internal"); // perform document conversion operation File response = api.cellsWorkbookGetWorkbook(name, password,format, isAutoFit, onlySaveTable, null,"internal", "Resultant.json","internal", null); // print success message System.out.println("The XML file successfully converted to JSON format !"); }catch(Exception ex) { System.out.println(ex); }