Excel file creation

Hi,

I am following the excel file creation tutorial here: https://www.syncfusion.com/kb/6903/how-to-create-an-excel-file-in-xamarin
I am getting "System null reference exception: Object reference not set to an instance to an object" error at this line:
Xamarin.Forms.DependencyService.Get<ISave>().SaveAndView("GettingStared.xlsx", "application/msexcel", stream);
Before starting to work I added the XlslO and Compression nugets.
I also added ISave.cs  and the license key in the forms projects.
If you could help me with this problem I will really appreciate it.
Thanks 

2 Replies

AL Ali September 18, 2018 04:49 PM UTC

I found the problem. I should have added the other helper files to the android and ios projects too.


PK Prakash Kumar D Syncfusion Team September 19, 2018 05:12 AM UTC

Hi Ali, 
 
Thank you for contacting Syncfusion support. 
 
We are glad to know that you have found a solution. Please let us know if you need further assistance. 
 
Regards, 
Prakash Kumar 


Loader.
Up arrow icon