01/10/2018, 09:27
Sửa lỗi trong C# winform
“Cannot perform runtime binding on a null reference”.
Mình gặp phải lỗi này khi import một file excel lên listview trong winform. Mình tạo đã tạo file excel bên ngoài, add reference cần thiết rồi. Mình mò mãi mà không fix được. Mọi người có thể giúp mình được không ạ. Cám ơn mọi người nhiều
Bài liên quan
Đưa source lên mọi người thử cho.
source đây ạ
//button Import
private void btnImport_Click(object sender, EventArgs e)
{
//Mở tệp tin
OpenFileDialog fopen = new OpenFileDialog();
//lọc ra đuôi excel
fopen.Filter = “(Tất cả các tệp)|.| (Các tệp excel)|*.xls”;
fopen.ShowDialog();