Read a sheet from .xlsm file with Silverlight

Jan 7, 2014 at 9:57 AM
Edited Jan 7, 2014 at 9:57 AM
Hi,
I'm trying to read data from Excel 2003 macro enabled worksheet in silverlight Application. Using dll Lite.ExcelLibrary and Lite.Library. I can able to read data Excel 2003 without macro enabled files.

Please help me any one.

But Macro Enabled getting error "An item with the same key has already been added".



{System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary2.Add(TKey key, TValue value)
at Lite.ExcelLibrary.CompoundDocumentFormat.DirectoryEntry.AddChild(DirectoryEntry entry)
at Lite.ExcelLibrary.CompoundDocumentFormat.CompoundDocument.ReadDirectoryEntry(BinaryReader reader, Int32 DID, DirectoryEntry parent)
at Lite.ExcelLibrary.CompoundDocumentFormat.CompoundDocument.ReadDirectoryEntry(BinaryReader reader, Int32 DID, DirectoryEntry parent)
at Lite.ExcelLibrary.CompoundDocumentFormat.CompoundDocument.ReadDirectoryEntry(BinaryReader reader, Int32 DID, DirectoryEntry parent)
at Lite.ExcelLibrary.CompoundDocumentFormat.CompoundDocument.ReadDirectoryEntry(BinaryReader reader, Int32 DID, DirectoryEntry parent)
at Lite.ExcelLibrary.CompoundDocumentFormat.CompoundDocument.ReadDirectoryEntry(BinaryReader reader, Int32 DID, DirectoryEntry parent)
at Lite.ExcelLibrary.CompoundDocumentFormat.CompoundDocument.ReadDirectoryEntries()
at Lite.ExcelLibrary.CompoundDocumentFormat.CompoundDocument.Open(FileStream stream)
at Lite.ExcelLibrary.CompoundDocumentFormat.CompoundDocument.Read(FileStream fs)
at Lite.ExcelLibrary.SpreadSheet.Workbook.Open(FileStream stream)
at ReadingExcelSample.MainPage.btnSelectFile_Click(Object sender, RoutedEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)