2
Answers

error in the C# code

maayah2000

maayah2000

20y
2.2k
1
hi I wrote this code to open excel sheet using C#.net but ther is an error in the open function can you tell me what is it // Excel object references. private Excel.Application m_objExcel = null; private Excel.Workbooks m_objBooks = null; private Excel._Workbook m_objBook = null; private Excel.Sheets m_objSheets = null; private Excel._Worksheet m_objSheet = null; private object m_objOpt = System.Reflection.Missing.Value; //object definetion m_objExcel = new Excel.Application(); m_objBooks = (Excel.Workbooks)m_objExcel.Workbooks; m_objBook = (Excel._Workbook)(m_objBooks.Add(m_objOpt)); m_objExcel.Visible = true; m_objBook.OpenLinks("c:/test2.xls",m_objOpt,m_objOpt); thanks
Answers (2)
0
Crish
NA 3.7k 76.4k 14y
hi

use datagridview's Rowdatabound event for calculating amount. then store it in textbox which u have taken outside of the grid.

you can find each label control values in Rowdatabound event . Sum of there and finally store value in textbox.

Don't forget to Mark Do you like this Answer
 that solved your problem!