zxfreg 发表于 2018-7-23 11:38:32

setvalue问题

spread.SetValue(activeRow, activeCol, “       fffff");
给单元格赋值时,把空格去掉了,怎么处理?

dexteryao 发表于 2018-7-23 14:43:19

前端网页会自动忽略空格,有这样需求可以参考:

FpSpread1.Sheets.RowCount = 4;
FpSpread1.Sheets.Cells.EncodeValue = false;
FpSpread1.Sheets.Cells.Value = "Hello<B>World</B>";
FpSpread1.Sheets.Rows.EncodeValue = false;
FpSpread1.Sheets.Cells.Value = "<a href='http://gcpowertools.com'>gcpowertools.com</a>";
FpSpread1.Sheets.Columns.EncodeValue = false;
FpSpread1.Sheets.Cells.Value = "Break&nbsp;here<BR>to&nbsp;anew&nbsp;line";
页: [1]
查看完整版本: setvalue问题