Retreiving values from excel sheet using COM Object ?
-
we are using microsoft Office 9.0 Library & COM namespace is OWC TextBox1.Text = xlsheet.ActiveSheet.Cells[i,1]; While writting this code it is not converting to object to string but in reverse case it is working properly uploading to spreadsheet. //This is the Error Error: Cannot convert Object to String So pls convey this & let me know the solution for the above problem. I m using asp.net with c# coding. Thanking u, Naren. Pls let me Know
-
we are using microsoft Office 9.0 Library & COM namespace is OWC TextBox1.Text = xlsheet.ActiveSheet.Cells[i,1]; While writting this code it is not converting to object to string but in reverse case it is working properly uploading to spreadsheet. //This is the Error Error: Cannot convert Object to String So pls convey this & let me know the solution for the above problem. I m using asp.net with c# coding. Thanking u, Naren. Pls let me Know
Could try: TextBox1.Text = (string)xlsheet.ActiveSheet.Cells[i,1]; or TextBox1.Text = xlsheet.ActiveSheet.Cells[i,1].ToString();