using Newtonsoft.Json; using System.Collections.Generic; namespace Server.Git { public class XlsxToJson : AbstractGit { public override void ChangeScript() { //저장경로 : repositoryPath //작업할것 //다운로드된 데이터 json화 //데이터 db에 업로드 //json화된 데이터 push ExcelManager em = new ExcelManager(repositoryPath, "TESTexl.xlsx"); if (em.Play()) { List sheets = em.sheets; Dictionary>> sheetList = new Dictionary>>(); for (int n = 0; n < sheets.Count; n++) { sheetList.Add(sheets[n].name, sheets[n].dicViewer); } string test = JsonConvert.SerializeObject(sheetList); Console.WriteLine(test); } else { Console.WriteLine("-1 : NotUpdate"); } //db에 데이터를올리는것은 이곳에 작성할 예정 } } }