简体   繁体   中英

Avoid inserting cells while using each in Jxls

I have been using jxls for my Excel based reports. I am facing a problem with a particular report where the original template has 31 columns for days in a month followed by columns that do certain calculations based on the data in the day columns.

While I am able to insert data in the 31 columns, the problem is that the columns beyond keep shifting right.

I want to be able to insert data in the existing column space and not create new columns. Appreciate help with this.

"I am able to insert data in the 31 columns, the problem is that the columns beyond keep shifting right." This is a default feature of jxls, I'm not aware if it can be overridden by internal configuration changes.

"I want to be able to insert data in the existing column space and not create new column" The cheat trick here would be to expand your expression language to existing 31 columns. Example Instead of using jx:each items=listOfObjects var=current area=AE2

Directly reference your objects from listOfObjects as: A, B, C,... listOfObjects[0].property, listOfObjects[1].property, listOfObjects[2].property

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM