I found this bit of code to export my data to Excel:
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);
This exports data in format mode. What code should I copy only "Export> Export to Excel"?
This function is not currently displayed for XhtmlWriter , but there is a WriteCsv method in LINQPad.Util that can do what you want:
XhtmlWriter
WriteCsv
LINQPad.Util
Util.WriteCsv (Customers, @"c:\temp\customers.csv");
Source: https://habr.com/ru/post/1489577/More articles:How to convert String to and from BigInteger view in Java? - javaXSL-FO footer in static but dynamic content? - xmlActive CodeIgniter record compares date - codeigniterWhy does OCMock partialMock interrupt KVO? - objective-cWPF save settings - .netInstalling Bugzilla 4.2.5 with Mysql 5.6.11 - mysqlHow to print and enter user input in a text box in tkinter, Python 3.2.5? - pythonConverting Pandas Dataframe Types - pythonBest way to install OpenCV on Windows with Enthought Canopy Python? - pythonSlickGrid does not handle columns properly - javascriptAll Articles