Closed fmo-dev closed 6 days ago
Hi! We have this bug in production, exporting tables while having some columns hidden result in an invalid CSV file. Can you please look at this bug??
This was a known issue because there were a lot of copy/export issues, because have break changes in 1.x version, so we completely refactored this part of the logic in version 2.0, which is currently in private beta with a stable release expected next month.
If your project cannot be upgraded to 2.0, you will need to wait for a fix to be released later, or help us build together, submit bugfix patch PR.
Version 2.0 is currently under construction and has only Chinese documentation.
你好 @fmo-dev,该功能或缺陷已经在 2.0 next 版本
中支持或修复,next
版本目前处于内测中, 感谢你的支持与理解。
如有任何 2.0 版本
问题,请前往讨论区 或 查看文档, 抢先试用:
yarn add @antv/s2@next # pnpm add @antv/s2@next
yarn add @antv/s2-react@next # pnpm add @antv/s2-react@next
yarn add @antv/s2-vue@next # pnpm add @antv/s2-vue@next
Hello, @fmo-dev, This feature or flaw has been supported or fixed in 2.0 next version
, next
version is currently in private beta, thank you for your support and understanding.
Any 2.0
version issues, please go to discussion, or view docs, the first trial:
This was a known issue because there were a lot of copy/export issues, because have break changes in 1.x version, so we completely refactored this part of the logic in version 2.0, which is currently in private beta with a stable release expected next month.
If your project cannot be upgraded to 2.0, you will need to wait for a fix to be released later, or help us build together, submit bugfix patch PR.
Ok we'll wait for the v2 but I hope it would be released next month as you expect. Indeed we are waiting for it since November 2023 when it was announced for end of the year 😅
2.0 stable version is published. see https://s2.antv.antgroup.com/en/manual/migration-v2, other english documentation is WIP
.
Excellent news ! Do you have an idea of when the full english documentation will be available ?
🏷 Version
Sheet Type
🖋 Description
If some columns have been hidden in a table and you use the copyData function to prepare a CSV to download from the spreadsheet object, it is generated with :
This results in an incorrect CSV, as there are more data columns than headers
⌨️ Code Snapshots
To export our table, we only use this code snipper
🔗 Reproduce Link
https://codesandbox.io/p/sandbox/eager-pascal-rxkllp?file=%2Fsrc%2FApp.tsx%3A16%2C23
🤔 Steps to Reproduce
Hide one or many columns by clicking on a header and clicking on "Hide", then try to export the table by clicking on the button above
😊 Expected Behavior
No hidden data should be in the CSV
😅 Current Behavior
The hidden data are in the CSV, but not their header, so their corresponding header on the CSV is the wrong one, and this is the case for any column after that
For example if we have this table
If I hide the second column the table will looks like this
But if i use the function
copyData
it will returns this stringWhich is incorrect, because converting it to csv would give something similar to the table below
💻 System information