【发布时间】:2017-11-28 01:13:34
【问题描述】:
我正在尝试使用 SpreadsheetDocument OpenXML C# 将字符串“Site_x0020_Column_x0020_Test”写入 excel,但是当我们打开 excel 文件时,字符串变为“Site Column Test”。如何在excel文件中保留原字符串。
以下是用于写入excel单元格的代码
// Add a new Excel Cell to our Row
var cell = new Cell { CellReference = cellReference, DataType = CellValues.String};
var cellValue = new CellValue();
cellValue.Text = cellStringValue;
cell.Append(cellValue);
excelRow.Append(cell);
谢谢
【问题讨论】: