I have an object with a lot of subqueries and I want do export to excel just like Linqpad does, here is an example:
Any help?
Tks
If you include a reference to linqpad.exe in your project, you can then use it to do the export to html
eg,
List<User> users = ....
var filename = "test.html";
var writer = LINQPad.Util.CreateXhtmlWriter();
writer.Write(users);
System.IO.File.WriteAllText(filename, writer.ToString());
// Open the file in excel
Process.Start("Excel" , filename);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With