on 12-01-2021 10:39 AM
HI All,
Can you help to convert the xml to xls file which i need to post in the sftp in sap cpi.
Regards,
Sandhya
Hello Sandhya,
Please refer below blog and you need to use Apache POI libraries to generate XLS.
https://blogs.sap.com/2020/10/06/converting-xls-file-to-xml-format-with-cpi-groovy-script/
https://howtodoinjava.com/java/library/readingwriting-excel-files-in-java-poi-tutorial/
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sandhya.ravi see https://blogs.sap.com/2018/09/04/formatconversionbean-arrives-in-cpi/ and more discussion regarding this in https://answers.sap.com/questions/13279498/generate-output-file-with-xls-or-xlsx.html
Hello
You can use a converter to convert XML->CSV and then name the file accordingly to xls.
Thanks,
Marty
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sandhya
Sorry, I should have added some more details. Yes, if the requirement is to generate an xls file you would need to use the libraries linked by Sriprasad. What I should have added is that often times my customers just want a file that they can open in Excel, so using a csv file meets their requirements (and once you open the csv you can save it as xls).
Thanks,
Marty
User | Count |
---|---|
74 | |
8 | |
8 | |
8 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.