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

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

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);