#how to loop items pulled into a new cell

4 messages · Page 1 of 1 (latest)

zenith jay
#

Exporting into excel the title and description all go into one cell I want it to go down one cell every new description this is the current code (uses groovy with codebeamer api)

This is the groovy code

<cb:groovy template="false" silent="false">
def resolver = com.intland.codebeamer.persistence.dao.impl.EntityCache.getInstance(user);

// a map, where the keys are the field names, the values are the referenced entities by that field
uprefs = issueReferences.getOutgoingReferences(req);
result = “”;

uprefs.each({
// it contains key/value pair: the key is the field name, the refs is a list contains the VersionReferenceDtos
fieldName = it.key
refs = it.value

//result += fieldName + ":" + refs + "\n";

// iterate all fields
refs.each({
// load the item fully: note this is suboptimal because items are loaded one-by-one
resolver.resolve(it);
result.add(fieldName + ":" + it.dto.description);
});
});

""

</cb:groovy>

tall idolBOT
#

Thanks for your question :clap:, if someone gives you an answer it would be great if you thanked them with a :white_check_mark: in response. This response will earn you both points for special roles on this server.

zenith jay
#

I figured out how to do it, but the reason why groovy is because using a website called codebeamer exporting data from that website their excel export only supports xlsx and it reads groovy,velocity, Jett tags

#

Their examples on the website how to do a few of the exports is using Jett tags and groovy