Free Support Forum - aspose.com

Header/footer property not getting set correctly

Hi,

Header/footer property when doing workbook.combine is not getting copied to the new workbook.

Sample: BIP_Report.xls

Output: outputWithAspose.xls

In my template, I have only “Align with Page margins” checked. However, the Aspose output has it unchecked and “Scale with document” checked.

Thanks

DJ

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.FileFormatType;
import com.aspose.cells.License;
import com.aspose.cells.Workbook;
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());
outputWorkbook.combine(book);
}
}

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

}

}

Hi DJ,


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

Hi,

We have fixed this issue. Please download Aspose.Cells for Java v2.5.4.6

Hi,

Thanks for the fix. It is working fine now.

Thanks

DJ

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


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