Apache POI converts a PPT file into an image instance code,
This article describes how Apache POI converts a PPT to an image.
1. Apache POI Overview
Apache POI is a free and open-source cross-platform Java API written in Java. Apache POI provides APIs for Java programs to read and write Microsoft Office files.
You can view the official Apache POI documentation.
You can use either of the following methods to operate a PPT file on Apache POI:
1. POI-HSLF corresponding to the Powerpoint '97 (-2007)
Poi package conflict (excel), poi package conflict excel
1. jar packages
Involved poi
(1) poi-3.14.jar (HSSF)
Dependency: commons-logging-1.2.jar, log4j-1.2.17.jar, commons-codec.1.10.jar, junit.4.12.jar, hamcrest-core.1.3.jar
(2) poi-ooxml-3.14.jar (XSSF)
Dependency: poi-3.14.jar, poi-ooxml-schemas-3.14.jar, curvesapi-1.03.jar (do not know what is used, please leave a message to inform, thank you)
(
you want to operate both versions 2007 and later, you need to copy
Poi-ooxml-3.15.jarPoi-ooxml-schemas-3.15.jar
And copy the xmlbeans-2.6.0.jar in the ooxml-lib directory (but somehow, my jar file does not have dom4j. jar) this file, or add dom4j. jar to prevent errors.
2. Use junit for Excel testing
First, define the Excel Workbook object, Worksheet object, row
POI Excel and poiexcelIntroduction to POI and Excel
There are two mainstream JAVA tool kits for operating Excel: JXL and POI. Jxl only supports Excel 95 and 97,200, that is, excel with the suffix .xls. Poi can operate Excel 95 and later versions, and then use excel with the suffix of .xls(03)and .xlsx (07. Therefore, if you want to import and export Excel files in your project, you may need POI. let's take a look at several concepts of Excel, which is also the basis for POI operations. an excel
: ' 127.0.0.1:62382 ', Transport: ' Socket 'Run a direct error. Carefully read the error message after the discovery. Poi to manipulate versions of Excel 2007 and above need to use XSSF instead of the HSSF of the above code. found that the class library actually does not have XSSF related classes. The author dumbfounded said. So go to the POI website to view. Discover that the complete POI class library contains a lot of content. So I learned a little bit about the specific role of each part:Po
First, the definition of POIThere are two main toolkits for working with Excel in Java: JXL and POI. JXL can only manipulate Excel 95, 97, or 2000, which is the suffix of. xls. The POI can operate in Excel 95 and later versions of Excel with the suffix. xls and. xlsx two formats.The POI full name Poor obfuscation implementation, literally "poor fuzzy implementations", uses the POI interface to manipulate the read and write capabilities of Microsoft Office suite tools through Java. Official websi
working with Excel tables via JavaLdap.jar:JNDI the directory service and the jar required by the Ldao serverLdapbp.jar:JNDI the directory service and the jar required by the Ldao serverLog4j-1.2.15.jar: Provides logging capabilitiesMail.jar:java Send mail Jar packageNeethi-2.0.4.jar: Use the CXF jar packageODMG-3.0.JAR:ODMG is an ORM specification, Hibernate implements the ODMG specification, which is a core libraryOgnl-2.6.11.jar:struts2 in OGNL languageOjdbc14.jar:Oracle Database Driver Pack
-1.1.jar using the CXF jar packageOro-2.0.8.jar jar package required for validator frameworkOscache-2.1.jar caching Tools for Java objectsPoi-3.1-final-20080629.jar operation Exce Required jar PackagePoi-contrib-3.1-final-20080629.jar operation Exce Required jar PackagePoi-ooxml-3.6-20091214.jar provides actions for Office Word, Excel, Visio, and PPTPoi-ooxml-schemas-3.6-20091214.jar provides actions for Of
Next to the Java POI component-write Excel http://blog.csdn.net/chy555chy/article/details/52739711
Suppose there was such a demand--the leader singled out some of the employee's names (ready to be advanced), and needed only some of those employees ' information. You need to find out from the employee table some of the information they have with these employees.
The employee table is as follows
The advanced person is: "Chen Qi", "John", "Lin Eight", "Money Two", "Oriental Invincible" required fie
The jar packages used are as follows (can be downloaded directly to the POI Web site and can be downloaded in the attachment of the article):
Poi-3.9-20121203.jar
Poi-ooxml-3.9-20121203.jar
Poi-ooxml-schemas-3.9-20121203.jar
Xmlbeans-2.3.0.jar
There may be conflicting jar packages that need to be removed if the project Lib exists.
Xbean-2.1.0.jar
The specific code is as follows:Java code
Package com.meng
Today in the company need to do a import Excel file function, so the study, the reference on the Internet some of the information is finally done, in this record to prevent later forget how to get.I use poi3.8, so I need the jar package as follows:Poi-3.8.jarPoi-excelant-3.8-20120326.jarPoi-ooxml-3.8-20120326.jarPoi-ooxml-schemas-3.8-20120326.jarPoi-scratchpad-3.8-20120326.jarXmlbeans-2.3.0.jarAttached to t
ASP. net mvc uses EPPlus to export data to Excel, mvcepplus
I haven't written a blog for a long time. I want to update it today. Today we want to learn how to export data to an Excel file. Here I am using the free open-source Epplus component.
Source code download: https://github.com/caofangsheng93/ExcelExportInMvc
Introduction
This article describes how to export data to an Excel file. Most backend programs have the report function: export data displayed in the Grid to an Excel file, this artic
1. ASP. net mvc use EPPlus to export data to Excel. 1. asp. netepplus
I haven't written a blog for a long time. I want to update it today. Today we want to learn how to export data to an Excel file. Here I am using the free open-source Epplus component.
Source code download: https://github.com/caofangsheng93/ExcelExportInMvc
Introduction
This article describes how to export data to an Excel file. Most backend programs have the report function: export data displayed in the Grid to an Excel file,
Atitit.excel Export functionality Solution PHP java version c#.net Total collection . docx 1 .1. excel save format office2003 office2007/2010 format 1 1 . 2. Class Library Selection java. NET has Apache.poi available,php uses phpexcel1.8.0 11 . 3. issues that need to be addressed 21 . 4. Custom class Library Atiexcel 21 . 5. process details for Excel export - - export headers 21 . 6. process details for Excel export - - Export Data 21 . 7. The difference between phpexcel and po
Package used: Poi-ooxml-3.14.jar; Poi-ooxml.jar;1. To find the relevant files online, the most answer is to use Hssfworkbook to read:Poifsfilesystem Poifsfilesystem = new Poifsfilesystem (new FileInputStream (file)); Hssfworkbook workbook = new Hssfworkbook (Poifsfilesystem); result : The xlsx file cannot be identified;2. Specifically for the xlsx file find solutions, get used Xssfworkbook to deal with; result : xlsx files can be identified;3. Need to
.jar
Operation Exce Required JAR Package
Poi-contrib-3.1-final-20080629.jar
Operation Exce Required JAR Package
Poi-ooxml-3.6-20091214.jar
Provides actions for Word, Excel, Visio, and PPT for office
Poi-ooxml-schemas-3.6-20091214.jar
Provides actions for Word, Excel, Visio, and PPT for office
Poi-scratchpad-3.1-final-20080629.jar
library
npoi. DLL
Npoi. HSSF
Microsoft Excel BIFF (Excel 97-2003, doc) format read/write library
npoi. DLL
Npoi. SS
excel Common interface and Excel formula calculation engine
npoi. DLL
Npoi. Util
basic class library, which provides many useful functions for developing other read-write file format projects
npoi. OOXML. DLL
npoi. XSSF
(style);Cell = Row.createcell ((short) 2);Cell.setcellvalue ("Age");Cell.setcellstyle (style);Cell = Row.createcell ((short) 3);Cell.setcellvalue ("Birthday");Cell.setcellstyle (style); The fifth step, write the Entity data in the actual application of this data from the database,List List = Createsimpleexceltodisk.getstudent (); for (int i = 0; i {row = Sheet.createrow ((int) i + 1);Student stu = (Student) list.get (i);Fourth step, create the cell and set the valueRow.createcell ((short) 0). S
The POI component is used here, and the jar package that needs to be introduced is:Curvesapi-1.03.jarPoi-3.14-20160307.jarPoi-ooxml-3.14-20160307.jarPoi-ooxml-schemas-3.14-20160307.jarXmlbeans-2.6.0.jar
Reference:POI components: POI operations Excelhttp://lsieun.blog.51cto.com/9210464/1836601
1. The user list is exported into Excel1.1, listui.jspUI sectionJavaScript sectionExport
used to create and maintain various files that comply with office open XML (ooxml) standards and Microsoft's Ole 2 composite document format (ole2. You can use Java to read and create MS Excel files, modify MS Excel files, and use Java to read and create MS Word and mspowerpoint files. Apache poi provides a Java Excel operation solution for Excel97-2008 ).The following describes the functions of Apache poi:
Hssf-provides the ability to read and wri
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.