Skip to content

Instantly share code, notes, and snippets.

@ShilGen
Last active August 31, 2023 07:23
Show Gist options
  • Save ShilGen/47a99e307d08cd6e009bb65494e77dae to your computer and use it in GitHub Desktop.
Save ShilGen/47a99e307d08cd6e009bb65494e77dae to your computer and use it in GitHub Desktop.
Скрипт выгружает все события из справочника ПО Пирамида 2.0 в csv файл
using ObjStudioClasses;
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Threading.Tasks;
using GemBox.Spreadsheet;
public class Script
{
public static object Execute()
{
var events = Event.GetInstances().ToArray();
using (var sw = new StreamWriter(@"C:\Users\GShilov\Documents\events.csv", false, Encoding.UTF8))
{
for (int i = 0; i < events.Length; i++)
{
sw.WriteLine((i+1).ToString() +";"+ events[i].Caption +";"+ events[i].Class +";" );
}
}
return 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment