您好,
可以使用CopyRange的方式,代码可以参考以下:- Sub Command1_Click()
- Dim rowcount, colcount As Integer
- ' Return the last row that contains data
- rowcount = fpSpread1.DataRowCnt
- ' Return the last column that contains data
- colcount = fpSpread1.DataColCnt
- ' Copy the data to the designated cells
- fpSpread1.CopyRange 1, 1, colcount, rowcount, colcount + 1, rowcount + 1
- End Sub
复制代码 |