私はこのコードを持っています:
Microsoft.Office.Interop.Excel.Application xla = new Microsoft.Office.Interop.Excel.Application();
xla.Visible = false;
Workbook wb = xla.Workbooks.Add(XlSheetType.xlWorksheet);
Worksheet ws = (Worksheet)xla.ActiveSheet;
ws.Name = "Serial";
int i = 1;
foreach (DataRow comp in dsView.Tables[0].Rows)
{
ws.Cells[i, 1] = "'" + comp[0].ToString();
ws.Cells[i, 2] = "'" + comp[1].ToString();
ws.Cells[i, 3] = "'" + comp[2].ToString();
i++;
}
if (File.Exists(@"d:\DDD.xlsx"))
File.Delete(@"d:\DDD.xlsx");
xla.Save(@"d:\DDD.xlsx"); ---->>>> on this line i get the error
エラー:
HRESULTからの例外:0x800A03EC
私はOffice2012でC#WinFormsに取り組んでいます