excel - Groovy POI created cells considered blank by other programs until ENTER is manually pressed in cells -
ok kind of hard explain.
i create cell in worksheet using java poi
newcell= row.getcell(index) if (containercell == null) { containercell = row.createcell(index) } newcell.setcelltype(hssfcell.cell_type_string) newcell.setcellvalue(strvar)
if open worksheet in excel, see cell value indeed set. if load external program reads excel sheets, claims cell set blank.
now, if go excel , simple "hit return" on cell in question, in formula bar (even though not formula) , try reload external program, works fine. need evaluate formula on string?
thanks
i have no experience java, having hit enter in cell indicative of calculation being set manual. since working api may treating input java formula (?).
open offending workbook in broken state, , on sheet having problems choose [formulas] tab @ top, [calculation]>calculate sheet.
if updates value see 2 options...
see if there option manually calculate sheet poi, after value has been entered.
alternatively, can write tiny bit of vba force calculation on sheet when workbook opened. msdn offers simple example.
http://msdn.microsoft.com/en-us/library/office/aa223802%28v=office.11%29.aspx
i have had excel apps calculation had set manual avoid excessive overhead. guess though..
Comments
Post a Comment