I need to create an XWPFRun with character spacing expanded by 1 pt. I tried the methods setCharacterSpacing and setKerning but to no avail. I also found no code examples or documentation for either method. Any advice? Answer For me XWPFRun.setCharacterSpacing works. What one needs to know is that the measurement unit is TWIP – twentieths of an inch point.
Tag: apache-poi
Converting Date and Gender to String using Apache-poi [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question How can I set Date and Gender that is in the database? Answer To write Date and Gender in Cell you need to convert them
Java code exporting workbook to current user PC instead of the actual web app host
I have a spring MVC project that I have develop for my team at work. I have an endpoint that create a workbook using apache poi, then export to .xlsx file, but my code appeared to write to file on the application host instead of user’s computer. I know I’m missing something, but I try what I found on internet
Unable to open Excel file after excecuting my java apache poi program and i am using file output stream
I am using Apache poi to extract Mysql data to an Excel file. The code is running correctly but when I am trying to open the excel file it is showing error. I think file output stream is creating problem as it converts data into byte codes. i tried every thing but doesn’t work. my excel file is not working
How to copy paragraphs include character styles to new document in apache poi?
I’m trying to copy a certain number of paragraphs from an ms word file into a new one with Apache Poi. Although I copy paragraph styles without problem but I can’t transfer inline character styles to new file, how to get and apply character styles to new new doc? Answer
POIXMLException when updating excel file with apache-poi
When I try overwrite existing excel file, I get this error message: By the way, there is no problem if I try write a new excel file.So Its working correctly but I can’t update existing file. What am I doing wrong? There is my code: Answer Multiple issues in your code. If you are creating an OPCPackage or a XSSFWorkbook
Reading Excel File Column in Java
I have a sample of Excel data that needs to be read and store in the database. Example: I have tried to use Apache POI in reading data by row. But how do I get the Name and the amount from the column at the same time? Something like this Any help would be appreciated. Thanks Answer Result:
how to solve java.lang.NoSuchFieldError: RETURN_NULL_AND_BLANK in java
here ssa_msg_daily contains blank or null values in the table,so while compiling i am getting error as Exception in thread “main” java.lang.NoSuchFieldError: RETURN_NULL_AND_BLANK occurs @ XSSFWorkbook workbook = new XSSFWorkbook(); how can i handle this situation and i am using the resultset to convert to spreedsheet using apache poi Answer You’ve got a classpath issue. You have a mix of
Change font style in a specific word from docx file using Java Apache POI
I’m using Apache POI XWPF to manipulate a docx file, I need to update some words of paragraph and change the font style of it. For updating a single word, it’s ok, let’s assume that my docx content has the paragraphs bellow: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer pretium sodales nisl, ut ornare ligula vehicula vitae. Fusce
Second Line in an Apache-POI chart with seperate axis
Hi this code taken from the answer here is working as expected, but I want exactly the same Chart but in an Excel-Sheet So I modified the code like this to get an XLSX document, but the Chart isn’t the same Answer The problem is that for a Word (XWPF) chart, the data are stored in a Excel workbook which