cancel
Showing results for 
Search instead for 
Did you mean: 

How can I do a Hybris API REST for generate download excel file?

tpizarro-1
Explorer
0 Kudos
256

Hi experts i'm trying to create a new endpoint that creates a new excel file but I don't have any idea to do this.

I found this example and I think it can help me to create the file for excel but i'm not sure, by the way if this works I don't know how to download it.

File file = File.createTempFile(prefix,".csv")
byte[] bom = [0xEF, 0xBB, 0xBF]; // small "hack" to make this work with Microsoft Excel
FileUtils.writeByteArrayToFile(file, bom, false);

FileUtils.writeStringToFile(file, "Something;Something;Something;Something;Something\n", "UTF-8", true);<br>

I expect a swagger endpoint for generate a new excel file and download it.

Accepted Solutions (0)

Answers (0)