Importing into Excel

I have read on the Web that it is possible to import an Excel file into .NET using Flexcel. I have Flexcel presently and uses it for export into Excel with great options. Can we do the opposite?



Without a library, we have to install this "2010 Office System Driver: Data Connectivity Components", which is not really a drive BTW but a full Access engine. This is something I do not want on the server.



If I could import using Flexcel, that would be great. Basically, in my previous class, I was using the Jet engine to import XLS into a dataset. Can Flexcel import a XLSX into a dataset?

Hi,

Yes, you chould be able to import an xlsx file with FlexCel. You can look at the demo "10.API\20.Reading Files" for an example. Also "10.API\22.Virtual Mode" shows a different way to import the files: Instead of loading the full file into memory, you write to the dataset as the file is being loaded. Virtual mode will use less memory, but it is more complex to implement: for small files (less than 10,000 rows) you might want to just use the code in the Reading file demo.

Thank you, this is working.