我正在从List<>脱颖而出.我想使一些特定的行和单元格粗体.我也需要做一些细胞合并.
以下是我正在使用的代码.
try
{
Excel.Application application;
Excel.Workbook workBook;
Excel.Worksheet workSheet;
object misValue = System.Reflection.Missing.Value;
application = new Excel.ApplicationClass();
workBook = application.Workbooks.Add(misValue);
workSheet = (Excel.Worksheet)workBook.Worksheets.get_Item(1);
int i = 1;
workSheet.Cells[i, 2] = "MSS Close Sheet";
i++;
workSheet.Cells[i, 2] = "MSS - " + dpsNoTextBox.Text;
i++;
workSheet.Cells[i, 2] = customerNameTextBox.Text;
i++;
workSheet.Cells[i, 2] = "Opening Date : ";
workSheet.Cells[i, 3] = openingDateTextBox.Value.ToShortDateString();
i++;
workSheet.Cells[i, 2