Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
465
Read Excel file and populate a DataReader/DataTable
posted

Hi all,

is there a way - using an openFileDialog - to pass the stream of an Excel file to a DataReader that then I'm using with this code:

 

using

 

(SqlBulkCopy bulkCopy = new SqlBulkCopy(sqlConnectionString))

{

bulkCopy.DestinationTableName =

"ExcelData";

bulkCopy.WriteToServer(myDataReader);

}

 

Thanks in advance.

Luigi

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Luigi,

    I'm not sure I understand your question or what it has to do with the UltraWinEditors controls.

    If you are using the Infragistics Excel assembly, then you can load an Excel file into a Workbook object. But there's no way to translate that directly into anything the DataReader would be able to understand.

Children
No Data