title: Apache POI write image and text excel
body: <p>I am having trouble with writing image and text in a same cell and questions similar to StackOverflow
  <a href="https://stackoverflow.com/questions/44325714/on-addding-image-and-text-in-same-cell-in-excel-using-poi-then-image-override-th">on addding image and text in same cell in excel</a> and <a href="https://stackoverflow.com/questions/31147214/poi-excel-hssfpicture-image-and-alt-text">POI Excel HSSFPicture Image and ALT TEXT</a>
  , but the expected output is different and I cannot figure out what wrong with my code? 
  and expected output like as below</p>
  
  <p><a href="https://i.stack.imgur.com/drVw8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/drVw8.png" alt="enter image description here"></a></p>
  
  <p>Here is my code;</p>
  
  <pre><code>            Workbook workbook = new XSSFWorkbook();
              Sheet sheet = workbook.createSheet("Sheet1");
  
              //FileInputStream obtains input bytes from the image file
              InputStream inputStream = new FileInputStream(k_pipe_img_file);
              //Get the contents of an InputStream as a byte[].
              byte[] bytes = IOUtils.toByteArray(inputStream);
              //Adds a picture to the workbook
              int pictureIdx = workbook.addPicture(bytes, Workbook.PICTURE_TYPE_PNG);
              //close the input stream
              inputStream.close();
  
              //Returns an object that handles instantiating concrete classes
              CreationHelper helper = workbook.getCreationHelper();
  
              //Creates the top-level drawing patriarch.
              Drawing drawing = sheet.createDrawingPatriarch();
  
              ClientAnchor anchor1 = new XSSFClientAnchor();
              anchor1.setAnchorType(ClientAnchor.AnchorType.DONT_MOVE_AND_RESIZE);
  
              anchor1.setCol1(1);
              anchor1.setCol2(1);
              anchor1.setRow1(2);
              anchor1.setRow2(2);
  
              //Creates a picture
              Picture pict = drawing.createPicture(anchor1, pictureIdx);
              pict.resize(1, 1);
  
              Row row = sheet.createRow(2);
              row.setHeight((short) 4000);
  
              sheet.setColumnWidth(0, 4000);
              Cell cell = row.createCell(0, CellType.STRING);
              cell.setCellValue("Task 1");
  
              sheet.setColumnWidth(1, 5000);
              cell = row.createCell(1, CellType.STRING);
              cell.setCellValue("Replace Kemplon-Pipe");
              CellStyle style=row.getSheet().getWorkbook().createCellStyle();
              style.setVerticalAlignment(VerticalAlignment.TOP);
              cell.setCellStyle(style);
  
              //Write the Excel file
              FileOutputStream fileOut = new FileOutputStream(k_Task_file);
              workbook.write(fileOut);
              fileOut.close();
  </code></pre>
  
  <p>Code Output:
  <a href="https://i.stack.imgur.com/Yrdql.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Yrdql.png" alt="enter image description here"></a></p>
  
  <p>image occupies entire cell and text is behind the image.</p>
  
  <p>Is there any possible solution?</p>