/// <summary>
        ///     Append given text in the current theme's minor font and default font size.
        /// </summary>
        /// <param name="Text">The text.</param>
        public void AppendText(string Text)
        {
            var font = new SLFont(MajorFont, MinorFont, listThemeColors, listIndexedColors);

            font.SetFont(FontSchemeValues.Minor, SLConstants.DefaultFontSize);

            AppendText(Text, font);
        }
예제 #2
0
        //For each sheet in the publishing form folder, create a metadata sheet by deleting the unneeded columns
        public void createMetadata()
        {
            listFileNames(folderPath);
            foreach (var f in pubforms)
            {
                SLDocument sl = new SLDocument(folderPath + "\\" + f.Value);

                //Select Publishing tab
                sl.SelectWorksheet(MetaPresTab);

                //Try and rename something in the header row
                //Big "Source"
                //Small "Global master slides or locally developed slides that maintain the main message of that slide = GL; otherwise set to LO"
                //D34
                SLRstType Heading1 = new SLRstType();
                SLFont    Big      = new SLFont();
                SLFont    Small    = new SLFont();
                Big.Bold = true;
                Big.SetFont("Calibri", 14);
                Small.SetFont("Calibri", 9);
                Heading1.AppendText("PBSource", Big);
                Heading1.AppendText("Global PB master slides or locally developed slides that maintain the main message of that slide = GL; otherwise set to LO", Small);
                sl.SetCellValue("D" + (metakeymessagestartrow - 1), Heading1);

                /*
                 * // delete 1 column at column 6 - sl.DeleteColumn(6, 1);
                 * foreach (var i in NonMetadataColumns)
                 * {
                 *  sl.DeleteColumn(i, 1);
                 * }
                 *
                 * foreach (var i in NonMetadataRows)
                 * {
                 *  sl.DeleteRow(i, 1);
                 * }
                 */


                sl.SaveAs(folderPath + "\\METADATATEST-" + f.Value + ".xlsx");
            }
        }