search

Home  >  Q&A  >  body text

如图,Java用poi操作excel,当cell是null的时候,如何让他变成空字符串呢?

直接赋值不行呀

大家讲道理大家讲道理2784 days ago944

reply all(3)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-18 09:44:09

    cell = row.createCell(index);
    cell.set...

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 09:44:09

    When cell is null, the object does not exist and of course cannot be assigned a value. You must first create the cell and then call the set method of the cell

    reply
    0
  • ringa_lee

    ringa_lee2017-04-18 09:44:09

    Is it okay to directly assign string s='';cell.setcellvalue(s);?

    reply
    0
  • Cancelreply