Excel sheet issue

I am using below logic to convert and display  Source  location ID to Source Location name in Read only grid but when am using same logic while downloading Excel sheet. Its providing me  Source location ID instead of Source Location name. Is there any way how i can get Source Location name in Excel Sheet.

a!gridColumn(
label: "Source Location",
sortField: "SourceLocation",
value: {
rule!ABC_DE_getLocationNameBasedOnLocationId(
locationId: fv!row.collectionfromlocationid
)
},

  Discussion posts and replies are publicly visible