Hi,
You can use a StreamReader to read the file and select what part you want. You have a special StreamReader called FileReader for making it easier.
example:
Code:
if (_ofdSelectFile.ShowDialog() == DialogResult.OK)
{
using (StreamReader sr = new StreamReader(_ofdSelectFile.FileName))
{
//Read file with url's
while (!sr.EndOfStream)
{
string directImportLine = sr.ReadLine();
//actions with 1 line
}
}
}
They are also a few tips and tricks with excel sheets.
You can acces (write and read) data from an excel sheet just like in a DB. It uses special SQL statement so you can select cells, colums or rows.
Hope it helped.
Grtz