EBDN - Community - Question & Answers

  Thursday, 28 August 2025
  1 Replies
  754 Visits
0
Votes
Undo
Hi,

I am working on an assistant where I need to export the worksheet as a CSV file. Below is my code:

using (WorksheetForBOM = item.OpenWorksheet(Common.GetWorksheetForBOM.Name, interactiveOnly: false, WorksheetLoadBehavior.EnableOptimize))
{
string destinationPath = Path.Combine(fileSaver.FullPath, Common.GetWorksheetForBOM.Name + ".csv");
WorksheetForBOM.Export(WorksheetExportBehavior.CSV, destinationPath);
}

Sometimes it works, sometimes it does not. I get this error :

Aucotec.EngineeringBase.Client.ApplicationErrorException: 'System error in the VBA integration!'

Is this a bug, or do I have to correct my code to avoid this error?