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(); } }
private
void
object
new
// Open dialog
if
true
// If user selected a file get the stream of that file
// Load workbook with data
In the Silverlight Excel library, we currently only support reading andwriting the Binary (BIFF) excel file format. Support for the ExcelML (eg .xlsx) file format is coming in the 2010 Volume 3 release.
Devin
extension of excel file in infragistics sample is *.xls. But extension of binary (BIFF) excel file format is *. xlsb, isn't it?