public static Worksheet ExportWorksheet(TranslationBase.TranslationLine[] lines)
        {
            Worksheet sheet = new Worksheet();

            // Header
            sheet.AddNextCell("Operator");
            sheet.AddNextCell("Comment");
            sheet.AddNextCell("Key");
            sheet.AddNextCell("Translation");
            sheet.GoToNextRow();

            // Fields
            foreach (var translation in lines)
            {
                sheet.AddNextCell(translation.Operator);
                sheet.AddNextCell(translation.Comment);
                sheet.AddNextCell(translation.Key);
                sheet.AddNextCell(translation.Translation);
                sheet.GoToNextRow();
            }

            return(sheet);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Sets a value into the current cell and moves the cursor to the next cell (column or row depending on the defined cell direction)
 /// </summary>
 /// <exception cref="WorksheetException">Throws a WorksheetException if no worksheet was defined</exception>
 /// <param name="cellValue">Value to set</param>
 public void Value(object cellValue)
 {
     NullCheck();
     currentWorksheet.AddNextCell(cellValue);
 }