Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
write two excel sheet
object missing=Missing.Value;
Excel.Application myExcel = new Excel.Application ( ) ; myExcel.Application.Workbooks.Open(fileName,missin g,missing,missing,missing, missing,missing,missing,missing,missing,missing,mi ssing,missing); Excel.Workbook myBook=myExcel.Workbooks[1]; Excel.Sheets sheets=myBook.Worksheets; for(int currSheet=1; currSheet < 2; currSheet ++) { Excel.Worksheet mySheet=(Excel.Worksheet)sheets.get_Item(currSheet ); //write data, eg:: mySheet.Cells[1,1] = "1"; mySheet.Cells[2,1] = "2"; Excel.Range r=mySheet.get_Range(mySheet.Cells[1,1],mySheet.Cells[2,1]); r.Select(); //wrong when second loop, Why? } |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to write X Bar in Microsoft Excel Sheet? | New Users to Excel | |||
How do I write inclined text in a picture in excel sheet? | Excel Worksheet Functions | |||
how do i write a Algebra formula in excel sheet | Excel Discussion (Misc queries) | |||
How do I undo write protected to excel sheet send to floppy disk | Excel Discussion (Misc queries) | |||
Write a Shortcut to Open Excel Workbook at a Specific Sheet | Excel Programming |