We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Workbook.Open returns error when opening custom OpenXML Excel file in .NET

Hi guys,

I've started developing with Apose.Cells and all works well, though I have struck an unusual error.
I am building an excel file using the OpenXML SDK which works fine.
I can open the file in Excel2007 without a problem, the data is there.

But if I try to use Apose.Cells to open the file specifying FileFormatType.Excel2007Xlsx (or not), I get an error (stack trace pasted below).
However, if I open the file in Excel2007 and save it first (making no changes), the file will then open OK.

This leads me to believe I am missing something when I create my OpenXML doc that Excel is automatically adding.

Is anyone able to tell me the specific XML part or node I need to add to my excel doc to get it working?
(I have looked at the internal xml parts of the xlsx doc, but there doesnt seem to be anything obvious)

I have also attached a copy of the unprocessed file.

Cheers,
Josh

Stack Trace:
[ArgumentNullException: Value cannot be null. Parameter name: entry]
໵.ᡯ.GetInputStream(ᣂ entry) +92
໵.᨞.ᩂ(ᡯ ᡭ, String ခ) +77
໵.᨞.ᨱ() +94
໵.᨞.ឝ() +119
໵.❁.❂(Workbook གྷ, Stream ݩ) +75 Aspose.Cells.Workbook.Open(String fileName, FileFormatType type) +690

Hi Josh,

Thank you for sharing your template file.

We have found your mentioned issue after an initial test. We will look into it and get back to you soon.

Thank You & Best Regards,

Hi Josh,

Thank you for considering Aspose.

Please try the attached latest version of Aspose.Cells. We have fixed your mentioned issue regarding opening an Xlsx file. Please feel free to contact us if you still face any problem.

Thank You & Best Regards,

Thanks Nausherwan,


I’ve put the updated dll in the Bin folder of my project, but I still get the same error!
I dont have to install it anywhere else?

Cheers,
Josh

Hi Josh,

Please make sure that you are using the latest fix that we have provided you. I think you just need to download the fix (that Nausherwan attached in previous post) to save to some folder. Now, in VS.NET project, you may simply remove the older Aspose.Cells component's reference and then add reference to the new Aspose.Cells.dll (fix). Now re-build and run the project, it should work fine. I have tested your issue with your template file and it works fine.

Thank you.

Hi thanks for the quick response Amjad,

I’ve updated my references but still no luck

Just to test I just downloaded the sample I initially sent you and it worked ok so I’m not sure if I sent you a defective file in the first place!

I think I must be going crazy, I have re-created a new file which definitely gives the error which I have attached here.

Could you please test this one with and confirm it works ok

Remember you cant open it with regular excel first otherwise it gets 'fixed’

Thanks for your time

Cheers,
Josh

Hi Josh,

Thank you for considering Aspose.

We have found your mentioned issue after an initial test. We will look into it and get back to you soon.

Thank You & Best Regards,

Hi Nausherwan,


Sorry to bump this, but is there any update on this?
I have to demo my project to the client tmrw, hoping to show this functionality too!

Cheers,
Josh

Hi Josh,

Thank you for considering Aspose.

We are working on your issue and we will provide you a fix as soon as the issue gets resolved.

Thank you for being patient,

Hi,

Thank you for considering Aspose.

Please try the attached latest version of Aspose.Cells. We have fixed your mentioned issue. If you still face any problem, please do let us know.

Thank You & Best Regards,

Thanks guys,

That works a treat.
Thanks again for your quick response!

J

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


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