diff --git a/packages/s2-core/src/utils/export/index.ts b/packages/s2-core/src/utils/export/index.ts index e15fa29fdc..1dd1268191 100644 --- a/packages/s2-core/src/utils/export/index.ts +++ b/packages/s2-core/src/utils/export/index.ts @@ -67,9 +67,11 @@ export const copyToClipboardByClipboard = (data: Copyable): Promise => { new ClipboardItem( [].concat(data).reduce((prev, copyable: CopyableItem) => { const { type, content } = copyable; + // eslint-disable-next-line no-control-regex + const contentToCopy = content.replace(/\x00/g, ''); return { ...prev, - [type]: new Blob([content], { type }), + [type]: new Blob([contentToCopy], { type }), }; }, {}), ),