Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

sending a excel in an attachment in email java

ByteArrayOutputStream bos = new ByteArrayOutputStream();
xlsFile.write(bos); // write excel data to a byte array
fos.close();

// Now use your ByteArrayDataSource as
DataSource fds = new ByteArrayDataSource(bos.toByteArray(), "application/vnd.ms-excel");
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sending #excel #attachment #email #java
ADD COMMENT
Topic
Name
2+8 =