Exemplo n.º 1
0
        /**
         * Constructor
         *
         * @param w The workbook to interrogate
         * @param out The output stream to which the CSV values are written
         * @param encoding The encoding used by the output stream.  Null or
         * unrecognized values cause the encoding to default to UTF8
         * @exception java.io.IOException
         */
        public EscherDrawingGroup(Workbook w, TextWriter os, string encoding)
        {
            if (encoding == null || encoding != "UnicodeBig")
            {
                encoding = "UTF8";
            }

            try
            {
                WorkbookParser wp = (WorkbookParser)w;

                DrawingGroup dg = wp.getDrawingGroup();

                if (dg != null)
                {
                    EscherDisplay ed = new EscherDisplay(dg, os);
                    ed.display();
                }

                os.WriteLine();
                os.WriteLine();
                os.Flush();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        /**
         * Constructor
         *
         * @param w The workbook to interrogate
         * @param out The output stream to which the CSV values are written
         * @param encoding The encoding used by the output stream.  Null or
         * unrecognized values cause the encoding to default to UTF8
         * @exception java.io.IOException
         */
        public EscherDrawingGroup(Workbook w, TextWriter os, string encoding)
        {
            if (encoding == null || encoding != "UnicodeBig")
                {
                encoding = "UTF8";
                }

            try
                {
                WorkbookParser wp = (WorkbookParser)w;

                DrawingGroup dg = wp.getDrawingGroup();

                if (dg != null)
                    {
                    EscherDisplay ed = new EscherDisplay(dg, os);
                    ed.display();
                    }

                os.WriteLine();
                os.WriteLine();
                os.Flush();
                }
            catch (Exception e)
                {
                Console.WriteLine(e);
                }
        }
Exemplo n.º 3
0
        /**
         * Constructor
         *
         * @param w The workbook to interrogate
         * @param out The output stream to which the CSV values are written
         * @param encoding The encoding used by the output stream.  Null or
         * unrecognized values cause the encoding to default to UTF8
         * @exception java.io.IOException
         */
        public Escher(Workbook w, TextWriter os, string encoding)
        {
            if (encoding == null || encoding == "UnicodeBig")
                {
                encoding = "UTF8";
                }

            try
                {
                for (int i = 0; i < w.getNumberOfSheets(); i++)
                    {
                    SheetImpl s = (SheetImpl)w.getSheet(i);
                    os.Write(s.getName());
                    os.WriteLine();
                    os.WriteLine();

                    DrawingData dd = s.getDrawingData();

                    if (dd != null)
                        {
                        EscherDisplay ed = new EscherDisplay(dd, os);
                        ed.display();
                        }

                    os.WriteLine();
                    os.WriteLine();
                    os.Flush();
                    }
                os.Flush();
                }
            catch (Exception e)
                {
                Console.WriteLine(e);
                }
        }
Exemplo n.º 4
0
        /**
         * Constructor
         *
         * @param w The workbook to interrogate
         * @param out The output stream to which the CSV values are written
         * @param encoding The encoding used by the output stream.  Null or
         * unrecognized values cause the encoding to default to UTF8
         * @exception java.io.IOException
         */
        public Escher(Workbook w, TextWriter os, string encoding)
        {
            if (encoding == null || encoding == "UnicodeBig")
            {
                encoding = "UTF8";
            }

            try
            {
                for (int i = 0; i < w.getNumberOfSheets(); i++)
                {
                    SheetImpl s = (SheetImpl)w.getSheet(i);
                    os.Write(s.getName());
                    os.WriteLine();
                    os.WriteLine();

                    DrawingData dd = s.getDrawingData();

                    if (dd != null)
                    {
                        EscherDisplay ed = new EscherDisplay(dd, os);
                        ed.display();
                    }

                    os.WriteLine();
                    os.WriteLine();
                    os.Flush();
                }
                os.Flush();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }