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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -