-
-
Save ShilGen/47a99e307d08cd6e009bb65494e77dae to your computer and use it in GitHub Desktop.
Скрипт выгружает все события из справочника ПО Пирамида 2.0 в csv файл
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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