Free Support Forum - aspose.com

Importing Excel files

I am putting together a large report with ASPose. Part of the report is a separate .XLS file that I would like to import into ths report I am creating with ASPose. Is there a way to do this?

Thanks
Pam

Along with this, I added some sheets that contained Objectes that are Word doc. The program used to create the .XLS runs perfectly. However, when I try to open the file, it doesn’t open. There is no error message, it just flashes before my eyes and closes down. Should I not be putting embedded Word objects in my sheets?

Thanks
Pam

Hi Pam,

You can try Excel.Combine method to import your seperate excel files. But if those files contains drawing objects, drawing objects will be lost.

About the word objects, which edition of Aspose.Excel are you using? Ole objects are only supported in Corporate and above version. Now you can try to see if it works fine without using the licesne file( evaluation license).

And you can email me your designer file and I will investigate it.

The excel sheets in the second file don’t contain anything special - just cells of information (with colored areas).

I will try the .Combine method. One question. Where will it put the pages of the second file? Will they drop in at the end of the last sheet of the first file?

I do have the Professional license, so now I understand why the Word objects aren’t able to be seen. I will find a workaround for this.

Thanks for all your help.

Pam

Yes. The combined second file is put at the end of the last sheet of the first file.

If your word objects are just pictures, you can cut and paste them in MS Paint and convert them to normal images. Then you put thest images in your designer file. Professional edition can import the images.

OK, what am I doing wrong…

I took my .DOC file, converted it to .JPG. Then I put it on a sheet in my designer file (using Inesrt, Create Fom File on the Excel menu). Nothing else on this sheet needs to be touched by Aspose. I run my program filling in all of the other sheets sucessfully.

When I try to open the file I just created, I get a quick flash and then nothing else, so my file never really opens. Is this a limitiation of Professional? I am not importing objects at runtime - they are in the designer file.

Thanks for any help and insight.

Pam

If you convert them to JPG file, Professional edition will import them successfully. I doubt some of the objects in your designer file are not converted to jpg file.

You can try to use evaluation copy of Aspose.Excel to see if it works fine. If not, please send me your designer file and create file by email. I will investigate it. If the evaluation copy works fine, please re-check your designer file to remove all ole objects. Or you can select to upgrade to Corporate edition.

Anyway, if possible, email me your designer file and created file, then I can find what caused your problem.

I found a good workaround for this by just putting it in Excel. Thanks anyway for the suggestions.

Pam

I just got around to using the Excel.Combine and it does indeed pull in the pages from another Excel document as I expected. For some reason, though, the sheet names don’t carry over. Is this by design?

Thanks
Pam

Hi Pam,

Yes. Combine method doesn’t copy sheet name from the second file.

MS Excel doesn’t allow same sheet name in two worksheets and the two excel file may have same sheet names in some cases. So Aspose.Excel doesn’t copy the sheet name and let user to do it.