예제 #1
0
        private void AddData(ExcelFile Xls)
        {
            //Fill the file with the contents of this c# file, many times so we can see many page breaks.
            int Row = 3;

            DumpFile(Xls, ref Row);

            Xls.AutofitRowsOnWorkbook(false, true, 1);
            Xls.AutoPageBreaks(50, 100); // we will use a 100% of page scale since we are printing to pdf.
                                         //If this was to create an Excel file, pagescale should be lower to
                                         //compensate the differences between page sizes in diiferent printers in Excel

            //Export the file to PDF so we can see the page breaks.
            using (FlexCelPdfExport pdf = new FlexCelPdfExport(Xls, true))
            {
                pdf.Export(saveFileDialog1.FileName);
            }
        }