Thanks to http://www.technipelago.se/content/technipelago/blog/44
It’s possible to access excel cell by through row iterator and the column name. But it seems that not possible to access by column name where the name contains white-space. Please give me some pointer on how to make it possible in the ExcelBulider context to access cell by even name with white-space.
Here is the examples to illustrate:
new ExcelBuilder("customers.xls").eachLine([labels:true]) {
print firsname // this already possible
print <a column name with space> // I wish to have
}
where firstname is a column name. I wish it possible to access another column of name with space.
I could use a dictionary to encapsulate the mapping from column name to column inedx, to implement the logic of access by column outside of the ExcelBuilder, but I’d like it to be more encapsulated in one single place/logic in ExcelBuilder.
Maybe, I have not had enough knowledge of POI and Groovy’s builder techniques.
Please help!
Thanks,
Yu
This should work: