Export IDataReader

Andrei Ignat edited this page Jan 24, 2016 · 4 revisions

IDataReader could be a SqlDataReader , OracleDataReader, MySqlDataReader, others - obtain from database or from a table ( see

[TestMethod]
public void TestIDataReader()

Video at https://youtu.be/kDfNjY1Lfkg #Code:

var dataReader = //obtain IDataReader( SqlDataReader , OracleDataReader, MySqlDataReader, others) from database
var byteIDataReader = ExportFactory.ExportDataIDataReader(dataReader, ExportToFormat.Excel2003XML);
var str = Encoding.Unicode.GetString(byteIDataReader);
File.WriteAllText("a.xls", str);
Process.Start("a.xls");
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.