DefaultSkins.Classic.Apply(_currentTable.ActiveSheet);
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = "Excel Files (*.xlsx)|*.xlsx";
saveFileDialog.FileName = fileName;
saveFileDialog.DefaultExt = "xlsx";
saveFileDialog.AddExtension = true;
DialogResult saveResult = saveFileDialog.ShowDialog();
if (saveResult == DialogResult.OK)
{
var fileName = saveFileDialog.FileName;
_currentTable.SaveExcel(fileName, ExcelSaveFlags.SaveCustomColumnHeaders);
}
I exported Excel using the above code,where _currentTable is FPSpread,Then, while using the following code to read the Excel file, I encountered an error where "the file contains corrupt data",so Is it not possible to import Excel exported from FPSpread using ClosedXML?
//This line of code has an error stating that "the file contains corrupt data"
using (XLWorkbook wb = new XLWorkbook(filePath))
{
}