hi
this is Krishna
I have to develop one application which displays excel or text file data in text box
see the below screens(how to add pictures)-->i don't know so i describe below
Form:
mobile numbers Text box
upload button
when i click on upload button it has to show only excel and txt files only
and when i click on excel or text file if it contains the mobile numbers then those are display in text box with comas
my code is like below:
private void lnklUpload_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
OpenFileDialog browseFile = new OpenFileDialog();
browseFile.Filter = "Excel Files (*.xlsx;*.xls;*.txt)|*.xlsx;*.xls;*.txt";
browseFile.Title = "Browse To Excel 2007 File";
if (browseFile.ShowDialog() == DialogResult.Cancel)
return;
try
{
txtMobileNumber.Text = browseFile.FileName;
string conExcel = txtMobileNumber.Text;
}
catch (Exception)
{
MessageBox.Show("Error opening file", "File Error",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
I achieved:
1.it shows txt,excel files only that is fine for me
I have to achieve:
1.it has to display mobile numbers side by side
for example if i have 10 mobile numbers in excel sheet when click on that excel sheet it has to show the mobile numbers in textbox like below
8765432567,9876543567,...........