Combine

Hi,

We have bought the Aspose.Excel professional product. When I use excel1.Combine(excel2) - I do get the sheet of 2 attached into 1 but the data is all garbage - especially the word “luggage” in all of the cells!! Why is that and how can I get it to work properly?

Also, my understanding was that images would also be copied over…please lket me know if thatis not the case.

Thanks,

Andy Sareen

Hi Andy,

Your understanding is right. But have you tried the latest hotfix v2.9.4 at



If yes, please upload your two files and sample code here. I will check them ASAP.

Hi Laurence,

Thanks for your prompt reply. I downloaded the latest version and the text issue is resolved. Smile But, the image is still not getting copied over. How should the image be embedded into excel? Is there something special we have to do? Here is my code:

string strSecondFile = "Second.xls";
string strMasterFile = "Master.xls";

Aspose.Excel.Excel excel2 = new Aspose.Excel.Excel();
Aspose.Excel.Excel excel1 = new Aspose.Excel.Excel();

Aspose.Excel.License license = new Aspose.Excel.License();
license.SetLicense("Aspose.Excel.lic");

excel2.Open( strSecondFile );
excel1.Open( strMasterFile );

excel1.Combine( excel2 );

excel.Save( strMasterFile );

Hi Laurence,

ooopppssss - the last line should read:

excel1.Save( strMasterFile );

Your help would be greatly appreciated.

Thanks,

Andy

Hi Andy,

Excel.Combine method only combines data and formatting with the second file. Images, charts and other drawing objects are not supported for it’s too complex. You can try to combine the data of two file and insert images at run time using Picutures APIs.