예제 #1
0
        private void AddJaJp(XlsxReader xlsx, IProgress <string> progress)
        {
            const string jaJpName = "text/im2nx_text.ja_jp";

            if (!HasFile(jaJpName) &&
                xlsx.Sheets.Descendants <Sheet>().Any(sheet => sheet.Name == "jaJp") &&
                xlsx.Sheets.Descendants <Sheet>().Any(sheet => sheet.Name == "jaJpStrings"))
            {
                progress?.Report(string.Format("Adding {0}", jaJpName));
                ZipArchiveEntry entry = zipArchive.CreateEntry(jaJpName);
                using Stream entryStream = entry.Open();
                JaJpText.WriteFile(entryStream, xlsx);
                _entries.Add(new PatchZipEntry(entry));
            }
        }
예제 #2
0
 public void JaJpWriteTest(string xlsxName, string binName)
 {
     using FileStream stream = new FileStream(binName, FileMode.Create, FileAccess.Write);
     using XlsxReader xlsxReader = new XlsxReader(xlsxName);
     JaJpText.WriteFile(stream, xlsxReader);
 }
예제 #3
0
 //[DataRow("new.ja_jp", "text_ja_jp_reread.xlsx")]
 public void JaJpReadTest(string binName, string xlsxName)
 {
     using FileStream stream = new FileStream(binName, FileMode.Open, FileAccess.Read);
     using XlsxWriter xlsxWriter = new XlsxWriter(xlsxName, true);
     JaJpText.ReadFile(stream, xlsxWriter);
 }