Questions tagged [apache-poi-4]

108 questions
0
votes
0 answers

Read from the provided column index/name to last column : apache poi

Here is the sample data. First row is header. Demo1 Demo2 Demo3 Demo4 Demo5 DummyText1 DummyText2 DummyText3 DummyText4 DummyText5 DummyText11 DummyText21 DummyText31 …
DeepakVerma
  • 179
  • 1
  • 3
  • 14
0
votes
1 answer

Need to reduce the spaces between 2 cells in apache poi word

I am trying to build a table. I need the space between 2 rows to be reduced but I am not able to achieve the result using row.setheight(). Below is the code : import eu.europa.ec.fisheries.quotaprepservice.constants.StrConstants; import…
Misthi
  • 33
  • 10
0
votes
1 answer

Need to add a footnote in between texts and the next text should be appeared in the same line not in the next line in Apache poi

I am trying to create a a paragraph with continuous text .I am not being able to add a footnote in between in between a continuous paragraph, either it got added at the last or i need to create another paragraph for the next sentences. 1. Below…
Misthi
  • 33
  • 10
0
votes
1 answer

Creating a checkbox in XLSX using Apache POI (Java)

I need to create an Excel checkbox in an XSSFSheet, but I have found no obvious classes/methods for doing so in the Java Apache POI library (4.0.1), nor any examples. Any suggestions?
silverberry
  • 786
  • 5
  • 20
0
votes
2 answers

Need to shift the table to right in apache poi word

I have created the table in apache POI, need to create another similar table but shifted right: But I want to create similar another table to the right but at bottom. Do we have a setting in XWPFTable to set the alignment for the table to shift…
Misthi
  • 33
  • 10
0
votes
1 answer

Need to create exponential data(number) in single cell in apache poi without using paragraph.break

I am constructing a row with 8 columns and Need to create exponential data(number) in single cell in apache poi WORD without using paragraph.break .
Misthi
  • 33
  • 10
0
votes
1 answer

I am trying to create the below header with the help of XWPFDocument and merging cells

I am trying to create the below header with the help of XWPFDocument and merging cells . Below Image shows the image for the header I am trying to create *XWPFDocument document = new XWPFDocument(); XWPFTable table = document.createTable(1,…
Misthi
  • 33
  • 10
0
votes
0 answers

Need to remove the border from the right when merging the cell horizontally

I am trying to add the border to the merged cell but with the below line of code it is not possible: XWPFDocument document = new XWPFDocument(); XWPFTable table = document.createTable(1, 8); CTTblBorders borders =…
Misthi
  • 33
  • 10
0
votes
0 answers

Need to create a new page when the table exceeds to next page in apache poi word

Need to create a new page when the table exceeds to next page in apache poi
Misthi
  • 33
  • 10
0
votes
1 answer

How to repeat the header (Grey area) in apache POI

I am creating the table with apache POI . I need to repeat the header in the word. This question is a follow up question of that question: How to split the row in apache POI header. There the used code is given in the accepted answer.
Misthi
  • 33
  • 10
0
votes
1 answer

Apache-poi: Auto set size with merged cells and make the font bold

I'm new to this and just playing around with apache-poi to generate an excel sheet with some mock data, here is my class and I'm struck with few things, any best practices ?? Auto set size with merged cells in the row. Font bold --> For all cells…
Ramana
  • 1,692
  • 3
  • 18
  • 34
0
votes
2 answers

How do you add an XDDF Chart to a specific paragraph run (i.e. a cell in a table)? POI 4.0.1

I want to add a chart to a specific table cell within an XWPFDocument. I want the chart in the table cell so that I can ensure alignment with other elements I will add afterwards. So then, How do I create an XWPF/XDDF chart without adding it the…
0
votes
1 answer

Insert new rows into an Apache POI spreadsheet based on the content of a cell

NOTE: I have searched everywhere and this is not a duplicate question. I'm trying to create/insert a fixed number of "new" rows into a spreadsheet, using Apache POI (poi-4.1.0) and Java, based on the content of a cell in the same row - See the…
SirTech
  • 11
  • 4
0
votes
1 answer

I am using POI 4.1.0 version. While using shiftRows(), the excel file is getting corrupt

for (int i = 0; i < newSheet.getLastRowNum(); i++) { if (.....) { newSheet.removeRow(newSheet.getRow(i)); newSheet.shiftRows(i+1, newSheet.getLastRowNum(), -1); i--; } …
0
votes
0 answers

Copy cells from XLSM file to another XLSM with Apache POI

I try to copy cell values from a sheet to a sheet of another file with Apache POI. Both XLSM files have the same columns, but in different order. I initialized first file as follows: File file = new File(GlobalVariables.XLSM); FileInputStream…
plaidshirt
  • 5,189
  • 19
  • 91
  • 181