Merge XLSM Formats in Java
Native XLSM document merger using server-side Java APIs.
How to Merge XLSM Files Using Java
In order to merge XLSM file, we’ll use Aspose.Cells for Java API which is a feature-rich, powerful and easy to use merger API for Java platform. You can download its latest version directly from Maven and install it within your Maven-based project by adding the following configurations to the pom.xml.
<repository> <id>AsposeJavaAPI</id> <name>Aspose Java API</name> <url>https://repository.aspose.com/repo/</url> </repository>
<dependency> <groupId>com.aspose</groupId> <artifactId>aspose-cells</artifactId> <version>version of aspose-cells API</version> <classifier>jdk17</classifier> </dependency>
Steps for Merging XLSM Files in Java
A basic document merging and concatenating with Aspose.Cells for Java APIs can be done with just few lines of code.
- Load the first XLSM file with an instance of Workbook class.
- Load the second XLSM document with an instance of Workbook class.
- Merge files using combine() method.
- save the merged XLSM file at specified path
Aspose.Cells for Java supports on all major platforms and Operating Systems. Please make sure that you have the following prerequisites.
- Microsoft Windows or a compatible OS with Java Runtime Environment for JSP/JSF Application and Desktop Applications.
- Get latest version of Aspose.Cells for Java directly from Maven .
Merge XLSM Files - Java
// Open the first XLSM file. Workbook xlsmFile1 = new Workbook("chartsFileWithPath.xlsm"); // Define the second source book. // Open the second XLSM file. Workbook xlsmFile2 = new Workbook("pictureFileWithPath.xlsm"); // Combining the two workbooks xlsmFile1.combine(xlsmFile2); // Save the target book file. xlsmFile1.save("combinedFileWithPath.xlsm");
Online XLSM Merger Live Demos
About Aspose.Cells for Java APIAspose.Cells API can be used to create, edit, convert and render Microsoft Excel formats to different formats. Moreover, it can be used for comprehensive charting, scalable reporting and reliable calculations within software applications. Aspose.Cells is a standalone API and it does not require any software like Microsoft or OpenOffice.
XLSM What is XLSM File Format
Files with XLSM extension is a type of Spreadsheet files that support Macros. From application point of view, a Macro is set of instructions that are used for automating processes. A macro is used to record the steps that are performed repeatedly and facilitates performing the actions by running the macro again. Macros are programmed with Microsoft's Visual Basic for Applications (VBA) from within the Excel Workbook using the Visual Basic Editor and can be run/debug directly from there.Read More
Other Supported Merging Formats
Using Java, One can also merge many other file formats including..