Trying to edit my file with MyXls:
XlsDocument doc = new XlsDocument(InputFilePath);
Worksheet sheet = doc.Workbook.Worksheets[InputSheet.Substring(0, InputSheet.Length - 1)];
foreach (var row in sheet)
{
if (row.CellCount > 1)
{
Cell firstCell = row.GetCell(1);
firstCell.Font.Weight = FontWeight.Bold;
}
}
doc.Save();//Here is a nullreference Exception without any explanations
It seems that MyXLs cannot write into my file; example is for creating new file only. If so, what is the best way to copy all the contents of one xls file into another with this lib?