找回密码
 立即注册

QQ登录

只需一步,快速开始

hdg012

注册会员

6

主题

7

帖子

74

积分

注册会员

积分
74
hdg012
注册会员   /  发表于:2016-12-17 20:43  /   查看:3003  /  回复:1
工作表列名不一致,复制粘贴过程中,改变了列名,希望可以复制sheet中内容,不能粘贴到sheet中

1 个回复

倒序浏览
dexteryao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2016-12-19 19:33:00
沙发
可以根据您的业务设置inputmap,或者自定义一个粘贴的action
  1. // Create an InputMap object.
  2.             FarPoint.Win.Spread.InputMap inputmap1;
  3.             // Assign the InputMap object to the existing map.
  4.             inputmap1 = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused);
  5.             // Map the Enter key.
  6.             inputmap1.Put(new FarPoint.Win.Spread.Keystroke(Keys.V, Keys.Control), FarPoint.Win.Spread.SpreadActions.None);
  7.             // Create another InputMap object.
  8.             FarPoint.Win.Spread.InputMap inputmap2;
  9.             // Assign this InputMap object to the existing map.
  10.             inputmap2 = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused);
  11.             // Map the Enter key.
  12.             inputmap2.Put(new FarPoint.Win.Spread.Keystroke(Keys.V, Keys.Control), FarPoint.Win.Spread.SpreadActions.None);
复制代码


  1. private void button1_Click(object sender, EventArgs e)
  2.         {
  3.             // Create an InputMap object.
  4.             FarPoint.Win.Spread.InputMap inputmap1;
  5.             // Assign the InputMap object to the existing map.
  6.             inputmap1 = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused);
  7.             // Map the Enter key.
  8.             inputmap1.Put(new FarPoint.Win.Spread.Keystroke(Keys.V, Keys.Control), FarPoint.Win.Spread.SpreadActions.ClipboardPasteAll);
  9.             // Create another InputMap object.
  10.             FarPoint.Win.Spread.InputMap inputmap2;
  11.             // Assign this InputMap object to the existing map.
  12.             inputmap2 = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused);
  13.             // Map the Enter key.
  14.             inputmap2.Put(new FarPoint.Win.Spread.Keystroke(Keys.V, Keys.Control), FarPoint.Win.Spread.SpreadActions.ClipboardPasteAll);

  15.         }
复制代码
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部