Download Report in Excel

When I want to download the report in excel that contains a field with the details of the comments, it gives me the following error:

We’re sorry, but something went wrong while exporting data.
Error message:
The maximum length of cell contents (text) is 32767 characters

Hi @GWF,

The error message makes me think that the text in the cell is quite impressive, with more than 32767 characters. How does this cell look in eazyBI report?

Would you mind sharing a report definition (it contains only the report layout, not values) and an example of some comment field to get an impression of the size of this field (feel free to replace some sensitive data in the example value)?
Here is how to get the report definition: Export and import report definitions

If this is not an option for you due to security reasons, you can send those details to eazyBI support.

Best,
Zane / support@eazyBI.com

I was able to solve it with the following code:
[jira.customfield_comments_for_issues]
name = “Comments details”
data_type = “text”
javascript_code = ‘’’
var commenta = new Array();
var allcomments = issue.fields.comment;
var fullcomment = “”
if (allcomments && allcomments.comments ) {
var comments = issue.fields.comment.comments;
comments.sort(function(a,b) {
return new Date(b.created) - new Date(a.created);
});
for (var i = 0; i < comments.length; i++) {
var comment = comments[i];
commenta.push(comment.body + " (" + comment.author.displayName + “, " + comment.created.toString().substr(0,10) + “)”);
fullcomment = commenta.join(”\n");
}
issue.fields.customfield_comments_for_issues = fullcomment.toString().substr(0,32767);
}
‘’’

1 Like

@GWF, cutting off the field length during data import is the right approach to meet the excel file field limits. In your case, “Comments details” is JavaScript calculated custom field, and it makes sense to use fiction substr() within the code to trim the field value.

Another solution could be downloading the report results to CSV format. Then open the CSV file with some tool that would allow more symbols in the cell to represent data in the table view.