MiniExcel icon indicating copy to clipboard operation
MiniExcel copied to clipboard

导出带有前置空格项时,比如" 123456a",空格被隐藏掉了

Open LuGuangguang opened this issue 4 years ago • 1 comments

虽然再用MiniExcel读取时,空格还是可以正常读出来。 我不知道其他人的项目是什么样的,但是我觉得,既然设置了导入项的单元格式为文本,就应该所见即所得。

Excel Type

  • [x] XLSX

Upload Excel File

Please attach your issue file by dragging or droppng, selecting or pasting them.

ConsoleApp1.zip

MiniExcel Version

0.18

Description

在导出带有前置空格项时,如:" 123456a",空格在Excel隐藏掉了,显示为“123456a”,虽然再用MiniExcel读取时,仍然 是" 123456a",但是还是需要一个Excel显示为带空格的(因为我把导出的Excel给别人,他们的工具读出来的是不带空格的); image

LuGuangguang avatar Sep 29 '21 09:09 LuGuangguang

image 原因是 SaveAsByTemplate 会使用原本的 c tag,需要动态判断增加 xml:space=\"preserve\" SaveAs 没这问题,因为能加此判断 image

恩.. 我想想如何解决

shps951023 avatar Jan 21 '22 06:01 shps951023