VTable icon indicating copy to clipboard operation
VTable copied to clipboard

[Bug] 导出表格数据为CSV格式,再导入改CSV文件,表格会直接在最后多出一列

Open Shawyau opened this issue 2 months ago • 1 comments

Version

1.20.3

Link to Minimal Reproduction

导出数据为CSV,再导入会多出一列

Steps to Reproduce

  1. 随便定一个表格,导出为CSV格式;
Image
  1. 导出的CSV内容如下,看上去是在最后多加了“,”;
Image
  1. 再导入上述导出的CSV文件;

Current Behavior

在表格最后多出了一列;

Image

Expected Behavior

表格列数和行数应该一致。

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

看导出源码,vtable-plugins/src/table-export/csv/index.ts 导出CSV的方法 exportVTableToCsv 中,循环行数时,直接单元格内容拼接了“,”,没有判断最后列的数据不应该拼接分隔符,导致导出的内容实际多了一列。

Image

Shawyau avatar Nov 12 '25 08:11 Shawyau

可以提pr修改问题哦 @Shawyau

fangsmile avatar Nov 13 '25 07:11 fangsmile