Tag: java

read excel number special social security Number using java HSSFworkbook

I having a list of data from excel showing value “691222-01-5052” , I would like to read the value exactly as it show in excel, however, when i retrieve it from HSSFworkbook i got plain value “691222015052” without dashes. And i found that its format is social security number. How do i retrieve the value […]

Updating different sheets of Apache POI Workbook using multiple threads

I have a for loop which i would like to run parallelly. if (platform != null) { for (final String p : platform) { log.info(“Platform ” + p); executorService.submit(new Runnable() { @Override public void run() { // TODO Auto-generated method stub try { runService(p, config, url, title, report); } catch (Exception e) { // TODO […]

How to skip particular columns in apache.poi.xssf

I am using the below code in scala to convert xlsx file to csv. I can able read all the columns and rows, And i can able to convert the same in CSV. Here is the one question for me, While reading the column i don’t want write some of the columns in CSV(Example i […]

Shift rows Apache poi Not shifting the Drop down list in the cell

I am trying to shift the rows in excel. I am able to shift them but Drop down list is not shifting. Any Idea?? sheet.shiftRows(33, sheet.getLastRowNum(), 30)

Apache POI – XSSFWorkbook

I am trying to update our code to use XSSFWorkbook instead of HSSFWorkbook. I have the following jars added to the project: dom4j-1.6.1.jar poi-3.11.jar xmlbeans-2.3.0.jar poi-ooxml-3.11.jar When I try to run the part in the application that creates an excel sheet for our customer I get the following stack trace: java.lang.NoClassDefFoundError: org/openxmlformats/schemas/spreadsheetml/x2006/main/CTWorkbook$Factory at org.apache.poi.xssf.usermodel.XSSFWorkbook.onWorkbookCreate(XSSFWorkbook.java:383) at […]

HXTT driver authentication issue

I am using HXTT excel driver to get data from an excel file. File is in shared folder which asks username and password to access it’s files. When I try to connect to it by HXTT driver after accessing folder by file explorer it connects successfully but when I try to connect, providing username and […]

Reading an xls document in java, correct it with an ArrayList but no output

Hey Guys I hope some of you maybe could help me. I wrote a little Java programm which takes an xls excel data. After this the complete xls data will be moved into an ArrayList. Then I checked with diffrent for loops if some of the single lines are double. If it is Double, the […]

Java GWT cannot open downloaded xlsx file

I’m new to GWT and in my company i was asked to make some changes in one of our applications. Currently the Program generates reports in .xls format. Now we want to change it to .xlsx public class Download extends HttpServlet { private static final long serialVersionUID = 5580666921970339383L; @Override public void doPost(HttpServletRequest request, HttpServletResponse […]

JAVA: Export ArrayLists into excel table with NEW sheet everytime

I have two ArraysLists (X and Y) with different number of elements. Now, i want to export them among themselves into an excel-table. X and Y should have their own columns side by side. Example: X = [2 , 6 , 0], Y = [5 , 8 , 3] X | Y —— 2 | […]

JTable -> Excel -> JTable – issue with extension

I have a quick question. I made program which generates jtable, than you can fill this table with some values, and than save whole table to excel. At the begging beginning I defined file: File f = new File(“C:\Users\Gregory\Desktop\test.xls”); Here is class which export JTable to excel: public void exportTable(JTable table, File file) throws IOException […]

MS Excel Spreadsheet is the best Office Software, Excel VBA and Excel Formulas make Spreadsheet work faster.