Insert Image into Excel - Java - java

I am working on a java web application where i have to show an image on excel file.
i used the java file iopo to write the image to the excel file.
Issue is when the user mail this to client the image does not show up
Is there any way to embed the image into the excel file using java with/without using any external API.

You can use Apache POI: http://poi.apache.org
See especially http://poi.apache.org/spreadsheet/quick-guide.html#Images

You must use an external library as there is no standard Excel API for Java.
You should use something along the lines of JExcelAPI.

Related

Unable to compress excel file (XLSX or XLS) using java

In one of java sprint MVC based application, i need to compress size of excel file, because application is unable to send email attachment.
any one please help
The formats with 'x' at the end are actually zip archives, so any more compression is moot. You could unzip the Excel sheet and look for data based compression.
Images in lower resolution.
Excel XML with less repetition of styles, attributes.
Repeated expressions.
Maybe there are embedded fonts.
Here is a tutorial of how to Zip single/multiple files in Java which should get you what you require:
http://www.kscodes.com/java/how-to-compress-files-in-java/

read a powerPoint file using Java or Talend then upload it to SalesForce

I need to read a power-point file using Talend or Java then upload it to Salesforce and create it under Documents (standard Object).
Maybe convert it to a binary file?
Or there is an option in talend to do it?
Or creating a java method under Talend that do the job?
any help in that process will be appreciate it.
I found a way to read the ppt file but without any return in the link
http://www.coderanch.com/how-to/java/ReadPowerPoint
Talend cannot deal with powerPoint file, but you can create a static routine that use Apache POI API for that and invoke it through tJava component, to upload file you can use tFTPPut component.

Adding data in Excel file without closing it

I am currently using Apache POI to enter data into Excel file. The only problem is I can not keep the file open if I have to append data to the same file. Are there any specific sample codes which would allow me to do so?
My basic requirement is to fetch Runtime data from a place (this I am able to do) and add it to the Excel sheet while the file is still open.
Any suggestions?
I don't think that this is possible without a C# addon or some kind of macro. You could write a simple C# addon for Excel that connects to your java programm and recieves the realtime data. The addon will write it to the spreadsheat then.

How to export chart table data to PDF in extjs?

I try to export my chart table data from DB but have no idea how to export PDF.
Have any suggestion use to export chart table data by using existing extjs information to PDF file? Urgent..!
I don't think extjs has anything built-in to create pdfs. So you will either need to create it on the server or maybe you can use a client side js libary for pdf generation (e.g. http://code.google.com/p/jspdf/)
Generally, you would need your server to assist with this. What kind of server do you use?
Otherwise, you could try https://github.com/mozilla/pdf.js
I am researching about this, I think you first have to convert your chart into a picture and then use a PDF generator library and include this picture on it.
To convert chart to picture:
http://dev.sencha.com/deploy/ext-4.1.0-gpl/examples/charts/Area.js
To generate PDF on c# if you are using it on server side it could be pdfsharp or itext

Storing data in Excel file from an android application

My application generates data and i want to share this data, like transfer to my PC and work or send it to others as excel sheet.
Can we store data from an android application to a Excel sheet programatically ? Then how do we open and Excel file and write to it ?
In theory, libraries like Apache POI and JExcel should work on Adroid but there are some issues with them at this point.
Only option is to generate XL that can be read by Excel. Steps are:
Create an Excel file on PC with formatting that you need
Save that file as XML, Excel will insert Tags for formatting/ formulas
Write java code to generate similar XML file on Android
On Android, save this XML file on SD Card
Transfer the XML to PC and open that in Excel
Take a look at this tutorial, How to create file in SD-Card.

Categories