简体   繁体   English

避免在Jxls中使用每个单元格时插入单元格

[英]Avoid inserting cells while using each in Jxls

I have been using jxls for my Excel based reports. 我一直在使用jxls作为基于Excel的报告。 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. 我遇到一个特定报告的问题,其中原始模板在一个月内有31列,一天是后续列,根据日期列中的数据进行某些计算。

While I am able to insert data in the 31 columns, the problem is that the columns beyond keep shifting right. 虽然我能够在31列中插入数据,但问题是超出的列保持向右移动。

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." “我能够在31列中插入数据,问题是超出的列不断向右移动。” This is a default feature of jxls, I'm not aware if it can be overridden by internal configuration changes. 这是jxls的默认功能,我不知道它是否可以被内部配置更改覆盖。

"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. “我希望能够在现有列空间中插入数据,而不是创建新列”这里的作弊技巧是将表达式语言扩展到现有的31列。 Example Instead of using jx:each items=listOfObjects var=current area=AE2 示例而不是使用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 直接从listOfObjects引用您的对象:A,B,C,... listOfObjects [0] .property,listOfObjects [1] .property,listOfObjects [2] .property

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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