Can we create multiple pages in an excel file using Java, if possible using Apache POI library? I tried googling it, but it returns how we can create multiple sheets. However, we are looking for multiple pages in the excel sheet.
Thanks,
Masum
Related
The question is very simple but I've never seen it asked on stack. Will Apache POI work with a shared excel (meaning the excel is "co-authored" with other accounts as per Excel verbiage)? Will I still be able to create a pivot table using Java? How about upload a file to a certain cell?
Thanks.
I have an Excel file that has multiple graphic content (a normal excel file).
I am reading this file using POI API in java. I am able to convert the file to PDF table using iText jar.
But, the whole format is not copied into the PDF. (e.g., merged cells come into one column, and other formatting or settings are all gone).
A simple pdf table is created like below.
However when I convert with MS Excel and save as PDF i get the below output which has all the formatting details and looks perfect.
How do i retain the same format as in excel? I have done some googling on this and got some methods like OpenOffice API but all of them convert files on local machine. What if I send my tomcat build to client machine where OpenOffice is not installed ? Need some solution for that. Any help would be useful.
I read this article. The program (from website) allows the user to generate a customized Word document use Apache POI. I found the code from these two websites that can generate Excel file use agent, however the output is generate the view in Excel format only.
Is it possible to export view to Excel in specify format without use Apache POI?
Instead of using Apache POI, is it possible to write code in agent to generate a customized Excel file?
No and Yes. You deal with Java on XPages. You could reinvent the wheel and write all was POI does yourself, so yes you could.
You also could output a HTML table but send a header of application\vnd-excel to get the table automatically opened in Excel (but no formula here)
What would stop you from using POI?
Is there another way to read and get all the pictures in an excel file by not using this .getAllPictures() method?
is there a workaround to use the cfdocument tag to save a page/file as an excel sheet instead of a PDF file?
I already have a process set up to make pdf files and email them out and would like to give my customers the option of getting an excel file instead. It would be nice if I could reuse the code I already have instead of having to rewrite it in POI or something like that.
The type of data witihn a PDF is not usually the same type of data that makes sense for Excel. That being said, there are multiple other ways to create Excel spreadhseets.
In ColdFusion 9, it's native. Just use the cfspreadsheet. In CF8... well, it looks like you have POI. So use that. ;) Ben Nadel also has a nice wrapper for POI so you can consider that too.
The thing is - you will not be able to go from CFDOCUMENT to a spreadsheet since it is really a different type of data.
In ColdFusion 9 use the cfspreadsheet tag and/or spreadsheet functions. That creates a real Excel file.
In ColdFusion 8 and below the easiest way is to use the html table > Excel hack/trick. Put your data in a standard html table, save them in a file with a .xls extension and email them to your users. When the user opens the file Excel will convert the html table to an Excel spreadsheet. You could also send the content to the browser by adding at the top of the page. With this method make sure that you are only sending an html table for best results.