使用C#学习Office文件的处理(pptx docx xlsx)

Office文件 是指PPT 、word、Excel 这些常用工具生成的文件 ,例如 pptx docx xlsx。

这些文件的读取和生成有很多很多库 例如 NOPI 、DevExpress、C1、Aspose、Teleric 等等,各有各的优缺点。俺今天不讲这个,俺只是讲讲如何了解Office文件的格式。

说起Office文件,就绕不开微软,说起微软的Office文件 就不得不提及

这是微软给的Office的SDK,在对一些复杂文件的处理上特别有用,俺有一次处理一批复杂的文档,这批文档里有大量的数学公式,例如

 ,

这个公式,文档中存储的是数据流不是图片,俺用了很多第三方的都不行(DevExpress 应该可以,但是要购买贵的那个版本,俺看到版本说明里有支持,但是俺之前买的版本不是这个),所以用了微软的DocumentFormat.OpenXml.dll。

Open XML SDK 有2个很强大的功能,一个是结构化解析文档,另一个是逆向出C#源码

先看一个例子:

然后用Open XML SDK 打开这个文件

左边是文档结构,右边就是逆向出的C#代码。也是一种反编译了。

在VS里执行右边的代码就可以生成出完全一样的Office文件。

ppt word 文件也可以同样处理。

俺前面说的读那个公式,也是用这个SDK 逆向了一下文件,然后就知道如何提取那些特殊数据了。

如果对这个逆向工具感兴趣,还可以直接到微软去下载这个SDK的源码,这个逆向,微软提供了源码。

另 

 private void GenerateWorksheetPart12Content(WorksheetPart worksheetPart12)
        {
            Worksheet worksheet12 = new Worksheet(){ MCAttributes = new MarkupCompatibilityAttributes(){ Ignorable = "x14ac xr xr2 xr3" }  };
            worksheet12.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            worksheet12.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            worksheet12.AddNamespaceDeclaration("x14ac", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac");
            worksheet12.AddNamespaceDeclaration("xr", "http://schemas.microsoft.com/office/spreadsheetml/2014/revision");
            worksheet12.AddNamespaceDeclaration("xr2", "http://schemas.microsoft.com/office/spreadsheetml/2015/revision2");
            worksheet12.AddNamespaceDeclaration("xr3", "http://schemas.microsoft.com/office/spreadsheetml/2016/revision3");
            worksheet12.SetAttribute(new OpenXmlAttribute("xr", "uid", "http://schemas.microsoft.com/office/spreadsheetml/2014/revision", "{00000000-0001-0000-0200-000000000000}"));

            SheetProperties sheetProperties11 = new SheetProperties(){ CodeName = "Sheet3" };
            TabColor tabColor11 = new TabColor(){ Theme = (UInt32Value)9U, Tint = 0.59999389629810485D };
            PageSetupProperties pageSetupProperties11 = new PageSetupProperties(){ FitToPage = true };

            sheetProperties11.Append(tabColor11);
            sheetProperties11.Append(pageSetupProperties11);
            SheetDimension sheetDimension12 = new SheetDimension(){ Reference = "A1:I15" };

            SheetViews sheetViews12 = new SheetViews();
            SheetView sheetView12 = new SheetView(){ ShowGridLines = false, ShowRowColHeaders = false, ZoomScaleNormal = (UInt32Value)100U, WorkbookViewId = (UInt32Value)0U };

            sheetViews12.Append(sheetView12);
            SheetFormatProperties sheetFormatProperties12 = new SheetFormatProperties(){ DefaultColumnWidth = 8.75D, DefaultRowHeight = 13.5D, DyDescent = 0.25D };

            Columns columns12 = new Columns();
            Column column54 = new Column(){ Min = (UInt32Value)1U, Max = (UInt32Value)1U, Width = 1.58203125D, Style = (UInt32Value)1U, CustomWidth = true };
            Column column55 = new Column(){ Min = (UInt32Value)2U, Max = (UInt32Value)8U, Width = 16.58203125D, Style = (UInt32Value)1U, CustomWidth = true };
            Column column56 = new Column(){ Min = (UInt32Value)9U, Max = (UInt32Value)9U, Width = 1.58203125D, Style = (UInt32Value)2U, CustomWidth = true };
            Column column57 = new Column(){ Min = (UInt32Value)10U, Max = (UInt32Value)10U, Width = 8.58203125D, Style = (UInt32Value)2U, CustomWidth = true };
            Column column58 = new Column(){ Min = (UInt32Value)11U, Max = (UInt32Value)16384U, Width = 8.75D, Style = (UInt32Value)2U };

            columns12.Append(column54);
            columns12.Append(column55);
            columns12.Append(column56);
            columns12.Append(column57);
            columns12.Append(column58);

            SheetData sheetData12 = new SheetData();

            Row row156 = new Row(){ RowIndex = (UInt32Value)1U, Spans = new ListValue<StringValue>() { InnerText = "1:9" }, Height = 9D, CustomHeight = true, DyDescent = 0.25D };

            Cell cell1182 = new Cell(){ CellReference = "I1", StyleIndex = (UInt32Value)2U, DataType = CellValues.SharedString };
            CellValue cellValue480 = new CellValue();
            cellValue480.Text = "2";

            cell1182.Append(cellValue480);

            row156.Append(cell1182);

            Row row157 = new Row(){ RowIndex = (UInt32Value)2U, Spans = new ListValue<StringValue>() { InnerText = "1:9" }, Height = 96D, CustomHeight = true, DyDescent = 0.25D };

            Cell cell1183 = new Cell(){ CellReference = "B2", StyleIndex = (UInt32Value)52U, DataType = CellValues.String };
            CellFormula cellFormula141 = new CellFormula();
            cellFormula141.Text = "\"March \"&CalendarYear";
            CellValue cellValue481 = new CellValue();
            cellValue481.Text = "March 2019";

            cell1183.Append(cellFormula141);
            cell1183.Append(cellValue481);
            Cell cell1184 = new Cell(){ CellReference = "C2", StyleIndex = (UInt32Value)52U };
            Cell cell1185 = new Cell(){ CellReference = "D2", StyleIndex = (UInt32Value)52U };
            Cell cell1186 = new Cell(){ CellReference = "E2", StyleIndex = (UInt32Value)3U };
            Cell cell1187 = new Cell(){ CellReference = "F2", StyleIndex = (UInt32Value)3U };
            Cell cell1188 = new Cell(){ CellReference = "G2", StyleIndex = (UInt32Value)3U };
            Cell cell1189 = new Cell(){ CellReference = "H2", StyleIndex = (UInt32Value)4U };

            row157.Append(cell1183);
            row157.Append(cell1184);
            row157.Append(cell1185);
            row157.Append(cell1186);
            row157.Append(cell1187);
            row157.Append(cell1188);
            row157.Append(cell1189);

            Row row158 = new Row(){ RowIndex = (UInt32Value)3U, Spans = new ListValue<StringValue>() { InnerText = "1:9" }, StyleIndex = (UInt32Value)13U, CustomFormat = true, Height = 24D, CustomHeight = true, DyDescent = 0.25D };
            Cell cell1190 = new Cell(){ CellReference = "A3", StyleIndex = (UInt32Value)12U };

            Cell cell1191 = new Cell(){ CellReference = "B3", StyleIndex = (UInt32Value)25U, DataType = CellValues.String };
            CellFormula cellFormula142 = new CellFormula();
            cellFormula142.Text = "WeekStart";
            CellValue cellValue482 = new CellValue();
            cellValue482.Text = "Sunday";

            cell1191.Append(cellFormula142);
            cell1191.Append(cellValue482);

            Cell cell1192 = new Cell(){ CellReference = "C3", StyleIndex = (UInt32Value)26U, DataType = CellValues.String };
            CellFormula cellFormula143 = new CellFormula(){ FormulaType = CellFormulaValues.Shared, Reference = "C3:H3", SharedIndex = (UInt32Value)0U };
            cellFormula143.Text = "TEXT(C4,\"dddd\")";
            CellValue cellValue483 = new CellValue();
            cellValue483.Text = "Monday";

            cell1192.Append(cellFormula143);
            cell1192.Append(cellValue483);

            Cell cell1193 = new Cell(){ CellReference = "D3", StyleIndex = (UInt32Value)26U, DataType = CellValues.String };
            CellFormula cellFormula144 = new CellFormula(){ FormulaType = CellFormulaValues.Shared, SharedIndex = (UInt32Value)0U };
            cellFormula144.Text = "";
            CellValue cellValue484 = new CellValue();
            cellValue484.Text = "Tuesday";

            cell1193.Append(cellFormula144);
            cell1193.Append(cellValue484);

            Cell cell1194 = new Cell(){ CellReference = "E3", StyleIndex = (UInt32Value)26U, DataType = CellValues.String };
            CellFormula cellFormula145 = new CellFormula(){ FormulaType = CellFormulaValues.Shared, SharedIndex = (UInt32Value)0U };
            cellFormula145.Text = "";
            CellValue cellValue485 = new CellValue();
            cellValue485.Text = "Wednesday";

            cell1194.Append(cellFormula145);
            cell1194.Append(cellValue485);

            Cell cell1195 = new Cell(){ CellReference = "F3", StyleIndex = (UInt32Value)26U, DataType = CellValues.String };
            CellFormula cellFormula146 = new CellFormula(){ FormulaType = CellFormulaValues.Shared, SharedIndex = (UInt32Value)0U };
            cellFormula146.Text = "";
            CellValue cellValue486 = new CellValue();
            cellValue486.Text = "Thursday";

            cell1195.Append(cellFormula146);
            cell1195.Append(cellValue486);

            Cell cell1196 = new Cell(){ CellReference = "G3", StyleIndex = (UInt32Value)26U, DataType = CellValues.String };
            CellFormula cellFormula147 = new CellFormula(){ FormulaType = CellFormulaValues.Shared, SharedIndex = (UInt32Value)0U };
            cellFormula147.Text = "";
            CellValue cellValue487 = new CellValue();
            cellValue487.Text = "Friday";

            cell1196.Append(cellFormula147);
            cell1196.Append(cellValue487);

            Cell cell1197 = new Cell(){ CellReference = "H3", StyleIndex = (UInt32Value)27U, DataType = CellValues.String };
            CellFormula cellFormula148 = new CellFormula(){ FormulaType = CellFormulaValues.Shared, SharedIndex = (UInt32Value)0U };
            cellFormula148.Text = "";
            CellValue cellValue488 = new CellValue();
            cellValue488.Text = "Saturday";

            cell1197.Append(cellFormula148);
            cell1197.Append(cellValue488);

            row158.Append(cell1190);
            row158.Append(cell1191);
            row158.Append(cell1192);
            row158.Append(cell1193);
            row158.Append(cell1194);
            row158.Append(cell1195);
            row158.Append(cell1196);
            row158.Append(cell1197);

            Row row159 = new Row(){ RowIndex = (UInt32Value)4U, Spans = new ListValue<StringValue>() { InnerText = "1:9" }, StyleIndex = (UInt32Value)6U, CustomFormat = true, Height = 24D, CustomHeight = true, DyDescent = 0.35D };
            Cell cell1198 = new Cell(){ CellReference = "A4", StyleIndex = (UInt32Value)5U };

            Cell cell1199 = new Cell(){ CellReference = "B4", StyleIndex = (UInt32Value)28U };
            CellFormula cellFormula149 = new CellFormula(){ FormulaType = CellFormulaValues.Array, Reference = "B4:H4" };
            cellFormula149.Text = "DaysAndWeeks+DATE(CalendarYear,3,1)-WEEKDAY(DATE(CalendarYear,3,1),(WeekStart=\"Monday\")+1)+1";
            CellValue cellValue489 = new CellValue();
            cellValue489.Text = "43520";

            cell1199.Append(cellFormula149);
            cell1199.Append(cellValue489);

            Cell cell1200 = new Cell(){ CellReference = "C4", StyleIndex = (UInt32Value)28U };
            CellValue cellValue490 = new CellValue();
            cellValue490.Text = "43521";

            cell1200.Append(cellValue490);

            Cell cell1201 = new Cell(){ CellReference = "D4", StyleIndex = (UInt32Value)28U };
            CellValue cellValue491 = new CellValue();
            cellValue491.Text = "43522";

            cell1201.Append(cellValue491);

            Cell cell1202 = new Cell(){ CellReference = "E4", StyleIndex = (UInt32Value)28U };
            CellValue cellValue492 = new CellValue();
            cellValue492.Text = "43523";

            cell1202.Append(cellValue492);

            Cell cell1203 = new Cell(){ CellReference = "F4", StyleIndex = (UInt32Value)28U };
            CellValue cellValue493 = new CellValue();
            cellValue493.Text = "43524";

            cell1203.Append(cellValue493);

            Cell cell1204 = new Cell(){ CellReference = "G4", StyleIndex = (UInt32Value)28U };
            CellValue cellValue494 = new CellValue();
            cellValue494.Text = "43525";

            cell1204.Append(cellValue494);

            Cell cell1205 = new Cell(){ CellReference = "H4", StyleIndex = (UInt32Value)28U };
            CellValue cellValue495 = new CellValue();
            cellValue495.Text = "43526";

            cell1205.Append(cellValue495);

            row159.Append(cell1198);
            row159.Append(cell1199);
            row159.Append(cell1200);
            row159.Append(cell1201);
            row159.Append(cell1202);
            row159.Append(cell1203);
            row159.Append(cell1204);
            row159.Append(cell1205);

            Row row160 = new Row(){ RowIndex = (UInt32Value)5U, Spans = new ListValue<StringValue>() { InnerText = "1:9" }, StyleIndex = (UInt32Value)18U, CustomFormat = true, Height = 56.15D, CustomHeight = true, DyDescent = 0.25D };
            Cell cell1206 = new Cell(){ CellReference = "A5", StyleIndex = (UInt32Value)17U };
            Cell cell1207 = new Cell(){ CellReference = "B5", StyleIndex = (UInt32Value)30U };
            Cell cell1208 = new Cell(){ CellReference = "C5", StyleIndex = (UInt32Value)30U };
            Cell cell1209 = new Cell(){ CellReference = "D5", StyleIndex = (UInt32Value)30U };
            Cell cell1210 = new Cell(){ CellReference = "E5", StyleIndex = (UInt32Value)30U };
            Cell cell1211 = new Cell(){ CellReference = "F5", StyleIndex = (UInt32Value)30U };
            Cell cell1212 = new Cell(){ CellReference = "G5", StyleIndex = (UInt32Value)30U };
            Cell cell1213 = new Cell(){ CellReference = "H5", StyleIndex = (UInt32Value)30U };

            row160.Append(cell1206);
            row160.Append(cell1207);
            row160.Append(cell1208);
            row160.Append(cell1209);
            row160.Append(cell1210);
            row160.Append(cell1211);
            row160.Append(cell1212);
            row160.Append(cell1213);

            Row row161 = new Row(){ RowIndex = (UInt32Value)6U, Spans = new ListValue<StringValue>() { InnerText = "1:9" }, StyleIndex = (UInt32Value)6U, CustomFormat = true, Height = 24D, CustomHeight = true, DyDescent = 0.25D };
            Cell cell1214 = new Cell(){ CellReference = "A6", StyleIndex = (UInt32Value)5U };

            Cell cell1215 = new Cell(){ CellReference = "B6", StyleIndex = (UInt32Value)31U };
            CellFormula cellFormula150 = new CellFormula(){ FormulaType = CellFormulaValues.Array, Reference = "B6:H6" };
            cellFormula150.Text = "DaysAndWeeks+DATE(CalendarYear,3,1)-WEEKDAY(DATE(CalendarYear,3,1),(WeekStart=\"Monday\")+1)+8";
            CellValue cellValue496 = new CellValue();
            cellValue496.Text = "43527";

            cell1215.Append(cellFormula150);
            cell1215.Append(cellValue496);

            Cell cell1216 = new Cell(){ CellReference = "C6", StyleIndex = (UInt32Value)31U };
            CellValue cellValue497 = new CellValue();
            cellValue497.Text = "43528";

            cell1216.Append(cellValue497);

            Cell cell1217 = new Cell(){ CellReference = "D6", StyleIndex = (UInt32Value)31U };
            CellValue cellValue498 = new CellValue();
            cellValue498.Text = "43529";

            cell1217.Append(cellValue498);

            Cell cell1218 = new Cell(){ CellReference = "E6", StyleIndex = (UInt32Value)31U };
            CellValue cellValue499 = new CellValue();
            cellValue499.Text = "43530";

            cell1218.Append(cellValue499);

            Cell cell1219 = new Cell(){ CellReference = "F6", StyleIndex = (UInt32Value)31U };
            CellValue cellValue500 = new CellValue();
            cellValue500.Text = "43531";

            cell1219.Append(cellValue500);

            Cell cell1220 = new Cell(){ CellReference = "G6", StyleIndex = (UInt32Value)31U };
            CellValue cellValue501 = new CellValue();
            cellValue501.Text = "43532";

            cell1220.Append(cellValue501);

            Cell cell1221 = new Cell(){ CellReference = "H6", StyleIndex = (UInt32Value)31U };
            CellValue cellValue502 = new CellValue();
            cellValue502.Text = "43533";

            cell1221.Append(cellValue502);

            row161.Append(cell1214);
            row161.Append(cell1215);
            row161.Append(cell1216);
            row161.Append(cell1217);
            row161.Append(cell1218);
            row161.Append(cell1219);
            row161.Append(cell1220);
            row161.Append(cell1221);

            Row row162 = new Row(){ RowIndex = (UInt32Value)7U, Spans = new ListValue<StringValue>() { InnerText = "1:9" }, StyleIndex = (UInt32Value)18U, CustomFormat = true, Height = 56.15D, CustomHeight = true, DyDescent = 0.25D };
            Cell cell1222 = new Cell(){ CellReference = "A7", StyleIndex = (UInt32Value)17U };
            Cell cell1223 = new Cell(){ CellReference = "B7", StyleIndex = (UInt32Value)29U };
            Cell cell1224 = new Cell(){ CellReference = "C7", StyleIndex = (UInt32Value)29U };
            Cell cell1225 = new Cell(){ CellReference = "D7", StyleIndex = (UInt32Value)29U };
            Cell cell1226 = new Cell(){ CellReference = "E7", StyleIndex = (UInt32Value)29U };
            Cell cell1227 = new Cell(){ CellReference = "F7", StyleIndex = (UInt32Value)29U };
            Cell cell1228 = new Cell(){ CellReference = "G7", StyleIndex = (UInt32Value)29U };
            Cell cell1229 = new Cell(){ CellReference = "H7", StyleIndex = (UInt32Value)29U };

            row162.Append(cell1222);
            row162.Append(cell1223);
            row162.Append(cell1224);
            row162.Append(cell1225);
            row162.Append(cell1226);
            row162.Append(cell1227);
            row162.Append(cell1228);
            row162.Append(cell1229);

            Row row163 = new Row(){ RowIndex = (UInt32Value)8U, Spans = new ListValue<StringValue>() { InnerText = "1:9" }, StyleIndex = (UInt32Value)6U, CustomFormat = true, Height = 24D, CustomHeight = true, DyDescent = 0.25D };
            Cell cell1230 = new Cell(){ CellReference = "A8", StyleIndex = (UInt32Value)5U };

            Cell cell1231 = new Cell(){ CellReference = "B8", StyleIndex = (UInt32Value)32U };
            CellFormula cellFormula151 = new CellFormula(){ FormulaType = CellFormulaValues.Array, Reference = "B8:H8" };
            cellFormula151.Text = "DaysAndWeeks+DATE(CalendarYear,3,1)-WEEKDAY(DATE(CalendarYear,3,1),(WeekStart=\"Monday\")+1)+15";
            CellValue cellValue503 = new CellValue();
            cellValue503.Text = "43534";

            cell1231.Append(cellFormula151);
            cell1231.Append(cellValue503);

            Cell cell1232 = new Cell(){ CellReference = "C8", StyleIndex = (UInt32Value)32U };
            CellValue cellValue504 = new CellValue();
            cellValue504.Text = "43535";

            cell1232.Append(cellValue504);

            Cell cell1233 = new Cell(){ CellReference = "D8", StyleIndex = (UInt32Value)32U };
            CellValue cellValue505 = new CellValue();
            cellValue505.Text = "43536";

            cell1233.Append(cellValue505);

            Cell cell1234 = new Cell(){ CellReference = "E8", StyleIndex = (UInt32Value)32U };
            CellValue cellValue506 = new CellValue();
            cellValue506.Text = "43537";

            cell1234.Append(cellValue506);

            Cell cell1235 = new Cell(){ CellReference = "F8", StyleIndex = (UInt32Value)32U };
            CellValue cellValue507 = new CellValue();
            cellValue507.Text = "43538";

            cell1235.Append(cellValue507);

            Cell cell1236 = new Cell(){ CellReference = "G8", StyleIndex = (UInt32Value)32U };
            CellValue cellValue508 = new CellValue();
            cellValue508.Text = "43539";

            cell1236.Append(cellValue508);

            Cell cell1237 = new Cell(){ CellReference = "H8", StyleIndex = (UInt32Value)32U };
            CellValue cellValue509 = new CellValue();
            cellValue509.Text = "43540";

            cell1237.Append(cellValue509);

            row163.Append(cell1230);
            row163.Append(cell1231);
            row163.Append(cell1232);
            row163.Append(cell1233);
            row163.Append(cell1234);
            row163.Append(cell1235);
            row163.Append(cell1236);
            row163.Append(cell1237);

            Row row164 = new Row(){ RowIndex = (UInt32Value)9U, Spans = new ListValue<StringValue>() { InnerText = "1:9" }, StyleIndex = (UInt32Value)18U, CustomFormat = true, Height = 56.15D, CustomHeight = true, DyDescent = 0.25D };
            Cell cell1238 = new Cell(){ CellReference = "A9", StyleIndex = (UInt32Value)17U };
            Cell cell1239 = new Cell(){ CellReference = "B9", StyleIndex = (UInt32Value)30U };
            Cell cell1240 = new Cell(){ CellReference = "C9", StyleIndex = (UInt32Value)30U };
            Cell cell1241 = new Cell(){ CellReference = "D9", StyleIndex = (UInt32Value)30U };
            Cell cell1242 = new Cell(){ CellReference = "E9", StyleIndex = (UInt32Value)30U };
            Cell cell1243 = new Cell(){ CellReference = "F9", StyleIndex = (UInt32Value)30U };
            Cell cell1244 = new Cell(){ CellReference = "G9", StyleIndex = (UInt32Value)30U };
            Cell cell1245 = new Cell(){ CellReference = "H9", StyleIndex = (UInt32Value)30U };

            row164.Append(cell1238);
            row164.Append(cell1239);
            row164.Append(cell1240);
            row164.Append(cell1241);
            row164.Append(cell1242);
            row164.Append(cell1243);
            row164.Append(cell1244);
            row164.Append(cell1245);

            Row row165 = new Row(){ RowIndex = (UInt32Value)10U, Spans = new ListValue<StringValue>() { InnerText = "1:9" }, StyleIndex = (UInt32Value)6U, CustomFormat = true, Height = 24D, CustomHeight = true, DyDescent = 0.25D };
            Cell cell1246 = new Cell(){ CellReference = "A10", StyleIndex = (UInt32Value)5U };

            Cell cell1247 = new Cell(){ CellReference = "B10", StyleIndex = (UInt32Value)31U };
            CellFormula cellFormula152 = new CellFormula(){ FormulaType = CellFormulaValues.Array, Reference = "B10:H10" };
            cellFormula152.Text = "DaysAndWeeks+DATE(CalendarYear,3,1)-WEEKDAY(DATE(CalendarYear,3,1),(WeekStart=\"Monday\")+1)+22";
            CellValue cellValue510 = new CellValue();
            cellValue510.Text = "43541";

            cell1247.Append(cellFormula152);
            cell1247.Append(cellValue510);

            Cell cell1248 = new Cell(){ CellReference = "C10", StyleIndex = (UInt32Value)31U };
            CellValue cellValue511 = new CellValue();
            cellValue511.Text = "43542";

            cell1248.Append(cellValue511);

            Cell cell1249 = new Cell(){ CellReference = "D10", StyleIndex = (UInt32Value)31U };
            CellValue cellValue512 = new CellValue();
            cellValue512.Text = "43543";

            cell1249.Append(cellValue512);

            Cell cell1250 = new Cell(){ CellReference = "E10", StyleIndex = (UInt32Value)31U };
            CellValue cellValue513 = new CellValue();
            cellValue513.Text = "43544";

            cell1250.Append(cellValue513);

            Cell cell1251 = new Cell(){ CellReference = "F10", StyleIndex = (UInt32Value)31U };
            CellValue cellValue514 = new CellValue();
            cellValue514.Text = "43545";

            cell1251.Append(cellValue514);

            Cell cell1252 = new Cell(){ CellReference = "G10", StyleIndex = (UInt32Value)31U };
            CellValue cellValue515 = new CellValue();
            cellValue515.Text = "43546";

            cell1252.Append(cellValue515);

            Cell cell1253 = new Cell(){ CellReference = "H10", StyleIndex = (UInt32Value)31U };
            CellValue cellValue516 = new CellValue();
            cellValue516.Text = "43547";

            cell1253.Append(cellValue516);

            row165.Append(cell1246);
            row165.Append(cell1247);
            row165.Append(cell1248);
            row165.Append(cell1249);
            row165.Append(cell1250);
            row165.Append(cell1251);
            row165.Append(cell1252);
            row165.Append(cell1253);

            Row row166 = new Row(){ RowIndex = (UInt32Value)11U, Spans = new ListValue<StringValue>() { InnerText = "1:9" }, StyleIndex = (UInt32Value)18U, CustomFormat = true, Height = 56.15D, CustomHeight = true, DyDescent = 0.25D };
            Cell cell1254 = new Cell(){ CellReference = "A11", StyleIndex = (UInt32Value)17U };
            Cell cell1255 = new Cell(){ CellReference = "B11", StyleIndex = (UInt32Value)29U };
            Cell cell1256 = new Cell(){ CellReference = "C11", StyleIndex = (UInt32Value)29U };
            Cell cell1257 = new Cell(){ CellReference = "D11", StyleIndex = (UInt32Value)29U };
            Cell cell1258 = new Cell(){ CellReference = "E11", StyleIndex = (UInt32Value)29U };
            Cell cell1259 = new Cell(){ CellReference = "F11", StyleIndex = (UInt32Value)29U };
            Cell cell1260 = new Cell(){ CellReference = "G11", StyleIndex = (UInt32Value)29U };
            Cell cell1261 = new Cell(){ CellReference = "H11", StyleIndex = (UInt32Value)29U };

            row166.Append(cell1254);
            row166.Append(cell1255);
            row166.Append(cell1256);
            row166.Append(cell1257);
            row166.Append(cell1258);
            row166.Append(cell1259);
            row166.Append(cell1260);
            row166.Append(cell1261);

            Row row167 = new Row(){ RowIndex = (UInt32Value)12U, Spans = new ListValue<StringValue>() { InnerText = "1:9" }, StyleIndex = (UInt32Value)6U, CustomFormat = true, Height = 24D, CustomHeight = true, DyDescent = 0.25D };
            Cell cell1262 = new Cell(){ CellReference = "A12", StyleIndex = (UInt32Value)5U };

            Cell cell1263 = new Cell(){ CellReference = "B12", StyleIndex = (UInt32Value)32U };
            CellFormula cellFormula153 = new CellFormula(){ FormulaType = CellFormulaValues.Array, Reference = "B12:H12" };
            cellFormula153.Text = "DaysAndWeeks+DATE(CalendarYear,3,1)-WEEKDAY(DATE(CalendarYear,3,1),(WeekStart=\"Monday\")+1)+29";
            CellValue cellValue517 = new CellValue();
            cellValue517.Text = "43548";

            cell1263.Append(cellFormula153);
            cell1263.Append(cellValue517);

            Cell cell1264 = new Cell(){ CellReference = "C12", StyleIndex = (UInt32Value)32U };
            CellValue cellValue518 = new CellValue();
            cellValue518.Text = "43549";

            cell1264.Append(cellValue518);

            Cell cell1265 = new Cell(){ CellReference = "D12", StyleIndex = (UInt32Value)32U };
            CellValue cellValue519 = new CellValue();
            cellValue519.Text = "43550";

            cell1265.Append(cellValue519);

            Cell cell1266 = new Cell(){ CellReference = "E12", StyleIndex = (UInt32Value)32U };
            CellValue cellValue520 = new CellValue();
            cellValue520.Text = "43551";

            cell1266.Append(cellValue520);

            Cell cell1267 = new Cell(){ CellReference = "F12", StyleIndex = (UInt32Value)32U };
            CellValue cellValue521 = new CellValue();
            cellValue521.Text = "43552";

            cell1267.Append(cellValue521);

            Cell cell1268 = new Cell(){ CellReference = "G12", StyleIndex = (UInt32Value)32U };
            CellValue cellValue522 = new CellValue();
            cellValue522.Text = "43553";

            cell1268.Append(cellValue522);

            Cell cell1269 = new Cell(){ CellReference = "H12", StyleIndex = (UInt32Value)32U };
            CellValue cellValue523 = new CellValue();
            cellValue523.Text = "43554";

            cell1269.Append(cellValue523);

            row167.Append(cell1262);
            row167.Append(cell1263);
            row167.Append(cell1264);
            row167.Append(cell1265);
            row167.Append(cell1266);
            row167.Append(cell1267);
            row167.Append(cell1268);
            row167.Append(cell1269);

            Row row168 = new Row(){ RowIndex = (UInt32Value)13U, Spans = new ListValue<StringValue>() { InnerText = "1:9" }, StyleIndex = (UInt32Value)18U, CustomFormat = true, Height = 56.15D, CustomHeight = true, DyDescent = 0.25D };
            Cell cell1270 = new Cell(){ CellReference = "A13", StyleIndex = (UInt32Value)17U };
            Cell cell1271 = new Cell(){ CellReference = "B13", StyleIndex = (UInt32Value)30U };
            Cell cell1272 = new Cell(){ CellReference = "C13", StyleIndex = (UInt32Value)30U };
            Cell cell1273 = new Cell(){ CellReference = "D13", StyleIndex = (UInt32Value)30U };
            Cell cell1274 = new Cell(){ CellReference = "E13", StyleIndex = (UInt32Value)30U };
            Cell cell1275 = new Cell(){ CellReference = "F13", StyleIndex = (UInt32Value)30U };
            Cell cell1276 = new Cell(){ CellReference = "G13", StyleIndex = (UInt32Value)30U };
            Cell cell1277 = new Cell(){ CellReference = "H13", StyleIndex = (UInt32Value)30U };

            row168.Append(cell1270);
            row168.Append(cell1271);
            row168.Append(cell1272);
            row168.Append(cell1273);
            row168.Append(cell1274);
            row168.Append(cell1275);
            row168.Append(cell1276);
            row168.Append(cell1277);

            Row row169 = new Row(){ RowIndex = (UInt32Value)14U, Spans = new ListValue<StringValue>() { InnerText = "1:9" }, StyleIndex = (UInt32Value)6U, CustomFormat = true, Height = 24D, CustomHeight = true, DyDescent = 0.25D };
            Cell cell1278 = new Cell(){ CellReference = "A14", StyleIndex = (UInt32Value)5U };

            Cell cell1279 = new Cell(){ CellReference = "B14", StyleIndex = (UInt32Value)31U };
            CellFormula cellFormula154 = new CellFormula(){ FormulaType = CellFormulaValues.Array, Reference = "B14:C14" };
            cellFormula154.Text = "DaysAndWeeks+DATE(CalendarYear,3,1)-WEEKDAY(DATE(CalendarYear,3,1),(WeekStart=\"Monday\")+1)+36";
            CellValue cellValue524 = new CellValue();
            cellValue524.Text = "43555";

            cell1279.Append(cellFormula154);
            cell1279.Append(cellValue524);

            Cell cell1280 = new Cell(){ CellReference = "C14", StyleIndex = (UInt32Value)31U };
            CellValue cellValue525 = new CellValue();
            cellValue525.Text = "43556";

            cell1280.Append(cellValue525);

            Cell cell1281 = new Cell(){ CellReference = "D14", StyleIndex = (UInt32Value)53U, DataType = CellValues.SharedString };
            CellValue cellValue526 = new CellValue();
            cellValue526.Text = "1";

            cell1281.Append(cellValue526);
            Cell cell1282 = new Cell(){ CellReference = "E14", StyleIndex = (UInt32Value)53U };
            Cell cell1283 = new Cell(){ CellReference = "F14", StyleIndex = (UInt32Value)53U };
            Cell cell1284 = new Cell(){ CellReference = "G14", StyleIndex = (UInt32Value)53U };
            Cell cell1285 = new Cell(){ CellReference = "H14", StyleIndex = (UInt32Value)54U };

            row169.Append(cell1278);
            row169.Append(cell1279);
            row169.Append(cell1280);
            row169.Append(cell1281);
            row169.Append(cell1282);
            row169.Append(cell1283);
            row169.Append(cell1284);
            row169.Append(cell1285);

            Row row170 = new Row(){ RowIndex = (UInt32Value)15U, Spans = new ListValue<StringValue>() { InnerText = "1:9" }, StyleIndex = (UInt32Value)18U, CustomFormat = true, Height = 56.15D, CustomHeight = true, DyDescent = 0.25D };
            Cell cell1286 = new Cell(){ CellReference = "A15", StyleIndex = (UInt32Value)17U };
            Cell cell1287 = new Cell(){ CellReference = "B15", StyleIndex = (UInt32Value)29U };
            Cell cell1288 = new Cell(){ CellReference = "C15", StyleIndex = (UInt32Value)29U };
            Cell cell1289 = new Cell(){ CellReference = "D15", StyleIndex = (UInt32Value)55U };
            Cell cell1290 = new Cell(){ CellReference = "E15", StyleIndex = (UInt32Value)55U };
            Cell cell1291 = new Cell(){ CellReference = "F15", StyleIndex = (UInt32Value)55U };
            Cell cell1292 = new Cell(){ CellReference = "G15", StyleIndex = (UInt32Value)55U };
            Cell cell1293 = new Cell(){ CellReference = "H15", StyleIndex = (UInt32Value)56U };

            row170.Append(cell1286);
            row170.Append(cell1287);
            row170.Append(cell1288);
            row170.Append(cell1289);
            row170.Append(cell1290);
            row170.Append(cell1291);
            row170.Append(cell1292);
            row170.Append(cell1293);

            sheetData12.Append(row156);
            sheetData12.Append(row157);
            sheetData12.Append(row158);
            sheetData12.Append(row159);
            sheetData12.Append(row160);
            sheetData12.Append(row161);
            sheetData12.Append(row162);
            sheetData12.Append(row163);
            sheetData12.Append(row164);
            sheetData12.Append(row165);
            sheetData12.Append(row166);
            sheetData12.Append(row167);
            sheetData12.Append(row168);
            sheetData12.Append(row169);
            sheetData12.Append(row170);

            MergeCells mergeCells12 = new MergeCells(){ Count = (UInt32Value)3U };
            MergeCell mergeCell36 = new MergeCell(){ Reference = "B2:D2" };
            MergeCell mergeCell37 = new MergeCell(){ Reference = "D14:H14" };
            MergeCell mergeCell38 = new MergeCell(){ Reference = "D15:H15" };

            mergeCells12.Append(mergeCell36);
            mergeCells12.Append(mergeCell37);
            mergeCells12.Append(mergeCell38);

            ConditionalFormatting conditionalFormatting21 = new ConditionalFormatting(){ SequenceOfReferences = new ListValue<StringValue>() { InnerText = "B12:H12 B14:C14" } };

            ConditionalFormattingRule conditionalFormattingRule21 = new ConditionalFormattingRule(){ Type = ConditionalFormatValues.Expression, FormatId = (UInt32Value)19U, Priority = 2 };
            Formula formula21 = new Formula();
            formula21.Text = "AND(DAY(B12)>=1,DAY(B12)<=15)";

            conditionalFormattingRule21.Append(formula21);

            conditionalFormatting21.Append(conditionalFormattingRule21);

            ConditionalFormatting conditionalFormatting22 = new ConditionalFormatting(){ SequenceOfReferences = new ListValue<StringValue>() { InnerText = "B4:G4" } };

            ConditionalFormattingRule conditionalFormattingRule22 = new ConditionalFormattingRule(){ Type = ConditionalFormatValues.Expression, FormatId = (UInt32Value)18U, Priority = 1 };
            Formula formula22 = new Formula();
            formula22.Text = "DAY(B4)>8";

            conditionalFormattingRule22.Append(formula22);

            conditionalFormatting22.Append(conditionalFormattingRule22);

            DataValidations dataValidations11 = new DataValidations(){ Count = (UInt32Value)8U };

            DataValidation dataValidation86 = new DataValidation(){ AllowBlank = true, ShowInputMessage = true, ShowErrorMessage = true, Prompt = "March month calendar", SequenceOfReferences = new ListValue<StringValue>() { InnerText = "A1" } };
            dataValidation86.SetAttribute(new OpenXmlAttribute("xr", "uid", "http://schemas.microsoft.com/office/spreadsheetml/2014/revision", "{00000000-0002-0000-0200-000000000000}"));

            DataValidation dataValidation87 = new DataValidation(){ AllowBlank = true, ShowInputMessage = true, ShowErrorMessage = true, Prompt = "The year in this cell is automatically updated based on year entered in January worksheet. Calendar below has dates for previous and next month with lighter font shade", SequenceOfReferences = new ListValue<StringValue>() { InnerText = "B2:D2" } };
            dataValidation87.SetAttribute(new OpenXmlAttribute("xr", "uid", "http://schemas.microsoft.com/office/spreadsheetml/2014/revision", "{00000000-0002-0000-0200-000001000000}"));

            DataValidation dataValidation88 = new DataValidation(){ AllowBlank = true, ShowInputMessage = true, ShowErrorMessage = true, Prompt = "Automatically determined weekday", SequenceOfReferences = new ListValue<StringValue>() { InnerText = "C3:H3" } };
            dataValidation88.SetAttribute(new OpenXmlAttribute("xr", "uid", "http://schemas.microsoft.com/office/spreadsheetml/2014/revision", "{00000000-0002-0000-0200-000002000000}"));

            DataValidation dataValidation89 = new DataValidation(){ AllowBlank = true, ShowInputMessage = true, ShowErrorMessage = true, Prompt = "This row & rows 6, 8, 10, 12 & 14 contain calendar days of the week. If this cell doesn’t contain the number 1, then it is a day from the previous month. Enter notes in cell D15.", SequenceOfReferences = new ListValue<StringValue>() { InnerText = "B4" } };
            dataValidation89.SetAttribute(new OpenXmlAttribute("xr", "uid", "http://schemas.microsoft.com/office/spreadsheetml/2014/revision", "{00000000-0002-0000-0200-000003000000}"));

            DataValidation dataValidation90 = new DataValidation(){ AllowBlank = true, ShowInputMessage = true, ShowErrorMessage = true, Prompt = "This row & rows 7, 9, 11, 13, & 15 are cells for entering daily notes related to the calendar day in the cell above.", SequenceOfReferences = new ListValue<StringValue>() { InnerText = "B5" } };
            dataValidation90.SetAttribute(new OpenXmlAttribute("xr", "uid", "http://schemas.microsoft.com/office/spreadsheetml/2014/revision", "{00000000-0002-0000-0200-000004000000}"));

            DataValidation dataValidation91 = new DataValidation(){ AllowBlank = true, ShowInputMessage = true, Prompt = "Enter monthly Notes in this cell", SequenceOfReferences = new ListValue<StringValue>() { InnerText = "D15:H15" } };
            dataValidation91.SetAttribute(new OpenXmlAttribute("xr", "uid", "http://schemas.microsoft.com/office/spreadsheetml/2014/revision", "{00000000-0002-0000-0200-000005000000}"));

            DataValidation dataValidation92 = new DataValidation(){ AllowBlank = true, ShowInputMessage = true, Prompt = "Enter monthly Notes in cell below", SequenceOfReferences = new ListValue<StringValue>() { InnerText = "D14:H14" } };
            dataValidation92.SetAttribute(new OpenXmlAttribute("xr", "uid", "http://schemas.microsoft.com/office/spreadsheetml/2014/revision", "{00000000-0002-0000-0200-000006000000}"));

            DataValidation dataValidation93 = new DataValidation(){ AllowBlank = true, ShowInputMessage = true, ShowErrorMessage = true, Prompt = "This row contains weekday names for this calendar. This cell contains the starting day of the week. To change week start day, select a new weekday in January worksheet cell L5.", SequenceOfReferences = new ListValue<StringValue>() { InnerText = "B3" } };
            dataValidation93.SetAttribute(new OpenXmlAttribute("xr", "uid", "http://schemas.microsoft.com/office/spreadsheetml/2014/revision", "{00000000-0002-0000-0200-000007000000}"));

            dataValidations11.Append(dataValidation86);
            dataValidations11.Append(dataValidation87);
            dataValidations11.Append(dataValidation88);
            dataValidations11.Append(dataValidation89);
            dataValidations11.Append(dataValidation90);
            dataValidations11.Append(dataValidation91);
            dataValidations11.Append(dataValidation92);
            dataValidations11.Append(dataValidation93);
            PrintOptions printOptions11 = new PrintOptions(){ HorizontalCentered = true };
            PageMargins pageMargins12 = new PageMargins(){ Left = 0.25D, Right = 0.25D, Top = 0.5D, Bottom = 0.5D, Header = 0.3D, Footer = 0.3D };
            PageSetup pageSetup11 = new PageSetup(){ Orientation = OrientationValues.Landscape, Id = "rId1" };
            HeaderFooter headerFooter11 = new HeaderFooter(){ DifferentFirst = true };
            Drawing drawing11 = new Drawing(){ Id = "rId2" };

            worksheet12.Append(sheetProperties11);
            worksheet12.Append(sheetDimension12);
            worksheet12.Append(sheetViews12);
            worksheet12.Append(sheetFormatProperties12);
            worksheet12.Append(columns12);
            worksheet12.Append(sheetData12);
            worksheet12.Append(mergeCells12);
            worksheet12.Append(conditionalFormatting21);
            worksheet12.Append(conditionalFormatting22);
            worksheet12.Append(dataValidations11);
            worksheet12.Append(printOptions11);
            worksheet12.Append(pageMargins12);
            worksheet12.Append(pageSetup11);
            worksheet12.Append(headerFooter11);
            worksheet12.Append(drawing11);

            worksheetPart12.Worksheet = worksheet12;
        }
 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/902292.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

xtu Euler‘s Totient Function+欧拉函数

Eulers Totient Function 样例输入 3 1 6 1 100 1 1000000样例输出 12 3044 303963552392 解题思路&#xff1a; 不管是素数还是合数&#xff0c;初始值都是它本身。 j为素数&#xff0c;f[j]j-1&#xff0c;相当于f[j]j/i*(i-1),ij 埃筛&#xff0c;ji,i为j的…

基于微信小程序实现信阳毛尖茶叶商城系统设计与实现

作者简介&#xff1a;Java领域优质创作者、CSDN博客专家 、CSDN内容合伙人、掘金特邀作者、阿里云博客专家、51CTO特邀作者、多年架构师设计经验、多年校企合作经验&#xff0c;被多个学校常年聘为校外企业导师&#xff0c;指导学生毕业设计并参与学生毕业答辩指导&#xff0c;…

利用这五项网络安全措施安全地扩展您的数据中心

由于大量行业使用这些设施&#xff0c;数据中心网络安全至关重要。医疗保健、金融、教育和其他行业都依赖此存储解决方案来保护记录和敏感信息。 公司可能会根据需求调整存储需求&#xff0c;因此了解网络安全协议至关重要。以下是如何在保护数据中心免受外部攻击的同时扩展数…

C++stack和queue的模拟实现

1.stack的模拟实现 在这一部分嘞&#xff0c;我们不再用传统的模拟实现来实现今天要实现的内容&#xff0c;我们使用一种设计模式来实现今天的内容 设计模式 目前接触到的设计模式一共有两种&#xff1a;一种是适配器模式&#xff0c;一种是迭代器模式 迭代器设计模式 迭代…

linux内核的原子操作与用户态的原子操作差别

Linux内核的原子操作与用户态的C语言原子操作主要在以下几个方面存在区别&#xff1a; 实现层级&#xff1a; 内核原子操作&#xff1a; 直接依赖于硬件提供的原子指令&#xff08;如CAS、原子加等&#xff09;&#xff0c;通过内核提供的函数&#xff08;如atomic_add()、at…

多目标优化求解的内涵主要方法

多目标优化问题 定义如下多目标优化问题&#xff1a; min ⁡ f ( x ) [ f 1 ( x ) , f 2 ( x ) , ⋯ , f n ( x ) ] ( 1 ) \min\quad f(x)[f_1(x),f_2(x),\cdots,f_n(x)]\quad(1) minf(x)[f1​(x),f2​(x),⋯,fn​(x)](1) 其中&#xff0c; f i ( x ) , ∀ i 1 , ⋯ , n f_…

TS中forEach与map,filter的简单事例及简单的说明

1、先上一张效果图&#xff1a; 2、再上一个代码&#xff1a; <template><div><h1>Array Test</h1><ul><li v-for"item in items" :key"item.id">{{ item.name }}</li></ul><div style"display:…

攻防世界的新手web题解

攻防世界引导模式 1、disabled_button 好&#xff0c;给了一个按钮&#xff0c;第一道题目就不会做 看的wp<input disabled class"btn btn-default" style"height:50px;width:200px;" type"submit" value"flag" name"auth&q…

嵌入式软开——八股文——学习引导和资料网址

1、找工作期间整理的相关八股资料&#xff0c;可以帮助初学者按此流程快速学习入门&#xff0c;帮助有基础的同学快速复习、查缺补漏&#xff0c;帮助找工作面试的同学&#xff0c;快速复习知识点。 2、前13个文件夹为单独模块的相关学习内容&#xff0c;里面涵盖相关模块的主…

【C++复习】第二弹-内存管理

目录 前言 1.结合地址空间来理解不同对象的存储区域 2.malloc和free以及new和delete的区别 3.什么是内存泄漏&#xff1f; 前言 对于一个程序来说&#xff0c;我们必须知道他的各个位置的变量存放在哪里的&#xff0c;所以我们必须要清楚C的内存分布。其实内存管理是衡量一个…

使用Python计算相对强弱指数(RSI)进阶

使用Python计算相对强弱指数&#xff08;RSI&#xff09;进阶 废话不多说&#xff0c;直接上主题&#xff1a;> 代码实现 以下是实现RSI计算的完整代码&#xff1a; # 创建一个DataFramedata {DATE: date_list, # 日期CLOSE: close_px_list, # 收盘价格 }df pd.DataF…

CodeQL学习笔记(1)-QL语法(逻辑连接词、量词、聚合词、谓词和类)

最近在学习CodeQL&#xff0c;对于CodeQL就不介绍了&#xff0c;目前网上一搜一大把。本系列是学习CodeQL的个人学习笔记&#xff0c;根据个人知识库笔记修改整理而来的&#xff0c;分享出来共同学习。个人觉得QL的语法比较反人类&#xff0c;至少与目前主流的这些OOP语言相比&…

小白投资理财 - 看懂 K 线形态下

小白投资理财 - 看懂 K 线形态下 熊势吞噬牛势吞噬孕育线牛市孕育线熊市孕育线 早晨之星黄昏之星总结 前一篇《 小白投资理财 - 看懂 K 线形态上》介绍了 6 种 K 线形态&#xff0c;有天气预报的&#xff0c;又有灭霸&#xff0c;小叮当&#xff0c;今天介绍另外 6 种在股市上…

认识CSS语法

CSS&#xff08;网页美容&#xff09; 重点&#xff1a;选择器、盒子模型、浮动、定位、动画&#xff0c;伸缩布局 Css的作用&#xff1a; 美化网页&#xff1a;CSS控制标签的样式 网页布局&#xff1a;CSS控制标签的位置 概念&#xff1a;层叠样式表&#xff08;级联样式表…

Linux | Rsync 命令:16 个实际示例(下)

引言 Rsync&#xff08;远程同步&#xff09;是Linux/Unix系统中用于远程和本地复制及同步文件和目录的常用工具。 利用rsync命令&#xff0c;您可以轻松地在不同目录、硬盘和网络之间进行数据的远程和本地复制与同步&#xff0c;进行数据备份&#xff0c;以及在两台Linux系统间…

【正点原子K210连载】第四十八章 自学习分类实验 摘自【正点原子】DNK210使用指南-CanMV版指南

第四十八章 自学习分类实验 在上一章节中&#xff0c;介绍了利用maix.KPU模块实现了MNIST的手写数据识别&#xff0c;本章将继续介绍利用maix.KPU模块实现的自学习分类。通过本章的学习&#xff0c;读者将学习到自学习分类应用在CanMV上的实现。 本章分为如下几个小节&#xf…

维乐Senso Edge坐垫,自然并不远,向往就前往

嘿&#xff0c;是不是已经厌倦了城市的钢筋森林&#xff0c;渴望一场说走就走的自然之旅&#xff1f;别急&#xff0c;维乐Senso Edge坐垫带你飞&#xff0c;让我们的车轮一起碾过每一寸向往的土地&#xff01;    追逐风&#xff0c;拥抱自然。你还记得第一次骑行时的那份…

【功能安全】 独立于环境的安全要素SEooC

目录 01 SEooC定义 02 SEooC开发步骤 03 SEooC开发示例 04 SEooC问答 01 SEooC定义 缩写: SEooC:Safety Element out of Context独立于环境的安全要素 SEooC出处:GB/T34590.10—2022,第9章节 SEooC与相关项什么关系? SEooC可以是系统、系统组合、子系统、软件组件、…

Linux 系统中,将网络配置从 DHCP 改为静态 IP的几种方法

Linux 系统中&#xff0c;将网络配置从 DHCP 改为静态 IP 可以通过几种不同的方法来实现&#xff0c;下面是几种常见的方式&#xff1a; 方法一&#xff1a;使用 connman&#xff08;Connection Manager&#xff09; 如果你已经在使用 connman 管理网络&#xff0c;可以通过修…

MATLAB实现遗传算法优化零件拆卸装配问题

零件拆卸装配问题是一个有复杂约束的优化问题&#xff0c;它涉及到零件之间的连接关系、拆卸或装配的顺序、工具的使用、操作成本。 1.假设&#xff1a; &#xff08;1&#xff09;零件完整性&#xff1a;每个零件在拆卸和装配过程中保持完整&#xff0c;不发生形变或损坏 &…