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
95
Import Excel Workbook.Load() problem
posted

Win7, Vs2010 , silverlight 4

 

Hi, When i try to run this code, it trows exception like that "The type initializer for 'SR' threw an exception." on Workbook.Load().

Code from http://help.infragistics.com/Help/NetAdvantage/Silverlight/2010.2/CLR4.0/html/SL_Getting_Started_with_Infragistics_Excel_Engine.html


private
void Button_Click(object sender, RoutedEventArgs e)
{
OpenFileDialog openfileDialog = new OpenFileDialog();
Workbook workbook1;

// Open dialog
if (openfileDialog.ShowDialog() == true)
{
// If user selected a file get the stream of that file
FileStream stream = openfileDialog.File.OpenRead();

// Load workbook with data
workbook1 = Workbook.Load(stream);

stream.Close();
}
}

 

 

Parents
No Data
Reply Children