求助:替换字符
查找整个表格,把指定字符(例如:2022年3月16日)替换为“日期”,如何实现?谢谢!目前只提供了查找功能,没有提供替换以及整体替换功能
https://www.grapecity.com/spreadnet/docs/latest/online-asp/FarPoint.Web.Spread~FarPoint.Web.Spread.FpSpread~Search(Int32,String,Boolean,Boolean,Boolean,Boolean,Int32,Int32,Int32,Int32).html 本帖最后由 lgxl6925 于 2022-3-17 10:02 编辑
查找到字符串的行列,再设置Text也行,只是search不会用啊,能给个C#示例吗?
如:
查找表格中含“abcd”字符串的行列坐标
Search的参数搞不明白
好了,谢谢。
protected void th(string str,string str1)
{
int sheetIndex=0; //工作表索引
string searchString = str; //查找的字符串
Boolean caseSensitive=true; //是否完全匹配
Boolean exactMatch=true;
Boolean alternateSearch = true;
Boolean useWildcards = true;
Boolean includeCellText = true;
Boolean includeNotes = true;
Boolean includeTags = true;
int startRowIndex=0;
int startColumnIndex=0;
int foundRowIndex=100;
int foundColumnIndex=100;
string value;
value = FpSpread1.Search(sheetIndex, searchString, caseSensitive, exactMatch, alternateSearch, useWildcards, includeCellText, includeNotes, includeTags, startRowIndex, startColumnIndex,ref foundRowIndex,ref foundColumnIndex);
int aaa = foundRowIndex;
int bbb = foundColumnIndex;
FpSpread1.Sheets.Cells.Text = str1;
}
} 本帖最后由 Richard.Ma 于 2022-3-17 11:54 编辑
不客气,也感谢你在论坛分享自己的代码
页:
[1]