I have developed an android app which exports the data from the SQlite database into a .csv file. I am able to export all the data successfully except for the BITMAP data. I am storing the bitmap as a Blob datatype in SQlite database and as byte[] in the corresponding classes. How can I export the byte[] into .csv file. Eventually, the csv file will be opened in MS Excel as a workbook. I have imported/used OPENCSV's CSVWriter classes. Any suggestions would help. Thanks in advance.
The Bitmap data which is actually an image taken from the camera thru' the android app is stored as byte[]. I tried exporting it by converting it into a string using byte[] encodedBytes = Base64.getEncoder().encode(Bitmap as byte[]) and then Stirng temp = new String(encodedBytes, StandardCharsets.UTF_8); String temp is saved into .csv file. But when I open the .csv file in Excel, I expected to see a bitmap, instead this is what I saw '/9j/4AAQSkZJRgABAQAAAQABAAD/4gIoSUNDX1BST0ZJTEUAAQEAAAIYAAAAAAIQAABtbnRyUkdCIFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAA.........'