Beispiel #1
0
        private static void ReplaceSpiritOhd()
        {
            var textList = Workbook.Load("SpiritOhd.xlsx").Worksheets[0].Rows.Skip(1).Select(x => x.Cells[2].GetText()).ToList();

            foreach (var path in Directory.GetFiles(Path.Combine(Settings.Working, "STAGEDAT"), "spirit_lang_data.ohd", SearchOption.AllDirectories))
            {
                //var ohd = SpiritOhd.Read(path);


                SpiritOhd.Write(path, textList);
            }
        }
Beispiel #2
0
        private static void ExportToExcel(SpiritOhd ohd)
        {
            var workbook = new Workbook(WorkbookFormat.Excel2007);
            var sheet    = workbook.Worksheets.Add("Sheet");

            for (int i = 0; i < ohd.Texts.Count; i++)
            {
                sheet.Rows[i + 1].Cells[0].Value = ohd.Texts[i];
            }

            workbook.Save("SpiritOhd.xlsx");
        }