excel - Why does write(), write both the open workbook, and to outputstream, and how can i only write to existing workbook? -
if following:
path originalpath = paths.get("src/test/resources/original.xlsm"); file originalfile = copypath.tofile() workbook workbook = workbookfactory.create(originalfile); //populate values fileoutputstream fileout = new fileoutputstream("src/test/resources/test.xlsm"); workbook.write(fileout);
then both test.xlsm , original.xlsm populated values
if don't use write()
, of course no test.xlsm
created, nothing updated in original.xlsm
however if do
workbook.write(system.out);
then original.xlsm
updated
why write write workbook, says nothing in documentation that?
javadoc: "write out workbook outputstream."
is there other way of only updating original.xlsm?
Comments
Post a Comment