private void btnImportar_Click(object sender, EventArgs e) { try { string path = fn.FileOpen("Excel Files | *.xlsx", "Seleccione el archivo de Excel"); if (string.IsNullOrEmpty(path)) { return; } Cursor = Cursors.WaitCursor; fn.ImportExcelFromGrid(dgvDatos, path); } catch (Exception EX) { MessageBox.Show(EX.Message); } finally { Cursor = Cursors.Default; } }