This section describes how to insert hyperlinks in the cells of the exported Excel file.
You can insert hyperlinks
in the cells of the exported Excel file by outputting an Excel formula containing a Hyperlink function with a URL value you provide. The code below inserts hyperlinks in the Excel export file for all values in the URL column.
const gridOptions = {
columnDefs: [
{ field: 'company' },
{
field: 'url',
cellClass: 'hyperlinks' // references excel style
}
],
defaultExcelExportParams: {
autoConvertFormulas: true,
processCellCallback: params => {
const field = params.column.getColDef().field;
return field === 'url' ? `=HYPERLINK("${params.value}")` : params.value;
}
},
excelStyles: [
{
id: 'hyperlinks',
font: {
underline: 'Single',
color: '#358ccb'
}
}
],
// other grid options ...
}
Note the following:
Continue to the next section: Master Detail.