Conditional formatting lost when doing workbook.combine()

Hi,

I am trying to combine two workbooks which have conditional formatting. Formatting gets lost when doing workbook.combine().

Sample File: ConditionalFormattingIssue.xls

Output File: outputWithAspose.xls

Conditional Formatting Snapshot: formatting.jpg

Please let me know if you require any further details

Thanks

Dheena

Sample Code:

/*
* File : $Source: $
* Version : $Revision: $
* Date : $Date: $
* Modified by : $Author: $
*/

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import com.aspose.cells.*;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

public class TestAspose
{
static String wd = "C:\\Developer\\TEMP\\frame\\";

@SuppressWarnings("unchecked")
public static void main(String[] args) throws Exception
{
File file = new File("C:\\Developer\\TEMP\\frame\\");
File[] inputFiles = file.listFiles();

License license = new License();
license.setLicense(new FileInputStream("C:\\Developer\\work\\workspace\\TestAspose\\lib\\Aspose.Cells.lic"));
Workbook outputWorkbook = new Workbook();
for (File inputFile : inputFiles)
{

if (!inputFile.getAbsolutePath().equalsIgnoreCase("C:\\Developer\\TEMP\\frame\\master_blank.xls"))
{
Workbook book = new Workbook();

book.open(inputFile.getAbsolutePath());
Worksheets sheets = book.getWorksheets();
Worksheet sheet = sheets.getSheet(0);
sheet.setName("Test");
outputWorkbook.combine(book);
}
}

String fileName = wd + "outputWithAspose.xls";
outputWorkbook.save(fileName, FileFormatType.EXCEL97TO2003);
}

}

Hi,


Thank you for bringing this to our knowledge.
We are able to re-produce your said issue with latest fix version of Aspose.Cells JAVA v2.5.4.9. So we have logged this issue in our Bug Tracking System under Ticket ID CELLSJAVA-28695. Soon we will get back to you on this.

Note: I have attached my output file and snapshot for your reference. If you find any difference from your output then please let us know.

Hi,

We have fixed the issue of copying Conditional Formatting.

Please download: Aspose.Cells for Java v2.5.4.10

Hi

Thanks for the fix. It worked out.

Thanks

Dheena

The issues you have found earlier (filed as 28695) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.