Good morning
I need to add HTML text to my DOCX file using Apache POI.
This HTML has a photo. The link to the photo points to a resource that is visible only in the internal lan. So when the .docx is generatated when I open the document outside the lan I can't see the image.
Is it possible to save the imagine in the "media" folder of .docx and create a reference to it in the "_rels" folder?
If yes, where I can find the documentation that describe how to do it with Apache Poi?
Thanks
Regards
Related
I am creating one application in Liferay 6.2, it contains the Dynamic Data List which has Document & Media element associated with it. All work well but when user press Select button it open complex page for uploading the file. Which required lot of steps to upload single file.
Can this be simplified using hook; on pressing select it just open window to browse file as it is there in html, as currently functionality is confusing to client. And even file upload work automatically for guest users.
Any help will be highly appreciated, Thanks in advance.
I have created an agent that generates an Excel document and sends it to specific users through mail. The Excel file generation is done at run time and as such I am not storing the file anywhere. However, the issue is that the agent is supposed to be run on server. The server does not have MS Office installed it. How can this can be done through HTML.
Have a look at POI 4 XPages on OpenNTF that uses the Apache POI project to generate Word and Excel files.
You create a normal HTML page with a <TABLE> containing your record data. Then you need to set the Response contentType to "application/vnd.ms-excel".
The following MS tech note will detail how to write out the HTML.
http://support.microsoft.com/kb/260239
There is also sample XPage code in the XPages Cheatsheet. See the following link.
http://xpagescheatsheet.com
And Lekkim has sample code of setting the contentType in an agent (Java).
http://lekkimworld.com/2006/03/30/show_n_tell_thursday_setting_the_content_type_from_a_java_agent_30_mar_2006.html
If you need to send the Excel file by email then it's best to create a real Excel file with Apache POI.
I have a sharepoint document library where users upload files.
The allitems.aspx (the standard view) doesn't show correct icon for PDF and other files. Why is it so?
Also when users click on the document it doesn't open the file. For example clicking on a PDF document doesn't open using Acrobat reader even though it is installed on the server.
I even checked the file association by going to IE->Tools->Internet options->Set programs. The PDF is associated to acrobat reader.
Is there any other place to check?
Another issue is with the JPEG file. Within allitems.aspx it shows the image icon but when I click it tries to open using IE (which is fine) but doesn't load the image.
Are there any other settings? Please suggest. thanks.
In a webbapp hosted on its private server with Linux(Ubuntu Server 10) , the users will upload documents(MS Word, Excel, PowerPoint, PDF, etc..). We want to convert the files in SWF(Flash) objects , to embed them to the site. I saw a lot of Websites having this future. How they do it ?
There are a number of server side apps that can convert from DOC, PPT, etc to SWF format (trying searching for "PPT to SWF"). As you're using linux, then have a look at running openOffice. If you need to manipulate the content eg browse through slides in a PPT then have a look at a some of the commercial solutions that comes with an API.
I am new to Jsp. I am developing the tool for testing usage, and have succeeded to open the excel file in the browser from the jsp application. However, i am not able to modify or edit the opened excel sheet.
Please help how to modify the excel in the browser.
You cannot do this when displaying the file inline in a browser or doing a 'Open file' when getting a download popup. Simply because the file is then copied into client's disk file system. If you save the edits, it's saved in the same copy on the client's disk file system. This does not affect the original file in the server side in any way.
There are basically 2 ways to achieve your requirement:
Let client download a copy of the excel file and store it in the client side disk file system, so that the client can edit and save it locally. Give the client the possibility to upload the edited file back. In the server side just replace/backup the original file.
Use HTML forms the smart way to mimic an Excel sheet and use a Java Excel API (Apache POI, JExcelAPI, etc) to map between this data and the actual Excel file which is stored in the server side disk file system.
Have you looked at JExcel?
The FAQs also explain how to use the API with jsp.