Spire.XLS for Java
Java Excel Library – Create Read Modify Print Convert Excel Documents in Java
- Overview
- Features
- Support
- What's New
- Live Demo
Spire.XLS for Java is a professional Java Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets without using Microsoft Office or Microsoft Excel.
Spire.XLS for Java supports both for the old Excel 97-2003 format (.xls) and for the new Excel 2007, Excel 2010, Excel 2013, Excel 2016 and Excel 2019 (.xlsx, .xlsb, .xlsm), along with Open Office(.ods) format. Spire.XLS for Java offers a wide range of features of operating Excel worksheets on Java applications, such as creating, reading, editing, converting and printing Excel worksheets, finding and replacing data, creating charts, creating auto filters, reading and writing hyperlinks, merging/unmerging cells and files, grouping/ungrouping rows and columns, freezing/unfreezing panes, adding digital signatures, encrypting/decrypting Excel workbooks etc.
-
Convert
-
Export
-
Validate
-
Formula
-
Format
-
Chart
-
Pivot Table
-
Group
-
Merge
-
Highlight
Convert Excel to PDF
Whenever you need to share an important Excel report with a partner, it's best to convert the file to PDF to ensure it looks the same as it does on your device.
Export Data from Database to Excel
When data is exported from a database to Excel, it can be analyzed and visualized, as well as viewed and processed by users who are not database users.
Apply Data Validation
Data validation in Excel controls what kind of data can be entered into a certain cell, which ensures that all data entries are accurate and consistent.
Insert Formulas and Functions
Formula is an expression that calculates values in a cell or in a range of cells, while function is a predefined formula already available in Excel. Both formulas and functions are very useful when you need to calculate numbers or solve math problems in Excel.
Apply Conditional Formatting
Conditional formatting is a helpful feature that allows applying special formats to cells meeting specific criteria. It is often used to emphasize or differentiate data stored in worksheets.
Create a Chart
Chart is a fantastic tool to visually group and analyze data. It provides the reader with the structure of the data set and displays the data in a graphical representation, making it easier for most users to see the data.
Create a Pivot Table
Pivot table is a kind of interactive table that allow users to quickly categorize, calculate, summarize and analyze large amounts of data in a concise tabular format.
Group Rows or Columns
For worksheets with large amounts of data, grouping rows or columns that contain similar information can make the worksheet more compact and understandable.
Merge Excel Files
Merging Excel files with associated content can help us work with worksheet data more easily and also make it easier to share and read the contents of our workbooks.
Find and Highlight
You can find all cells containing a specific value and highlight them with the same background color to make the value outstanding and more easily to be found out.
JAVA
Standalone Java Component
100% independent Java Excel class library
Doesn't require Microsoft Office installed on system.
VERSION
- Excel 97-2003
- Excel 2007
- Excel 2010
- Excel 2013
- Excel 2016
- Excel 2019
- OpenOffice
OPERATION
Powerful Toolset, Multichannel Support
-
Import and Export data
-
Reports
-
Manage Comments
-
Work with Pivot table
-
Work with Excel Charts
-
Images and shapes
-
Find Replace Highlight
-
Manage Hyperlinks
-
Print
-
Header and Footer
-
Text and Image watermark
-
Conditional Formatting
-
Excel Formula
-
Set auto-filters & page breaks
-
Merge Split Cells and files
-
Protect, Encrypt, Decrypt
-
Add digital signature
CONVERSION
Conversion File Documents with High Quality
-
TEXT
-
XPS
-
SVG
-
PDF
-
XML
-
Image
XLsx,XLSM,XLSB,ODS
-
CSV
-
HTML
-
PNG
-
BMP
-
JPEG
-
EMF
-
TIFF
-
Chart
MAIN FUNCTION
Only Spire.XLS for Java, No Microsoft Office
Spire.XLS for Java is a totally independent Excel library, Microsoft Office or Microsoft Excel is not required in order to use Spire.XLS for Java.High Quality File Conversion
Spire.XLS for Java allows converting files from Excel to PDF, Excel to HTML, Excel to CSV, Excel to Text, Excel to Image, Excel to XML, Excel to SVG, Excel to PostScript and Excel to XPS. And on the other hand, most of popular files can be transferred to Excel back.Easy Integration
Spire.XLS for Java can be easily integrated into Java applications.Support a Rich Set of Excel Elements
Spire.XLS for Java supports a rich set of Excel elements, including comment, pivot table, charts, shapes, tables, images, hyperlinks, reports, add digital signature, text/image watermark, Excel formula and many more. Spire.XLS for Java also embeds many flexible options for displaying worksheets, such as page breaks, zoom-setting, freeze panes, headers/footers, print excel files, print paper size and print area etc.Commercial Edition $999
Compared with Free Spire.XLS for Java, the commercial edition of Spire.XLS for Java has no limitation on the number of worksheets and rows. It is more comprehensive in processing Excel files.
Free Edition $0
Free version is limited to 5 sheets per workbook and 200 rows per sheet. This limitation is enforced during reading or writing XLS files. When converting Excel files to PDF files, you can only get the first 3 pages of PDF file.
GET STARTED
Free Trials for All Progress Solutions
Here is a brief summary of Spire.XLS for Java features.
File Format Supports
- Spire.XLS for Java offers support both for the old Excel 97-2003 format (.xls) and for the new Excel 2007,Excel 2010, Excel 2013, Excel 2016 and Excel 2019 (.xlsx, .xlsb, .xlsm), along with Open Office(.ods) format.
- Load and save documents in the tab delimited file format.
- Comprehensive support of the CSV format to interact with a variety of applications.
- Easily extract text by saving in plain text format.
Conversion
- Excel to HTML/XML/CSV
- XML/CSV to Excel
- Excel to Image
- Excel to Text
- Excel to PDF
- Excel to XPS
- Excel to SVG
Contents Features
- Create and Edit Excel
- Find and Replace Data
- Print excel files
- Import/Export data from a DataTable, DataView, Array, DataGrid etc.
- Save Excel to file/Stream or as web response
- Create charts
- Read and write hyperlinks
- Create auto filters
- Implement Data Sorting
- Implement Data Validations
- Merge/Unmerge Cells and files
- Group/UnGroup Rows and Columns
- Insert/Delete or Hide Rows, Columns and Sheets
- Calculate Complex Excel Formula
- Freeze/Unfreeze Panes
- Insert Hyperlinks to link data
- Protect/Unprotect Worksheets
- Create Pivot Tables
- Encrypt/Decrypt Files
- Load/Save Excel VBA
- Merge data into Excel with MarkerDesigner
- Add digital signature
Formatting Features
- Apply all characters formatting in the cells including fonts, colors, effects, fill and shading
- Apply all the Number Format Settings (supported in MS Excel) for the cells.
- Set all types of Text Alignment settings.
- Apply different kinds of Font Settings for the cells.
- Apply different Colors to Cells, Fonts, Gridlines, Graphic objects etc.
- Apply different Rich Text formatting in a single cell.
- Apply different Border Settings on cells.
- Apply different Background Patterns on cells.
- Apply gradient Background Patterns on cells.
- Apply Format Settings on a Worksheet, Row, Column or a range of cells etc.
Page Setup Features
- Adjust your page orientation, scaling, paper size.
- Specify your margins and page centering.
- Create or edit your header and/or footer with image.
- Set print area, print titles, or turn on gridlines etc.
- Managing Page Breaks
We guarantee one business day Forum questions Reply. |
We guarantee one business day E-mail response. |
Free Customized service for OEM Users. |
|||||||||||
Skype name: iceblue.support |
Apply for a Free Trial License File. |
||||||||||||
This is the list of changelogs of Spire.XLS for Java New release and hotfix. You can get the detail information of each version's new features and bug solutions.
Version: 14.3.0
Function | API |
Calculate document | public String excelGenerate(List |
Merge ranges | public String excelMerge(CellRange descRange, List |
Generate images | public InputStream imageGenerate(String description) |
Generate images with specified size | public InputStream imageGenerate(String description, ImageGenerationModel model, ImageGenerationSize size) |
Upload files | public String uploadFile(String fileName, InputStream stream) |
Upload workbooks | public String uploadWorkbook(Workbook workbook) |
Ask a question about the document | public String documentSearch(String question, String file_server_path, boolean enableHistory) |
public String documentSearch(String question, String file_server_path, Map |
|
Search | public String search(String question, String language, boolean enableHistory) |
Translate worksheets | public String excelTranslate(List |
Translate ranges | public String excelTranslate(List |
Fill out Excel worksheets | public String excelFill(CellRange dataRange, CellRange descRange, boolean containTitle, List |
public String excelFill(CellRange dataRange, CellRange descRange, boolean containTitle, List |
|
Question | public String ask(String question, boolean enableHistory) |
Clear user history | public String resetUserHistory() |
Clear history sessions | public String resetChatHistory(String sessionid) |
Version: 14.2.4
Category | ID | Description |
New feature | SPIREXLS-5046 | Supports saving Kingdraw drawn OLE objects as images.
com.spire.xls.Workbook workbook = new com.spire.xls.Workbook(); workbook.loadFromFile("data.xlsx"); Worksheet sheet = workbook.getWorksheets().get(0); Object o = sheet.getCellRange("C2").getFormulaValue(); if (sheet.hasOleObjects()) { for (int i = 0; i < sheet.getOleObjects().size(); i++) { IOleObject oleObject = sheet.getOleObjects().get(i); OleObjectType oleObjectType = sheet.getOleObjects().get(i).getObjectType(); byte[] picUrl = null; switch (oleObjectType) { case Emf: picUrl = oleObject.getOleData();; break; } if (picUrl != null) { byteArrayToFile(picUrl, "out.png"); break; } } } } public static void byteArrayToFile(byte[] datas, String destPath) { File dest = new File(destPath); try (InputStream is = new ByteArrayInputStream(datas); OutputStream os = new BufferedOutputStream(new FileOutputStream(dest, false));) { byte[] flush = new byte[1024]; int len = -1; while ((len = is.read(flush)) != -1) { os.write(flush, 0, len); } os.flush(); } catch (IOException e) { e.printStackTrace(); } } |
Bug | SPIREXLS-5072 SPIREXLS-5099 |
Fixes the issue that the content was incorrect when converting Excel to PDF. |
Bug | SPIREXLS-5076 | Fixes the issue that the images were incorrect after copying content. |
Bug | SPIREXLS-5088 | Fixes the issue that the program threw "A workbook must contain at least a visible worksheet" when converting XML to Excel. |
Bug | SPIREXLS-5089 | Optimizes the setting of Locale in the setValue method. |
Bug | SPIREXLS-5095 | Fixes the issue that the program threw "NullPointerException" when copying tables. |
Bug | SPIREXLS-5098 | Fixes the issue that the text content styles changed when converting Excel to HTML. |
Version: 14.1.1
Category | ID | Description |
Bug | SPIREXLS-5020 | Fixes the issue that the margins of saved XLSX documents were incorrect when printed and previewed with the WPS tool. |
Bug | SPIREXLS-5037 | Fixes the issue that the obtained fill color value for cells without fill color was (0,0,0). |
Bug | SPIREXLS-5047 | Fixes the issue that the border styles of cells were lost when converting HTML documents to XLSX documents. |
Version: 13.12.12
Category | ID | Description |
New feature | SPIREXLS-4971 | Adds the worksheet.getCellImages() method to retrieve embedded images added with WPS tools.
Workbook workbook = new Workbook(); workbook.loadFromFile("sample.xlsx"); Worksheet sheet = workbook.getWorksheets().get(0); ExcelPicture[] picture = sheet.getCellImages(); for (int i = 0; i < picture.length; i++) { ExcelPicture ep = picture[i]; BufferedImage image = ep.getPicture(); ImageIO.write(image,"PNG", new File(outputFile + String.format("pic_%d.png",i))); } |
Bug | SPIREXLS-4971 | Fixes the issue that the program threw an exception "Index is less than 0 or more than or equal to the list count." when getting inline pictures added with WPS tools. |
Bug | SPIREXLS-4996 | Fixes the issue that the program suspended when loading Excel documents. |
Bug | SPIREXLS-5010 | Fixes the issue that the font size of the retrieved text was incorrect. |
Bug | SPIREXLS-5021 | Fixes the issue that the coordinate axes data of charts in the saved Excel document were incorrect. |
Bug | SPIREXLS-5024 | Fixes the issue that the program threw a java.lang.StringIndexOutOfBoundsException when converting an XLSM document to PDF. |
Version: 13.11.6
Category | ID | Description |
Bug | SPIREXLS-4966 | Fixes the issue that the application threw the "java.lang.NullPointerException" exception when converting worksheets to HTML documents. |
Bug | SPIREXLS-4967 | Fixes the issue that excessive "0" characters occurred in the text content when converting Excel documents to HTML documents. |
Bug | SPIREXLS-4968 | Fixes the issue that the cell content was partially lost when converting Excel to PDF after setting the cell to auto-fit row height. |
Bug | SPIREXLS-4970 | Fixes the issue that incorrect content was obtained from merged cells. |
Bug | SPIREXLS-4975 | Fixes the issue that incorrect results were returned by string searches. |
Bug | SPIREXLS-4977 | Fixes the issue that the chart references were updated incorrectly when copying worksheets. |
Bug | SPIREXLS-4990 | Fixes the issue that incorrect DisplayedText values were obtained. |
Version: 13.11.0
Category | ID | Description |
New feature | SPIREXLS-4919 | Supports retrieving comments from the Name Manager.
Workbook workbook = new Workbook(); workbook.loadFromFile(inputFile); INameRanges nameManager = workbook.getNameRanges(); StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < nameManager.getCount(); i++) { XlsName name = (XlsName) nameManager.get(i); stringBuilder.append("Name: " + name.getName() + ", Comment: " + name.getCommentValue() + "\r "); } workbook.dispose(); |
Bug | SPIREXLS-4911 | Improves the speed of converting Excel to PDF on Linux. |
Bug | SPIREXLS-4860 | Fixes the issue that the page size setting failed after setting the setSheetFitToPage method when converting Excel to PDF. |
Bug | SPIREXLS-4894 | Fixes the issue that removing pivot table borders failed. |
Bug | SPIREXLS-4906 | Fixes the issue that text was reversed and cropped after converting Excel to PDF. |
Bug | SPIREXLS-4923 | Fixes the issue that the program threw "Invalid ValidationAlertType" when reading an Excel file. |
Bug | SPIREXLS-4924 | Fixes the issue that the program threw "Input string was not in the correct format" when reading an Excel file. |
Version: 13.10.0
Category | ID | Description |
New feature | SPIREXLS-4896 | Supports verifying whether the password for restricted editing is correct.
worksheet.checkProtectionPassword(String password) |
Bug | SPIREXLS-4879 | Fixes the issue that the content of the document was incorrect when converting Excel to PDF. |
Bug | SPIREXLS-4890 SPIREXLS-4908 |
Fixes the issue that the content in charts was incorrect when converting Excel to images. |
Bug | SPIREXLS-4893 | Fixes the issue that table borders were lost when converting Excel to OFD. |
Bug | SPIREXLS-4900 | Fixes the issue that the program threw "Invalid ValidationAlertType string val" when loading an Excel file. |
Bug | SPIREXLS-4901 | Fixes the issue that pivot table calculated fields couldn’t be added as column fields. |
Bug | SPIREXLS-4902 | Fixes the issue that the names of pivot table calculated fields were automatically prefixed with "Sum of". |
Bug | SPIREXLS-4910 | Fixes the issue that the program threw "java.lang.ClassException" when loading an Excel file. |
Version: 13.9.2
Category | ID | Description |
New feature | SPIREXLS-4731 | Optimizes the conversion time from Excel to PDF. |
New feature | SPIREXLS-4852 | Adds the function of finding cells based on regular expressions. |
Bug | SPIREXLS-3760 | Fixes the issue that the program threw "sun.security.x509.X509CertImpl" exception when using spire.xls.jar under IBM websphere. |
Bug | SPIREXLS-4873 | Fixes the issue that the program threw "Input string was not in the correct format" exception when loading documents. |
Version: 13.8.1
Category | ID | Description |
New feature | SPIREXLS-4797 | Supports setting images for the first page header and footer.
//Set image for first page header worksheet.getPageSetup().setFirstLeftHeaderImage(img_LFH); worksheet.getPageSetup().setCenterHeaderImage(img_LCH); worksheet.getPageSetup().setRightHeaderImage(img_LRH); //Set image for first page footer worksheet.getPageSetup().setLeftFooterImage(img_LFF); worksheet.getPageSetup().setCenterFooterImage(img_LCF); worksheet.getPageSetup().setRightHeaderImage(img_LRF); //Set image size worksheet.getPageSetup().setFirstLeftHeaderPictureHeight(50); worksheet.getPageSetup().setFirstLeftHeaderPictureWidth(50); worksheet.getPageSetup().setFirstCenterHeaderPictureHeight(50); worksheet.getPageSetup().setFirstCenterHeaderPictureWidth(50); worksheet.getPageSetup().setFirstRightHeaderPictureHeight(50); worksheet.getPageSetup().setFirstRightHeaderPictureWidth(50); |
New feature | SPIREXLS-4831 | Supports getting the hyperlinks of pictures.
ExcelPicture picture = sheet.getPictures().get(0); HyperLink link = picture.getHyperLink(); String address = link.getAddress(); |
Bug | SPIREXLS-4078 | Fixes the issue that Excel files saved in Tomcat had garbled formulas. |
Bug | SPIREXLS-4737 | Fixes the issue that opening files converted from Excel to PDF in Adobe resulted in an error. |
Bug | SPIREXLS-4770 | Fixes the issue that the content formatting of files converted from Excel to images was incorrect. |
Bug | SPIREXLS-4800 | Fixes the issue that setting the maximum row was not taking effect. |
Bug | SPIREXLS-4821 SPIREXLS-4840 |
Fixes the issue that the program threw "NullPointerException" when converting Excel to PDF. |
Bug | SPIREXLS-4822 | Fixes the issue that Excel files saved in WinServer2012 had garbled content in dropdown menus. |
Bug | SPIREXLS-4829 | Fixes the issue that the program threw "NullPointerException" when loading Excel files created with the new version of WPS. |
Bug | SPIREXLS-4837 SPIREXLS-4839 |
Fixes the issue that the program threw "NullPointerException" when loading Excel files. |
Version: 13.7.3
Category | ID | Description |
Bug | SPIREXLS-4745 | Optimizes the time consumption of getting the number of pages. |
Bug | SPIREXLS-4758 | Fixes the issue that the converted PDF failed to open with adobe under the regional setting of Portugal and Brazil. |
Bug | SPIREXLS-4759 | Fixes the issue that the program threw an exception NullPointerException when using calculateAllValue. |
Bug | SPIREXLS-4760 | Fixes the issue that the contents overlapped when converting Excel to pictures. |
Bug | SPIREXLS-4761 | Fixes the issue that the number of pages obtained was incorrect. |
Bug | SPIREXLS-4779 | Fixes the issue that extra content appeared when converting Excel to PDF. |
Bug | SPIREXLS-4780 | Fixes the issue that the content was lost when converting Excel to PDF. |
Request free customized demo just for you. |
Tab 1
Upload
Convert to
Tab 2
Tab 3
Tab 4
Mathematic Functions:
Calculate symbol : | Calculate Data: |
Logic Function:
Calculate symbol : | Calculate Data: |
Simple Expression:
Calculate symbol : | Calculate Data: |
MID Functions:
Text : | Start Number: |
Number Charts: |
Option:
Excel Version: |
Tab 5
Data
Option
Excel Version: |
If you don't find the function you want, please fill in a form to request a free demo from us. Make sure the demo you want meets the following requirements:
- It is a small project that implements a particular scenario.
- It relates to our libraries stored on E-iceblue online store.
- It costs less than 2 hours for us to complete it.
- It is not a bug report.
- It is not a feature request.