回复 3楼cpa95599的帖子
保存为 byte[] 的代码如下:
- byte[] spreadbytes;
- MemoryStream ms;
- private void 保存ToolStripMenuItem_Click(object sender, EventArgs e)
- {
- ms = new MemoryStream();
- this.fpSpread1.Save(ms, false);
- spreadbytes = new byte[ms.Length];
- int byteLength = Convert.ToInt32(ms.Length);
- ms.Read(spreadbytes, 0, byteLength);
- //写入数据库
- }
复制代码 |