3金币
如题:正常saveExcel,文件保存后界面上的表格sheet被移除了,导致再次赋值时找不到对象,请问这是正常的吗?
demo:
private void SaveExcelFile(string filename)
{
bool b_ret;
try
{
PUFun.FieldClear(fpSpreadImport);
fpSpreadImport.Sheets[0].Protect = false;
fpSpreadImport.Sheets[0].Visible = true;
b_ret = fpSpreadImport.SaveExcel(filename, IncludeHeaders.BothCustomOnly);
fpSpreadImport.Sheets[0].Visible = false;
if (b_ret == false)
{
return;
}
}
catch (System.Exception ex)
{
PUFun.ShowMsgBox(ex.Message);
}
}
|
|