将Excel范围复制到Java中的工作表

Microsoft Excel Range可以包含一个或多个单元格。 它具有起始单元格和结束单元格。 起始单元格和结束单元格中的所有单元格都构成一个范围。 有时,用户希望将一系列单元格复制到同一工作表内的其他位置或不同工作表内的其他位置。

The purpose of this article is to explain how the Java developers or programmers can use Aspose.Cells in their applications to copy Excel range to same worksheet or different worksheet.

Aspose.Cells API supports number of platform e.g. .NET, Java, C++, Android, JavaScript, PHP etc. Besides, Aspose.Cells is available in Cloud as REST or RESTful APIs.

Copy Excel Range to Same Worksheet

以下Java示例代码将示例Excel文件加载到Aspose.Cells Workbook对象中。 然后,它访问第一个工作表,其中包含我们要复制到同一工作表的源Excel范围。 然后使用Range.copy()将其复制到工作表中新位置的方法。

The following screenshot shows the sample Excel file used inside the code and the output Excel file generated by the code for your reference. As you can see inside the screenshot, the source Excel range has been copied to the destination Excel range.

字幕:使用Aspose.Cells API将Excel Range复制到同一工作表中的其他位置

Excel Range copied to different location inside the Same Worksheet using Aspose.Cells API

Copy Excel Range to Different Worksheet

以下Java示例代码将示例Excel文件加载到Aspose.Cells Workbook对象中。 它访问包含源Excel范围的第一个工作表和要复制源范围的第二个工作表。 然后,使用以下命令将第一个工作表的源范围复制到第二个工作表内的目标范围中Range.copy()方法。

The following screenshot shows the sample Excel file used inside the code and the output Excel file generated by the code for your reference. As you can see inside the screenshot, the source Excel range has been copied to the destination Excel range in different worksheet.

字幕:使用Aspose.Cells API将Excel范围复制到其他工作表

Excel Range copied to Different Worksheet using Aspose.Cells API

See also

from: https://dev.to//asposecells/copy-excel-range-to-worksheet-in-java-648

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值