admin管理员组文章数量:1321239
I am using vue with ag-grid table, the excel-export feature is not working for the usecase of having multiple links in one cell.
Here is the solution I have now:
const gridOptions = computed(
(): GridOptions<IOpenQuestion> => ({
defaultExcelExportParams: {
autoConvertFormulas: true,
processCellCallback: params => {
const { column, value, node } = params;
const { field, valueFormatter } = column.getColDef();
if (field === 'documents' && Array.isArray(value) && value.length > 0) {
return `=CONCATENATE(${value.map(v => `HYPERLINK("${v?.link}", "${v?.filename}")`).join(', "\n", ')})`;
}
return valueFormatter ? valueFormatter({ ...params, data: node.data }) : value;
},
},
}),
);
It currently works if I open the exported file with the Numbers app on mac but with excel it doesn't (only the labels are showing). Is there a way to fix this to have multi-line links within a cell?
本文标签: vuejsAggrid excel export Multiple hyperlinks in one cellStack Overflow
版权声明:本文标题:vue.js - Ag-grid excel export: Multiple hyperlinks in one cell - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742097637a2420646.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论