Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
LangExporter.cs
Go to the documentation of this file.
1using System.IO;
2using NPOI.SS.UserModel;
3using NPOI.XSSF.UserModel;
4
5public class LangExporter : EClass
6{
7 private static ISheet currentSheet;
8
9 public static void Export()
10 {
11 string text = CorePath.packageCore + "Lang/Template/";
12 string text2 = "sample.xlsx";
13 XSSFWorkbook xSSFWorkbook = new XSSFWorkbook();
14 currentSheet = xSSFWorkbook.CreateSheet("newSheet");
15 using FileStream stream = new FileStream(text + text2, FileMode.Create);
16 xSSFWorkbook.Write(stream);
17 }
18
19 public static ICell GetCell(int x, int y)
20 {
21 IRow row = currentSheet.GetRow(y) ?? currentSheet.CreateRow(y);
22 return row.GetCell(x) ?? row.CreateCell(x);
23 }
24
25 public static void WriteCell(int x, int y, string value)
26 {
27 GetCell(x, y).SetCellValue(value);
28 }
29
30 public static void WriteCell(int x, int y, double value)
31 {
32 GetCell(x, y).SetCellValue(value);
33 }
34}
Definition: EClass.cs:5
static ISheet currentSheet
Definition: LangExporter.cs:7
static void WriteCell(int x, int y, double value)
Definition: LangExporter.cs:30
static ICell GetCell(int x, int y)
Definition: LangExporter.cs:19
static void WriteCell(int x, int y, string value)
Definition: LangExporter.cs:25
static void Export()
Definition: LangExporter.cs:9