Elin Modding Docs Doc
Loading...
Searching...
No Matches
LangExporter.cs
1using System;
2using System.IO;
3using NPOI.SS.UserModel;
4using NPOI.XSSF.UserModel;
5
6// Token: 0x0200004B RID: 75
7public class LangExporter : EClass
8{
9 // Token: 0x060001A5 RID: 421 RVA: 0x0000E604 File Offset: 0x0000C804
10 public static void Export()
11 {
12 string str = CorePath.packageCore + "Lang/Template/";
13 string str2 = "sample.xlsx";
14 XSSFWorkbook xssfworkbook = new XSSFWorkbook();
15 LangExporter.currentSheet = xssfworkbook.CreateSheet("newSheet");
16 using (FileStream fileStream = new FileStream(str + str2, FileMode.Create))
17 {
18 xssfworkbook.Write(fileStream);
19 }
20 }
21
22 // Token: 0x060001A6 RID: 422 RVA: 0x0000E66C File Offset: 0x0000C86C
23 public static ICell GetCell(int x, int y)
24 {
25 IRow row = LangExporter.currentSheet.GetRow(y) ?? LangExporter.currentSheet.CreateRow(y);
26 return row.GetCell(x) ?? row.CreateCell(x);
27 }
28
29 // Token: 0x060001A7 RID: 423 RVA: 0x0000E6A6 File Offset: 0x0000C8A6
30 public static void WriteCell(int x, int y, string value)
31 {
32 LangExporter.GetCell(x, y).SetCellValue(value);
33 }
34
35 // Token: 0x060001A8 RID: 424 RVA: 0x0000E6B5 File Offset: 0x0000C8B5
36 public static void WriteCell(int x, int y, double value)
37 {
38 LangExporter.GetCell(x, y).SetCellValue(value);
39 }
40
41 // Token: 0x04000467 RID: 1127
42 private static ISheet currentSheet;
43}