using System; using System.IO; using OfficeOpenXml; class Program { static void Main(string[] args) { // Set license context for EPPlus ExcelPackage.LicenseContext = LicenseContext.NonCommercial; // Create a new Excel package using (ExcelPackage excel = new ExcelPackage()) { // Add a worksheet var worksheet = excel.Workbook.Worksheets.Add("Fuel Cell Data"); // Add headers worksheet.Cells[1, 1].Value = "Model"; worksheet.Cells[1, 2].Value = "Tip celulă"; worksheet.Cells[1, 3].Value = "Nr. celule"; worksheet.Cells[1, 4].Value = "Putere nominală"; worksheet.Cells[1, 5].Value = "Performanță nominală"; worksheet.Cells[1, 6].Value = "Greutate stivă (cu ventilator)"; worksheet.Cells[1, 7].Value = "Dimensiuni stivă (mm)"; worksheet.Cells[1, 8].Value = "Debit max. H₂ (L/min)"; worksheet.Cells[1, 9].Value = "Puritate H₂"; worksheet.Cells[1, 10].Value = "Timp pornire"; worksheet.Cells[1, 11].Value = "Eficiență sistem"; // Add data rows string[,] data = { {"FCS-B12", "PEM", "13", "12W", "7.8V @ 1.5A", "275g (±30g)", "75x47x70", "0.18", "≥99.995%", "≤30s", "40% @ full power"}, {"FCS-B20", "PEM", "13", "20W", "7.8V @ 2.6A", "275g (±30g)", "75x47x70", "0.28", "≥99.995%", "≤30s", "40% @ full power"}, {"FCS-B30", "PEM", "14", "30W", "8.4V @ 3.6A", "280g (±30g)", "80x47x75", "0.42", "≥99.995%", "≤30s", "40% @ full power"}, {"FCS-C100", "PEM", "20", "100W", "12V @ 8.3A", "1290g (±50g)", "118x104x94", "1.3", "≥99.995%", "≤30s", "40% @ 12V"}, {"FCS-C200", "PEM", "40", "200W", "24V @ 8.3A", "2230g (±50g)", "118x183x94", "2.6", "≥99.995%", "≤30s", "40% @ 24V"}, {"FCS-C300", "PEM", "60", "300W", "36V @ 8.3A", "2790g (±50g)", "118x262x94", "3.9", "≥99.995%", "≤30s", "40% @ 36V"}, {"FCS-C500", "PEM", "24", "500W", "14.4V @ 35A", "2520g (±50g)", "130x268x123", "6.5", "≥99.995%", "≤30s", "40% @ 14.4V"}, {"FCS-C1000", "PEM", "48", "1000W", "28.8V @ 35A", "4kg (±100g)", "219x268x123", "13", "≥99.995%", "≤30s", "40% @ 28.8V"}, {"FCS-C2000", "PEM", "48", "2000W", "28.8V @ 70A", "10kg (±200g)", "303x350x183", "26", "≥99.995%", "≤30s", "40% @ 28.8V"}, {"FCS-C3000", "PEM", "72", "3000W", "43.2V @ 70A", "15kg (±200g)", "418x350x183", "39", "≥99.995%", "≤30s", "40% @ 43.2V"}, {"FCS-C5000", "PEM", "120", "5000W", "72V @ 70A", "30kg (±200g)", "650x350x212", "65", "≥99.995%", "≤30s", "40% @ 72V"} }; for (int i = 0; i < data.GetLength(0); i++) { for (int j = 0; j < data.GetLength(1); j++) { worksheet.Cells[i + 2, j + 1].Value = data[i, j]; } } // Save the Excel file FileInfo file = new FileInfo("FuelCellData.xlsx"); excel.SaveAs(file); Console.WriteLine("Fișierul Excel a fost generat cu succes: " + file.FullName); } } }