The documentation I’ve found doesn’t address this issue. I would think that calling cell.setCellStyle(a) and cell.setCellStyle(b) would completely overwrite style a and apply style b instead. However, it appears that it is applying both because the styles don’t conflict. Is this expected behavior or magic?
The documentation I’ve found doesn’t address this issue. I would think that calling cell.setCellStyle(a)
Share
Well, here’s the source code for
setCellStyle():_cellis of typeorg.openxmlformats.schemas.spreadsheetml.x2006.main.CTCelland I couldn’t find the source code online. However, since the call to_cell.setS(idx)passes in just an index, the API doesn’t look rich enough to support merging of styles. I strongly suspect your second style has all the attributes you are seeing.