可以使用RichTextCellType来实现这一功能:
- private void Form1_Load(object sender, EventArgs e)
- {
- fpSpread1.ActiveSheet.Cells[0, 0].CellType = new FarPoint.Win.Spread.CellType.RichTextCellType();
- fpSpread1.ActiveSheet.Cells[0, 0].Value = @"{\rtf1\ansi\ansicpg936\uc1\deff0{\fonttbl{\f0\fnil\fcharset134\fprq2 \'cb\'ce\'cc\'e5;}{\f1\froman\fcharset2\fprq2 Symbol;}}{\colortbl;\red0\green0\blue255;\red255\green0\blue0;}{\stylesheet{\s0\itap0\nowidctlpar\f0\fs24 [Normal];}{\*\cs10\additive Default Paragraph Font;}}{\*\generator TX_RTF32 17.0.540.501;}\deftab1134\paperw12240\paperh15840\margl1138\margt1138\margr1138\margb1138\widowctrl\formshade\sectd\headery720\footery720\pgwsxn12240\pghsxn15840\marglsxn1138\margtsxn1138\margrsxn1138\margbsxn1138\pgbrdropt32\pard\itap0\nowidctlpar\plain\f0\fs20\loch\f0\hich\f0{\uc2\u19968\'d2\'bb}\plain\f0\fs20\cf1\loch\f0\hich\f0{\uc2\u20108\'b6\'fe}\plain\f0\fs20\cf2\loch\f0\hich\f0{\uc2\u19977\'c8\'fd}\par }";
- }
复制代码 |