1.在Excel中导数据(效率不高)
int rowcount = excel_JH.ActiveSheet.UsedRange.Rows.Count;
int currow = 3;
Worksheet ws_jhjk = excel_JHJK.Sheets[this.cmbJiHuaJianKongSheets.Text.ToString()];
string value = ws_jhjk.Cells[currow, 1].Text.ToString();
while (value!="")
{
currow++;
value = ws_jhjk.Cells[currow, 1].Text.ToString();
}
for (int i=2; i<=rowcount; i++)
{
if (excel_JH.ActiveSheet.Cells[i, 1].Text == "")
continue;
for(int j=0; j<cellInputs.Count; j++)
{
string v = excel_JH.ActiveSheet.Cells[i, cellInputs[j].SourceCell].Text;
ws_jhjk.Application.Cells[currow + i, cellInputs[j].TargetCell].Value = v;
}
}