1
Answer

Missing Office.Interop.Excel Reference

Thomas Leslie

Thomas Leslie

14y
1.7k
1

Hy Gurus!

I hope i am writing in the right place.  I would like to use the Microsoft.Office.Interop.Excel to read and write Excel files, but (maybe i am the lame) i just found some little examples. I need the full reference of this namespace. What i found is http://msdn.microsoft.com/en-us/library/ms262200(v=Office.11).aspx, wich doesn't contain useful things for me. Is there any other full reference of this namespace?
Answers (1)
1
Midhun T P
NA 19.7k 281.2k 7y
Hi,
 
I think in the above code, the for loop will skip first row. Try giving value of "i" in for loop as -1;
 
for (int i = -1; i < dataGridView2.Rows.Count - 1; i++)
{
Accepted
0
Shafiqq Aziz
NA 45 809 7y
Midhun T P
Got it, thank you very much!
0
Shafiqq Aziz
NA 45 809 7y
Nilesh Sawardekar
 
Good suggestion but not working. Changed to 2 my header gone, change to 0 it throw an error (Exception on HRESULT: 0x800A03EC). Any other suggestion?
0
Nilesh Sawardekar
NA 1.4k 15.2k 7y
int cellRowIndex = 1;
 
change value of it and check.