ooxml

Check-in [4827b010f4]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:new constructor opts
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | newcreateopts
Files: files | file ages | folders
SHA3-256: 4827b010f4b27a2d57aa55679cc6b4cd1379e06a067f5a04074c0640cfd2466d
User & Date: alex 2019-08-09 16:24:02
Context
2019-08-09
20:57
new opts: -created, -modifiedby, -modified and -application Leaf check-in: b37b7c9994 user: alex tags: newcreateopts
16:24
new constructor opts check-in: 4827b010f4 user: alex tags: newcreateopts
2019-08-08
13:32
merged idomidioms check-in: 07a138a2f1 user: alex tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ooxml.tcl.

1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478

1479





1480
1481
1482
1483
1484
1485
1486
....
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
....
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
    my variable fonts
    my variable numFmts
    my variable styles
    my variable fills
    my variable borders
    my variable cols

    if {[::ooxml::Getopt opts {creator.arg {unknown}} $args]} {
      error $opts(-errmsg)
    }

    set obj(blockPreset) 0

    set obj(encoding) utf-8
    set obj(indent) none

    set obj(creator) $opts(creator)

    set obj(created) [clock format [clock seconds] -format %Y-%m-%dT%H:%M:%SZ -gmt 1]






    set obj(sheets) 0
    array set sheets {}

    set obj(sharedStrings) 0
    set sharedStrings {}

................................................................................
      dom createNodeCmd -tagName $tag elementNode Tag_$tag
    }

    $root setAttribute xmlns http://schemas.openxmlformats.org/officeDocument/2006/extended-properties
    $root setAttribute xmlns:vt http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes

    $root appendFromScript {
      Tag_Application { Text {Tcl - Office Open XML - Spreadsheet} }
      Tag_DocSecurity { Text 0 }
      Tag_ScaleCrop { Text false }
      Tag_HeadingPairs {
	Tag_vt:vector size 2 baseType variant {
	  Tag_vt:variant {
	    Tag_vt:lpstr { Text [msgcat::mc Worksheets] }
	  }
................................................................................
    $root setAttribute xmlns:dc http://purl.org/dc/elements/1.1/
    $root setAttribute xmlns:dcterms http://purl.org/dc/terms/
    $root setAttribute xmlns:dcmitype http://purl.org/dc/dcmitype/
    $root setAttribute xmlns:xsi http://www.w3.org/2001/XMLSchema-instance

    $root appendFromScript {
      Tag_dc:creator { Text $obj(creator) }
      Tag_cp:lastModifiedBy { Text $obj(creator) }
      Tag_dcterms:created xsi:type dcterms:W3CDTF { Text $obj(created) }
      Tag_dcterms:modified xsi:type dcterms:W3CDTF { Text $obj(created) }
    }


    # xl/_rels/workbook.xml.rels
    set doc [set obj(doc,xl/_rels/workbook.xml.rels) [dom createDocument Relationships]]
    set root [$doc documentElement]








|









>

>
>
>
>
>







 







|







 







|

|







1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
....
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
....
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
    my variable fonts
    my variable numFmts
    my variable styles
    my variable fills
    my variable borders
    my variable cols

    if {[::ooxml::Getopt opts {creator.arg {unknown} application.args {}} $args]} {
      error $opts(-errmsg)
    }

    set obj(blockPreset) 0

    set obj(encoding) utf-8
    set obj(indent) none

    set obj(creator) $opts(creator)
    set obj(lastModifiedBy) $opts(creator)
    set obj(created) [clock format [clock seconds] -format %Y-%m-%dT%H:%M:%SZ -gmt 1]
    set obj(modified) $obj(created)
    set obj(application) $opts(application)
    if {[string trim $obj(application)] eq {}} {
      set obj(application) {Tcl - Office Open XML - Spreadsheet}
    }

    set obj(sheets) 0
    array set sheets {}

    set obj(sharedStrings) 0
    set sharedStrings {}

................................................................................
      dom createNodeCmd -tagName $tag elementNode Tag_$tag
    }

    $root setAttribute xmlns http://schemas.openxmlformats.org/officeDocument/2006/extended-properties
    $root setAttribute xmlns:vt http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes

    $root appendFromScript {
      Tag_Application { Text $obj(application) }
      Tag_DocSecurity { Text 0 }
      Tag_ScaleCrop { Text false }
      Tag_HeadingPairs {
	Tag_vt:vector size 2 baseType variant {
	  Tag_vt:variant {
	    Tag_vt:lpstr { Text [msgcat::mc Worksheets] }
	  }
................................................................................
    $root setAttribute xmlns:dc http://purl.org/dc/elements/1.1/
    $root setAttribute xmlns:dcterms http://purl.org/dc/terms/
    $root setAttribute xmlns:dcmitype http://purl.org/dc/dcmitype/
    $root setAttribute xmlns:xsi http://www.w3.org/2001/XMLSchema-instance

    $root appendFromScript {
      Tag_dc:creator { Text $obj(creator) }
      Tag_cp:lastModifiedBy { Text $obj(lastModifiedBy) }
      Tag_dcterms:created xsi:type dcterms:W3CDTF { Text $obj(created) }
      Tag_dcterms:modified xsi:type dcterms:W3CDTF { Text $obj(modified) }
    }


    # xl/_rels/workbook.xml.rels
    set doc [set obj(doc,xl/_rels/workbook.xml.rels) [dom createDocument Relationships]]
    set root [$doc documentElement]