Ejemplo n.º 1
0
        public void Generate(string xml, Stream output)
        {
            parser = new ExcelXmlParser();
            try
            {
                parser.setXML(xml);
                createExcel(output);
                setColorProfile();
                headerPrint(parser);

                rowsPrint(parser, output);
                wb.Workbook.Document.Styles.Save();
                // remove repeat foot # charlot
                // footerPrint(parser);
                insertHeader(parser, output);
                insertFooter(parser, output);
                watermarkPrint(parser);
                //// merge head
                //sheet.MergeTwoCells("A1","A3");
                //sheet.Save();
                wb.Dispose();
            }
            catch (Exception e)
            {
                //	    e.printStackTrace();
            }
        }
Ejemplo n.º 2
0
        public void Generate(string xml, Stream output)
        {
            parser = new ExcelXmlParser();
            try {
                parser.setXML(xml);
                createExcel(output);
                setColorProfile();
                headerPrint(parser);

                rowsPrint(parser, output);
                wb.Workbook.Document.Styles.Save();
                if (PrintFooter)
                {
                    footerPrint(parser);
                }
                insertHeader(parser, output);
                insertFooter(parser, output);
                watermarkPrint(parser);

                wb.Dispose();
            } catch (Exception e) {
                throw;
            }
        }