ofbiz內建的匯出excel功能

2021-08-19 01:37:25 字數 2848 閱讀 5660

controller配置

screen配置

.....

....

注意:如果裡面引用了,那麼匯出的excel也會把這個裝飾器的內容列印出來。**可以引用form或者ftl檔案。這裡只介紹form的

form配置

<

formname="productinventoryinandoutdetaillistforexport"type="list"target=""title=""list-name="inventoryitemoutandindetail"odd-row-style="k-alt"header-row-style="header-row-2"default-table-style="basic-table hover-bar"paginate-target="$"override-list-size="$">

<

fieldname="num"title="序號"><

display/>

field>

<

fieldname="facilityid"title="場所">

<

display-entityentity-name="facility"key-field-name="facilityid"description="$[$]"/>

field>

<

fieldname="productid">

<

displaydescription="'$"/>

field>

list-name="需要展示的list"paginate-target="查詢的url" override-list-size="list的size"
值得注意的是當field欄位有use-when時,匯出可能會非常慢

ofbiz匯出的PDF中文亂碼

本人使用的ofbiz的版本為17.12.01。中文亂碼是因為使用的fop模板中引用的字型不支援漢字造成的。操作如下 3 在fop.properties的屬性檔案中,將fop.font.family屬性改為simsun,表示為新宋體。4 預設操作就完成了。但很多檔案的fop中,明確指定了字型,沒有使用...

匯出固定的excel

string sp file.separator string templatepath corestaticmanager.getfileroot system sp template sp aaaas.xls string fullmyfilename corestaticmanager.get...

excel的匯入匯出

匯入 public function excel put private function excel fileput filepath,data,tablename 載入excel檔案 phpexcel phpreader load filepath 讀取excel檔案中的第乙個工作表 curre...