Hi @Community Alums 

you can use the following conversion:

 

var originalContentsInFile = gs.base64Decode(GlideStringUtil.base64Encode(bytesInFile));

 

 Maik

Not applicable

Hi @Maik Skoddow , 

Thanks for your reply, Let me check

Not applicable

Hi @Maik Skoddow , I checked but it is not working, Unable to fetch records from attachment (.xlsx)

Hi @Community Alums 

in your first code you wanted to load a CSV file which is text based and that was the reason for my solution. Now you want to load an Excel file which is a native and binary format. Here my approach will not work. You really should be clear in your issue description and requirement!

So please have a take a look at the GlideExcelParser API which provides a way to extract data from Excel files.

Maik

View solution in original post

Not applicable

Hi @Maik Skoddow , Sorry for the confusion, but GlideExcelParser API working fine for me, Thanks!