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
25
SaveFileProvider can not be found
posted

I keep getting this error: "The type or namespace name 'SaveFileProvider' could not be found (are you missing a using directive or an assembly reference?) "

I know that I'm missing reference, but I'm referencing everything I can think of to reference, but it's still not picking it up.
Please see below all that I'm using: 

using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Threading;
using Infragistics.Controls.Grids;
using Infragistics.Documents.Excel;
using Infragistics.Olap;
using Infragistics.Olap.Data;
using Infragistics.Olap.FlatData;

Here is the problem bit of code in which the only error I am getting is the fact that SaveFileProvider can't be found
 

private void SaveExport(Workbook dataWorkbook)
{

SaveFileProvider saveProvider = new SaveFileProvider();
saveProvider.Dialog.DefaultExt = "xls";

bool? showDialog = saveProvider.Dialog.ShowDialog();


if (showDialog == true)
{


using (Stream exportStream = saveProvider.Dialog.OpenFile())


{

dataWorkbook.Save(exportStream);
exportStream.Close();

}


}

What exactly am I doing wrong here?