2017-01-13 73 views

回答

3

在Apache的POI狀態API docs for the Sheet interface

setZoom(int標) - 窗口變焦倍率爲代表的百分比值當前視圖 。

setZoom(INT分子,INT分母) 已過時。 (大約POI 3.14beta1)。改用setZoom(int)。

所以嘗試:

sheet.setZoom(120); 

或者使用的方法已過時的舊版本的API:

sheet.setZoom(12, 10); 

注意,5/4 = 1.25這是你的理由放大到125%

+1

正確,但12/10 = 6/5。 –

+0

我現在覺得自己像個傻瓜;) –

+0

謝謝Finbarr&Axel。這工作。我使用3.6版本的apache POI,所以我會用setZoom(int分子,int分母)去。 :) –

相關問題