Ejemplo n.º 1
0
 public NPOIRendererTest()
 {
     _workbook             = new XSSFWorkbook();
     _defaultFormatApplier = new NPOIFormatApplier();
     _renderer             = new NPOIRenderer(_workbook, _defaultFormatApplier);
     _fileStreamToClose    = new List <Stream>();
 }
Ejemplo n.º 2
0
 public ClosedXmlRenderer(IXLWorkbook wb, IFormatApplier formatApplier)
 {
     _wb            = wb;
     _formatApplier = formatApplier;
 }
Ejemplo n.º 3
0
 public NPOIRenderer(IWorkbook wb, IFormatApplier formatApplier)
 {
     _wb            = wb;
     _formatApplier = formatApplier;
 }
Ejemplo n.º 4
0
        public static string WriteDebugFile(Matrix mat, string filename, IXLWorkbook wb = null, List <Stream> streamsToClose = null, IFormatApplier formatApplier = null)
        {
            if (wb is null)
            {
                wb = new XLWorkbook();
            }
            if (formatApplier is null)
            {
                formatApplier = new ClosedXmlFormatApplier();
            }

            var rd             = new ClosedXmlRenderer(wb, formatApplier);
            var targetFilename = TestUtils.GetFileName(filename);
            var fs             = File.Create(targetFilename);

            if (streamsToClose != null)
            {
                streamsToClose.Add(fs);
            }
            rd.GenerateExcelFile(mat, fs);
            return(targetFilename);
        }
Ejemplo n.º 5
0
 private string WriteDebugFile(IFormatApplier formatApplier, Matrix mat, string filename, IWorkbook wb = null)
 {
     return(TestUtils.WriteDebugFile(formatApplier, mat, filename, wb, _fileStreamToClose));
 }