user543820 0 Light Poster

Hi!

I want to read data from worksheet of one excel workbook and display it in the sheet of other. My code doesn't read the data, means it doesn't display it either.
I tried a lot writing different pieces of code but it didn't work. Following are the lines. Please help me out.

//select worksheet from workbook (s is a string name of sheet)
Excel.Worksheet mySheet1 = (Excel.Worksheet)worksheet.get_Item(s);
//I want to pick word from A3. range1 is the range of source file
range1 = (Excel.Range)mySheet1.get_Range("A3", "A3".ToString());
                String data = range1.Cells.Value;
//worksheet1 is the destination excel sheet. i want to put the value in B2           
((Excel.Range)worksheet1.Cells[2,3]).Value2 = data;


//I tried this too
                worksheet1.Cells[2, 2] = data;
                workbook.Save();