Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Unable to load .xlsm file in .Net Standard 2.0 Project with Exception - Invalid or unrecognized file format. (Parameter 'stream')
posted

Trying to load a xlsm file in the workbook using --> 

Workbook.Load(fileStream);

Getting an exception - Invalid or unrecognized file format. (Parameter 'stream')

This is a dot net standard 2.0 project. The same line of code works fine in a .net framework 4.6 project. 

Any ideas on what can be the issue ?

Parents
No Data
Reply
  • 0
    Offline posted

    First things first, how do we create a Xamarin Forms app with a .Net Standard 2.0 lib instead of a PCL.
    To accomplish this now ( without any new Visual Studio templates ), just create a new blank PCL Xamarin Forms app.
    When this is done, add an extra project but this time select a .Net Standard Library. You’ll get a popup window for selecting which version of .Net Standard you want to target, select Version 2.0!If you don’t see version 2.0 yet, that means that you still need to install the new .Net Core 2.0 SDK.

    I hope this helps!

    Ben Martin

Children
No Data