I am working on an application in C# with visual studio that manipulates xlsx spread sheets. Everything is working fine with open XML v2.5 and spreadsheet light, however the save function throws this error:
Could not load type 'DocumentFormat.OpenXml.Spreadsheet.SmartTags' from assembly
Just in case, here is the code I am trying to run. Its a button click event for a form with two text boxes, which are used to retrieve some values and save others:
SLDocument sl = new SLDocument("example.xlsx", "Sheet1");
int rowNum = Convert.ToInt32(barcodeNum.Text);
string cellAddr = "C" + barcodeNum.Text;
string cellEnvelope = "B" + barcodeNum.Text;
string cellOutDate = "E" + barcodeNum.Text;
int envelopeNumber = Convert.ToInt32(envelopeNum.Text);
string address = sl.GetCellValueAsString(cellAddr);
MessageBox.Show(address);
sl.SetCellValue(cellEnvelope, envelopeNum.Text);
sl.SetCellValue(cellOutDate, DateTime.Now);
sl.SaveAs("Example.xls");
I looked it up and I guess something broke in open XML version 2.5. I want to use version 2.0 or earlier. When I search a nuget package the only one that is available is the most recent version. How can I install a legacy version? Is there a way to get my code to work with version 2.5? Thank you.