ooxmlsdk 0.5.1

Open XML SDK for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
//
// -----------------------------------------------------------------------------
//  THIS FILE WAS @generated AUTOMATICALLY. DO NOT MODIFY THIS FILE MANUALLY.
// -----------------------------------------------------------------------------
//

/// Defines the NamedSheetViews Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is xnsv:namedSheetViews.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "xnsv:CT_NamedSheetViews/xnsv:namedSheetViews")]
pub struct NamedSheetViews {
  pub xmlns: Vec<crate::common::XmlNamespaceDecl>,
  pub xml_header: crate::common::XmlHeaderType,
  pub mc_ignorable: Option<String>,
  /// _
  #[sdk(child(qname = "xnsv:CT_NamedSheetView/xnsv:namedSheetView"))]
  pub xnsv_named_sheet_view: Vec<NamedSheetView>,
  /// _
  #[sdk(child(qname = "x:CT_ExtensionList/xnsv:extLst"))]
  pub xnsv_ext_lst: Option<ExtensionList>,
}
/// Defines the NamedSheetView Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is xnsv:namedSheetView.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "xnsv:CT_NamedSheetView/xnsv:namedSheetView")]
pub struct NamedSheetView {
  /// name
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :name
  #[sdk(attr(qname = ":name"))]
  pub name: crate::simple_type::StringValue,
  /// id
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :id
  #[sdk(attr(qname = ":id"))]
  #[sdk(pattern(
    source = 1u32,
    regex = "\\{[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\\}"
  ))]
  #[sdk(string_format(source = 1u32, kind = "token"))]
  pub id: crate::simple_type::StringValue,
  /// _
  #[sdk(child(qname = "xnsv:CT_NsvFilter/xnsv:nsvFilter"))]
  pub xnsv_nsv_filter: Vec<NsvFilter>,
  /// _
  #[sdk(child(qname = "x:CT_ExtensionList/xnsv:extLst"))]
  pub xnsv_ext_lst: Option<ExtensionList>,
}
/// Defines the ExtensionList Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is xnsv:extLst.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "x:CT_ExtensionList/xnsv:extLst")]
pub struct ExtensionList {
  ///Extension.
  #[sdk(child(qname = "x:CT_Extension/x:ext"))]
  pub extension: Vec<crate::schemas::schemas_openxmlformats_org_spreadsheetml_2006_main::Extension>,
}
/// Defines the NsvFilter Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is xnsv:nsvFilter.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "xnsv:CT_NsvFilter/xnsv:nsvFilter")]
pub struct NsvFilter {
  /// filterId
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :filterId
  #[sdk(attr(qname = ":filterId"))]
  #[sdk(pattern(
    source = 1u32,
    regex = "\\{[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\\}"
  ))]
  #[sdk(string_format(source = 1u32, kind = "token"))]
  pub filter_id: crate::simple_type::StringValue,
  /// ref
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :ref
  #[sdk(attr(qname = ":ref"))]
  pub r#ref: Option<crate::simple_type::StringValue>,
  /// tableId
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :tableId
  #[sdk(attr(qname = ":tableId"))]
  pub table_id: Option<crate::simple_type::UInt32Value>,
  /// _
  #[sdk(child(qname = "xnsv:CT_ColumnFilter/xnsv:columnFilter"))]
  pub xnsv_column_filter: Vec<ColumnFilter>,
  /// _
  #[sdk(child(qname = "xnsv:CT_SortRules/xnsv:sortRules"))]
  pub xnsv_sort_rules: Option<std::boxed::Box<SortRules>>,
  /// _
  #[sdk(child(qname = "x:CT_ExtensionList/xnsv:extLst"))]
  pub xnsv_ext_lst: Option<ExtensionList>,
}
/// Defines the ColumnFilter Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is xnsv:columnFilter.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "xnsv:CT_ColumnFilter/xnsv:columnFilter")]
pub struct ColumnFilter {
  /// colId
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :colId
  #[sdk(attr(qname = ":colId"))]
  pub col_id: crate::simple_type::UInt32Value,
  /// id
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :id
  #[sdk(attr(qname = ":id"))]
  #[sdk(pattern(
    source = 0u32,
    regex = "\\{[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\\}"
  ))]
  #[sdk(string_format(source = 0u32, kind = "token"))]
  pub id: Option<crate::simple_type::StringValue>,
  /// _
  #[sdk(child(qname = "x:CT_Dxf/xnsv:dxf"))]
  pub differential_format_type: Option<std::boxed::Box<DifferentialFormatType>>,
  /// _
  #[sdk(child(qname = "x:CT_FilterColumn/xnsv:filter"))]
  pub xnsv_filter: Vec<FilterColumn>,
  /// _
  #[sdk(child(qname = "x:CT_ExtensionList/xnsv:extLst"))]
  pub xnsv_ext_lst: Option<ExtensionList>,
}
/// Defines the SortRules Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is xnsv:sortRules.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "xnsv:CT_SortRules/xnsv:sortRules")]
pub struct SortRules {
  /// sortMethod
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :sortMethod
  #[sdk(attr(qname = ":sortMethod"))]
  pub sort_method:
    Option<crate::schemas::schemas_openxmlformats_org_spreadsheetml_2006_main::SortMethodValues>,
  /// caseSensitive
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :caseSensitive
  #[sdk(attr(qname = ":caseSensitive"))]
  pub case_sensitive: Option<crate::simple_type::BooleanValue>,
  /// _
  #[sdk(child(qname = "xnsv:CT_SortRule/xnsv:sortRule"))]
  pub xnsv_sort_rule: Vec<SortRule>,
  /// _
  #[sdk(child(qname = "x:CT_ExtensionList/xnsv:extLst"))]
  pub xnsv_ext_lst: Option<ExtensionList>,
}
/// Defines the DifferentialFormatType Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is xnsv:dxf.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "x:CT_Dxf/xnsv:dxf")]
pub struct DifferentialFormatType {
  ///Font Properties
  #[sdk(child(qname = "x:CT_Font/x:font"))]
  pub font: Option<
    std::boxed::Box<crate::schemas::schemas_openxmlformats_org_spreadsheetml_2006_main::Font>,
  >,
  ///Number Format
  #[sdk(child(qname = "x:CT_NumFmt/x:numFmt"))]
  pub numbering_format:
    Option<crate::schemas::schemas_openxmlformats_org_spreadsheetml_2006_main::NumberingFormat>,
  ///Fill
  #[sdk(child(qname = "x:CT_Fill/x:fill"))]
  pub fill: Option<
    std::boxed::Box<crate::schemas::schemas_openxmlformats_org_spreadsheetml_2006_main::Fill>,
  >,
  ///Alignment
  #[sdk(child(qname = "x:CT_CellAlignment/x:alignment"))]
  pub alignment:
    Option<crate::schemas::schemas_openxmlformats_org_spreadsheetml_2006_main::Alignment>,
  ///Border Properties
  #[sdk(child(qname = "x:CT_Border/x:border"))]
  pub border: Option<
    std::boxed::Box<crate::schemas::schemas_openxmlformats_org_spreadsheetml_2006_main::Border>,
  >,
  ///Protection Properties
  #[sdk(child(qname = "x:CT_CellProtection/x:protection"))]
  pub protection:
    Option<crate::schemas::schemas_openxmlformats_org_spreadsheetml_2006_main::Protection>,
  ///Future Feature Data Storage Area
  #[sdk(child(qname = "x:CT_ExtensionList/x:extLst"))]
  pub extension_list:
    Option<crate::schemas::schemas_openxmlformats_org_spreadsheetml_2006_main::ExtensionList>,
}
/// Defines the FilterColumn Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is xnsv:filter.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "x:CT_FilterColumn/xnsv:filter")]
pub struct FilterColumn {
  /// Filter Column Data
  ///
  /// Available in Office2007 and above.
  ///
  /// Represents the following attribute in the schema: :colId
  #[sdk(attr(qname = ":colId"))]
  pub column_id: crate::simple_type::UInt32Value,
  /// Hidden AutoFilter Button
  ///
  /// Available in Office2007 and above.
  ///
  /// Represents the following attribute in the schema: :hiddenButton
  #[sdk(attr(qname = ":hiddenButton"))]
  pub hidden_button: Option<crate::simple_type::BooleanValue>,
  /// Show Filter Button
  ///
  /// Available in Office2007 and above.
  ///
  /// Represents the following attribute in the schema: :showButton
  #[sdk(attr(qname = ":showButton"))]
  pub show_button: Option<crate::simple_type::BooleanValue>,
  #[sdk(choice(
    qname = "x:CT_Filters/x:filters",
    qname = "x:CT_Top10/x:top10",
    qname = "x14:CT_CustomFilters/x14:customFilters",
    qname = "x:CT_CustomFilters/x:customFilters",
    qname = "x:CT_DynamicFilter/x:dynamicFilter",
    qname = "x:CT_ColorFilter/x:colorFilter",
    qname = "x14:CT_IconFilter/x14:iconFilter",
    qname = "x:CT_IconFilter/x:iconFilter",
    qname = "x:CT_ExtensionList/x:extLst"
  ))]
  pub xml_children: Option<FilterColumnChoice>,
}
/// Defines the SortRule Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is xnsv:sortRule.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "xnsv:CT_SortRule/xnsv:sortRule")]
pub struct SortRule {
  /// colId
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :colId
  #[sdk(attr(qname = ":colId"))]
  pub col_id: crate::simple_type::UInt32Value,
  /// id
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :id
  #[sdk(attr(qname = ":id"))]
  #[sdk(pattern(
    source = 0u32,
    regex = "\\{[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\\}"
  ))]
  #[sdk(string_format(source = 0u32, kind = "token"))]
  pub id: Option<crate::simple_type::StringValue>,
  /// _
  #[sdk(child(qname = "x:CT_Dxf/xnsv:dxf"))]
  pub differential_format_type: Option<std::boxed::Box<DifferentialFormatType>>,
  #[sdk(choice(
    qname = "x14:CT_SortCondition/xnsv:sortCondition",
    qname = "xlrd2:CT_RichSortCondition/xnsv:richSortCondition"
  ))]
  pub sort_rule_choice: Option<SortRuleChoice>,
}
/// Defines the SortCondition Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is xnsv:sortCondition.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "x14:CT_SortCondition/xnsv:sortCondition")]
pub struct SortCondition {
  /// descending
  ///
  /// Available in Office2010 and above.
  ///
  /// Represents the following attribute in the schema: :descending
  #[sdk(attr(qname = ":descending"))]
  pub descending: Option<crate::simple_type::BooleanValue>,
  /// sortBy
  ///
  /// Available in Office2010 and above.
  ///
  /// Represents the following attribute in the schema: :sortBy
  #[sdk(attr(qname = ":sortBy"))]
  pub sort_by:
    Option<crate::schemas::schemas_openxmlformats_org_spreadsheetml_2006_main::SortByValues>,
  /// ref
  ///
  /// Available in Office2010 and above.
  ///
  /// Represents the following attribute in the schema: :ref
  #[sdk(attr(qname = ":ref"))]
  pub reference: crate::simple_type::StringValue,
  /// customList
  ///
  /// Available in Office2010 and above.
  ///
  /// Represents the following attribute in the schema: :customList
  #[sdk(attr(qname = ":customList"))]
  pub custom_list: Option<crate::simple_type::StringValue>,
  /// dxfId
  ///
  /// Available in Office2010 and above.
  ///
  /// Represents the following attribute in the schema: :dxfId
  #[sdk(attr(qname = ":dxfId"))]
  pub format_id: Option<crate::simple_type::UInt32Value>,
  /// iconSet
  ///
  /// Available in Office2010 and above.
  ///
  /// Represents the following attribute in the schema: :iconSet
  #[sdk(attr(qname = ":iconSet"))]
  pub icon_set: Option<
    crate::schemas::schemas_microsoft_com_office_spreadsheetml_2009_9_main::IconSetTypeValues,
  >,
  /// iconId
  ///
  /// Available in Office2010 and above.
  ///
  /// Represents the following attribute in the schema: :iconId
  #[sdk(attr(qname = ":iconId"))]
  pub icon_id: Option<crate::simple_type::UInt32Value>,
}
/// Defines the RichSortCondition Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is xnsv:richSortCondition.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "xlrd2:CT_RichSortCondition/xnsv:richSortCondition")]
pub struct RichSortCondition {
  /// richSortKey
  ///
  /// Available in Office2019 and above.
  ///
  /// Represents the following attribute in the schema: :richSortKey
  #[sdk(attr(qname = ":richSortKey"))]
  pub rich_sort_key: Option<crate::simple_type::StringValue>,
  /// descending
  ///
  /// Available in Office2010 and above.
  ///
  /// Represents the following attribute in the schema: :descending
  #[sdk(attr(qname = ":descending"))]
  pub descending: Option<crate::simple_type::BooleanValue>,
  /// sortBy
  ///
  /// Available in Office2010 and above.
  ///
  /// Represents the following attribute in the schema: :sortBy
  #[sdk(attr(qname = ":sortBy"))]
  pub sort_by:
    Option<crate::schemas::schemas_openxmlformats_org_spreadsheetml_2006_main::SortByValues>,
  /// ref
  ///
  /// Available in Office2010 and above.
  ///
  /// Represents the following attribute in the schema: :ref
  #[sdk(attr(qname = ":ref"))]
  pub reference: crate::simple_type::StringValue,
  /// customList
  ///
  /// Available in Office2010 and above.
  ///
  /// Represents the following attribute in the schema: :customList
  #[sdk(attr(qname = ":customList"))]
  pub custom_list: Option<crate::simple_type::StringValue>,
  /// dxfId
  ///
  /// Available in Office2010 and above.
  ///
  /// Represents the following attribute in the schema: :dxfId
  #[sdk(attr(qname = ":dxfId"))]
  pub format_id: Option<crate::simple_type::UInt32Value>,
  /// iconSet
  ///
  /// Available in Office2010 and above.
  ///
  /// Represents the following attribute in the schema: :iconSet
  #[sdk(attr(qname = ":iconSet"))]
  pub icon_set: Option<
    crate::schemas::schemas_microsoft_com_office_spreadsheetml_2009_9_main::IconSetTypeValues,
  >,
  /// iconId
  ///
  /// Available in Office2010 and above.
  ///
  /// Represents the following attribute in the schema: :iconId
  #[sdk(attr(qname = ":iconId"))]
  pub icon_id: Option<crate::simple_type::UInt32Value>,
}
#[derive(Clone, Debug, PartialEq, ooxmlsdk_derive::SdkChoice)]
pub enum FilterColumnChoice {
  #[sdk(child(qname = "x:CT_Filters/x:filters"))]
  XFilters(
    std::boxed::Box<crate::schemas::schemas_openxmlformats_org_spreadsheetml_2006_main::Filters>,
  ),
  #[sdk(child(qname = "x:CT_Top10/x:top10"))]
  XTop10(
    std::boxed::Box<crate::schemas::schemas_openxmlformats_org_spreadsheetml_2006_main::Top10>,
  ),
  #[sdk(child(qname = "x14:CT_CustomFilters/x14:customFilters"))]
  X14CustomFilters(
    std::boxed::Box<
      crate::schemas::schemas_microsoft_com_office_spreadsheetml_2009_9_main::CustomFilters,
    >,
  ),
  #[sdk(child(qname = "x:CT_CustomFilters/x:customFilters"))]
  XCustomFilters(
    std::boxed::Box<
      crate::schemas::schemas_openxmlformats_org_spreadsheetml_2006_main::CustomFilters,
    >,
  ),
  #[sdk(child(qname = "x:CT_DynamicFilter/x:dynamicFilter"))]
  XDynamicFilter(
    std::boxed::Box<
      crate::schemas::schemas_openxmlformats_org_spreadsheetml_2006_main::DynamicFilter,
    >,
  ),
  #[sdk(child(qname = "x:CT_ColorFilter/x:colorFilter"))]
  XColorFilter(
    std::boxed::Box<
      crate::schemas::schemas_openxmlformats_org_spreadsheetml_2006_main::ColorFilter,
    >,
  ),
  #[sdk(child(qname = "x14:CT_IconFilter/x14:iconFilter"))]
  X14IconFilter(
    std::boxed::Box<
      crate::schemas::schemas_microsoft_com_office_spreadsheetml_2009_9_main::IconFilter,
    >,
  ),
  #[sdk(child(qname = "x:CT_IconFilter/x:iconFilter"))]
  XIconFilter(
    std::boxed::Box<crate::schemas::schemas_openxmlformats_org_spreadsheetml_2006_main::IconFilter>,
  ),
  #[sdk(child(qname = "x:CT_ExtensionList/x:extLst"))]
  XExtLst(
    std::boxed::Box<
      crate::schemas::schemas_openxmlformats_org_spreadsheetml_2006_main::ExtensionList,
    >,
  ),
}
#[derive(Clone, Debug, PartialEq, ooxmlsdk_derive::SdkChoice)]
pub enum SortRuleChoice {
  #[sdk(child(qname = "x14:CT_SortCondition/xnsv:sortCondition"))]
  XnsvSortCondition(std::boxed::Box<SortCondition>),
  #[sdk(child(qname = "xlrd2:CT_RichSortCondition/xnsv:richSortCondition"))]
  XnsvRichSortCondition(std::boxed::Box<RichSortCondition>),
}