diff --git a/packages/nc-gui/composables/useMultiSelect/copyValue.ts b/packages/nc-gui/composables/useMultiSelect/copyValue.ts
index 3a2fca1ac7..14ca8d3e21 100644
--- a/packages/nc-gui/composables/useMultiSelect/copyValue.ts
+++ b/packages/nc-gui/composables/useMultiSelect/copyValue.ts
@@ -5,21 +5,22 @@ export const copyTable = async (rows: Row[], cols: ColumnType[]) => {
let copyHTML = '
'
let copyPlainText = ''
- rows.forEach((row) => {
+ rows.forEach((row, i) => {
let copyRow = ''
- cols.forEach((col) => {
+ cols.forEach((col, i) => {
let value = (col.title && row.row[col.title]) ?? ''
if (typeof value === 'object') {
value = JSON.stringify(value)
}
copyRow += `${value} | `
- copyPlainText = `${copyPlainText} ${value} \t`
+ copyPlainText = `${copyPlainText}${value}${cols.length - 1 !== i ? '\t' : ''}`
})
copyHTML += `${copyRow}
`
- copyPlainText = `${copyPlainText.trim()}\n`
+ if (rows.length - 1 !== i) {
+ copyPlainText = `${copyPlainText}\n`
+ }
})
copyHTML += '
'
- copyPlainText.trim()
const blobHTML = new Blob([copyHTML], { type: 'text/html' })
const blobPlainText = new Blob([copyPlainText], { type: 'text/plain' })