/// <summary>
        /// Runs the sample.
        /// </summary>
        public static void RunFromConfigurationFileSample()
        {
            Console.WriteLine(Header);
            Console.WriteLine(FirstSampleStepText);

            var inputDataFile = new Uri(Settings.Default.InvoiceXmlInput, UriKind.Relative);
            var input = new XmlInput(inputDataFile);

            var configuration = new Uri(Settings.Default.ExportEngineSample07Configuration, UriKind.Relative);
            input.Export(ExportSettings.ImportFrom(configuration));
        }
        /// <summary>
        /// Runs the sample.
        /// </summary>
        public static void RunFromCodeSample()
        {
            Console.WriteLine(Header);
            Console.WriteLine(FirstSampleStepText);

            var inputDataFile = new Uri(Settings.Default.InventoryXmlInput, UriKind.Relative);
            var input         = new XmlInput(inputDataFile);

            var configurationModel = CreateModel();

            input.Export(ExportSettings.CreateFromModels(configurationModel, "Sample01"));
        }
示例#3
0
        public static void RunSample()
        {
            Console.WriteLine(InvoiceQueryHeader);
            Console.WriteLine(new string('-', 52));

            Console.WriteLine(OneStepText);
            var invoiceXmlInputUri = new Uri(Properties.Settings.Default.InvoiceXmlImput, UriKind.Relative);
            var export             = new XmlInput(invoiceXmlInputUri);

            Console.Write(TwoStepText);
            Console.WriteLine();
            Console.WriteLine(ThreeStepText);
            Console.WriteLine(FourStepText);

            var model = CreateModel();

            export.Export(ExportSettings.CreateFromModels(model, "xmlinput-xlsx"));

            Console.WriteLine(FiveStepText);
            var configuration = new Uri(Properties.Settings.Default.InvoiceExportConfigurationFile, UriKind.Relative);

            export.Export(ExportSettings.ImportFrom(configuration, "xmlinput-xlsx"));
        }
        /// <summary>
        /// Runs the sample.
        /// </summary>
        public static void RunFromConfigurationFileSample()
        {
            Console.WriteLine(Header);
            Console.WriteLine(FirstSampleStepText);

            var inputDataFile = new Uri(Settings.Default.InventoryXmlInput, UriKind.Relative);
            var input         = new XmlInput(inputDataFile);

            var configurationFile = PathHelper.ResolveRelativePath(Settings.Default.ExportEngineSample11Configuration);
            var models            = ExportsModel.LoadFromFile(configurationFile);
            var model             = models.Items.FirstOrDefault();

            model.Table.Output.File = "sample11-custom-file-name-from-code";
            model.Table.Output.Path = @"~\output\writer\xlsx\ExportEngine\";

            input.Export(ExportSettings.CreateFromModels(models, "Sample11"));
        }