Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

New Post: Does ClosedXML instantiate a new instance of Excel?

$
0
0
There is a log try before the SaveAs (actually right before the connection is closed & disposed) and then one right afterwards as shown below:

.
.
.
.
indcell = "F" + i.ToString();
worksheet.Cell(indcell).Value = mySQLReader["Qty"];
indcell = "G" + i.ToString();
worksheet.Cell(indcell).Value = mySQLReader["PieceWork"];

i = i + 1;

}

string s18 = "Finished looping to populate spreadsheet...";
Log(s18);

mySQLReader.Close();
mySQLReader.Dispose();

workbook.SaveAs(fn);

string s19 = "SAVED the spreadsheet!!!";
Log(s19);

}
else
{
string s20 = "No spreadsheet to save due to no data.";
Log(s20);
}

Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>