Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 数据导出时候seriesNumber.text失效? #2755

Closed
2 of 5 tasks
wozien opened this issue May 30, 2024 · 4 comments · Fixed by #2757
Closed
2 of 5 tasks

🐛 数据导出时候seriesNumber.text失效? #2755

wozien opened this issue May 30, 2024 · 4 comments · Fixed by #2757
Assignees
Labels
🐛 bug 这个是一个 bug next 2.0-next 版本的问题 released on @next

Comments

@wozien
Copy link

wozien commented May 30, 2024

🏷 Version

Package Version
@antv/s2 2.0.0-next.22
@antv/s2-react
@antv/s2-vue

Sheet Type

  • PivotSheet
  • TableSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Description

用asyncGetAllPlainData方法导出数据的时候,不管formatOptions如何设置,序号列不管seriesNumber.text怎么配置,导出始终是【序号】

  const options: S2Options = {
    width: 480,
    height: 300,
    seriesNumber: {
      enable: true,
      text: '排名',
    },
  };

  const handleExport = async () => {
    if (s2Instance.current) {
      const content = await asyncGetAllPlainData({
        sheetInstance: s2Instance.current,
        split: '|',
        formatOptions: true,
      });
      console.log(content);
    }
  };

导出打印的结果如下:
序号|name|price|area
1|iphon13|5999|华, 东
2|iphon13|5999|华, 南
3|iphon13|5999|华, 中

⌨️ Code Snapshots

🔗 Reproduce Link

https://stackblitz.com/edit/vitejs-vite-m4qgeu?file=src%2FTestExport.tsx

🤔 Steps to Reproduce

😊 Expected Behavior

可以按seriesNumber.text的配置导出

😅 Current Behavior

💻 System information

Environment Info
System
Browser
@github-actions github-actions bot added the next 2.0-next 版本的问题 label May 30, 2024
@lijinke666 lijinke666 self-assigned this May 31, 2024
@lijinke666 lijinke666 added the 🐛 bug 这个是一个 bug label May 31, 2024
Copy link
Contributor

你好 @wozien,很抱歉给你带来了不好的体验, 我们会尽快排查问题并修复, 请关注后续发布日志.

Hello, @wozien, We are so sorry for the bad experience. We will troubleshoot and fix the problem as soon as possible. Please pay attention to the follow-up change logs.

@Zhaohanqi12
Copy link

自定义列头的导出,列头可以合并为一个单元格吗?

@lijinke666
Copy link
Member

不可以

wjgogogo pushed a commit that referenced this issue May 31, 2024
* fix: 修复明细表导出时自定义序号文本不生效 close #2755

* fix: 增加 getSeriesNumberText, 减少模版代码

* test: 单测修复

* test: 单测修复
@lijinke666
Copy link
Member

🎉 This issue has been resolved in version @antv/s2-v2.0.0-next.23 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug 这个是一个 bug next 2.0-next 版本的问题 released on @next
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants