As I recall, SSIS and SSRS expose a COM interface (though I could be wrong on that). If they do, then, yes, it would be possible to call SSIS packages through the out-of-browser option in Silverlight 4. See, for starters, this video.
However, this isn't really what Silverlight was designed for. If your LOB app is just a standard data access/updating thing, then, yeah, Silverlight is a reasonable candidate. But if you're having to interact with your enterprise infrastructure in any significant way that can't easily be wrapped in a WCF web service, I'd probably stick with WinForms or WPF. I suspect you'll probably find yourself chasing fewer dead ends.
I was also looking for something simillar to help export the data in the datagrid into excel, but found nothing which works.
Atlast I just converted the content of the DataGrid into a 2D array of string and exported it using the interop dll.
The code looks something like this:
Excel.Application xlApp;
Excel.Workbook xlWorkBook;
Excel.Worksheet xlWorkSheet;
object misValue = System.Reflection.Missing.Value;
Excel.Range rangeToHoldHyperlink;
Excel.Range CellInstance;
xlApp = new Excel.Application();
xlWorkBook = xlApp.Workbooks.Add(misValue);
xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
xlApp.DisplayAlerts = false;
//Dummy initialisation to prevent errors.
rangeToHoldHyperlink = xlWorkSheet.get_Range("A1", Type.Missing);
CellInstance = xlWorkSheet.get_Range("A1", Type.Missing);
for (int i = 0; i < NumberOfCols; i++)
{
for (int j = 0; j <= NumberOfRows; j++)
{
xlWorkSheet.Cells[j + 1, i + 1] = DataToWrite[j][i];
}
}
If you are looking for some formating, they are also supported in this. I wanted to add a hyperlink and the following code does that:
CellInstance = xlWorkSheet.Cells[j + 1, i + 1];
xlWorkSheet.Hyperlinks.Add(
CellInstance,
DataToWrite[j][i],
Type.Missing,
"Hover Text Comes Here",
"Text to be displayed");
If you want the first row to be the header, you can highlight them as follows:
Excel.Range Range1 = xlWorkSheet.get_Range("A1");
Range1.EntireRow.Font.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Black);
Range1.EntireRow.Interior.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.LightSkyBlue);
Range1.EntireRow.Font.Size = 14;
Range1.EntireRow.AutoFit();
Finally to Save the excel in a desired path:
xlWorkBook.SaveAs(@FilePath, Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue, Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
xlWorkBook.Close();
The reference to the interop is added as follows:
Right Click on the Project name -> Click "Add reference" -> Goto "COM" tab -> Search for "Microsoft Excel Object Library" click "OK" to add the reference.
You must be using the following namespace :
using Excel = Microsoft.Office.Interop.Excel;
using System.Runtime.InteropServices;
Best Answer
Although Silverlight is sand-boxed and it isn't possible to open and save files to the local file system direcly, it is possible to get a stream to a local file.
There are the OpenFileDialog and SaveFileDialog classes. These classes make it possible to let the user select a file or location. They return only a stream to that file and do not give any information about the filesystem. This way it's possible to import and export to excel for example.
This example should be enough to get you going.
update: in the meantime I did a small SilverBullet(tm) on the subject on my blog at http://www.timmykokke.com/