Excel.Application excel = new Excel.Application ();
excel.Cells[ 1 , 1 ] = "First Row First Column";
excel.Cells[ 1 , 2 ] = "First Row Second Column";
excel.Cells[ 2 , 1 ] = "Second Row First Column";
excel.Cells[ 2 , 2 ] = "Second Row Second Column";
excel.ActiveCell.FormulaR1C1 = "11111";
(excel.Cells[ 1 , 1 ] as Excel.Interior).ColorIndex = 3; //控制單元格的顏色出現錯誤,需要怎樣寫才可以控制?
excel.Visible = true ; -----------------------------------
thx
excel.Cells[ 1 , 1 ] = "First Row First Column";
excel.Cells[ 1 , 2 ] = "First Row Second Column";
excel.Cells[ 2 , 1 ] = "Second Row First Column";
excel.Cells[ 2 , 2 ] = "Second Row Second Column";
excel.ActiveCell.FormulaR1C1 = "11111";
(excel.Cells[ 1 , 1 ] as Excel.Interior).ColorIndex = 3; //控制單元格的顏色出現錯誤,需要怎樣寫才可以控制?
excel.Visible = true ; -----------------------------------
thx
excel.get_Range(excel.Cells[rowSum,colSum],excel.Cells[rowSum,colIndex]).Select();
excel.get_Range(excel.Cells[rowSum,colSum],excel.Cells[rowSum,colIndex]).Interior.get_Color();//设置为浅黄色,共计有56种