Hi,
preferably, please use this tag, otherwise it's not convenient to read the code.
You should change the part with
if Array.isArray.... lenght>0..
return value.join('; ')
Usual value of a link record cell is array of objects having id and name
in JS, it would be value.map(obj=>obj.name).join('; ')
but there are other field types, for example attachments field, which value is array of objects too, but these objects has no 'name' property. You can get their filename (you can get 'url' property and then do something to load into sheet, but be aware that url will be unreachable after a few hours) Lookup fields has no 'name' and 'filename', can be retrieved simple by a value.join. To summarize, it's something like
value.map(v=>v.name||v.filename||v).join('; ')
I don't know whether it work, but you got the idea.