i making program open excel file in c# , data it.
private void xlconnect_click(object sender, eventargs e) { type = 1; open.filter = "excel|.xlsx"; open.showdialog(); } public void readfile() { if (type == 1) { messagebox.show("success"); } }
my problem code when open dialog appears, doesnt show file select. wrong in code?
- use asterisk in filter.
- possibly machine contains old style excel-files?
use filter:
open.filter = "excel (*.xls, *.xlsx)|*.xls;*.xlsx";
Comments
Post a Comment