ooxml

Check-in [a3e6c25ebf]
Login

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

Overview
Comment:package require modificated at all samples
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a3e6c25ebfa518e2b3fec389a26841248e54341039fdeae59e0acd5b0c5e140e
User & Date: alex 2019-08-10 09:15:13
Original Comment: pkg req modification
Context
2019-08-10
09:21
merged new constructor options check-in: 86cfba6df0 user: alex tags: trunk
09:15
package require modificated at all samples check-in: a3e6c25ebf user: alex tags: trunk
2019-08-08
13:32
merged idomidioms check-in: 07a138a2f1 user: alex tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to examples/sample1.tcl.

1
2
3
4

5
6

7
8
9
10
11
12
13
#!/bin/sh
#\
exec tclsh8.6 "$0" "$@"


#package require ooxml
source ../ooxml.tcl


source array.tcl

set spreadsheet [::ooxml::xl_write new -creator {Alexander Schöpe}]
if {[set sheet [$spreadsheet worksheet {Tabelle 1}]] > -1} {
  set center [$spreadsheet style -horizontal center]
  set date [$spreadsheet style -numfmt [$spreadsheet numberformat -datetime]]




>
|
|
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
#\
exec tclsh8.6 "$0" "$@"

set auto_path [linsert $auto_path 0 ..]
if {[catch {package require ooxml}]} {
  source ../ooxml.tcl
}

source array.tcl

set spreadsheet [::ooxml::xl_write new -creator {Alexander Schöpe}]
if {[set sheet [$spreadsheet worksheet {Tabelle 1}]] > -1} {
  set center [$spreadsheet style -horizontal center]
  set date [$spreadsheet style -numfmt [$spreadsheet numberformat -datetime]]

Changes to examples/sample2.tcl.

1
2
3
4

5
6

7
8
9
10
11
12
13
#!/bin/sh
#\
exec tclsh8.6 "$0" "$@"


#package require ooxml
source ../ooxml.tcl


source array.tcl

set spreadsheet [::ooxml::xl_write new -creator {Alexander Schöpe}]
if {[set sheet [$spreadsheet worksheet {Tabelle 1}]] > -1} {
  set center [$spreadsheet style -horizontal center]
  set date [$spreadsheet style -numfmt [$spreadsheet numberformat -datetime]]




>
|
|
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
#\
exec tclsh8.6 "$0" "$@"

set auto_path [linsert $auto_path 0 ..]
if {[catch {package require ooxml}]} {
  source ../ooxml.tcl
}

source array.tcl

set spreadsheet [::ooxml::xl_write new -creator {Alexander Schöpe}]
if {[set sheet [$spreadsheet worksheet {Tabelle 1}]] > -1} {
  set center [$spreadsheet style -horizontal center]
  set date [$spreadsheet style -numfmt [$spreadsheet numberformat -datetime]]

Changes to examples/sample3.tcl.

1
2
3
4
5
6
7

8
9

10
11
12
13
14
15
16
#!/bin/sh
#\
exec wish8.6 "$0" "$@"

package require Tk
package require tablelist


#package require ooxml
source ../ooxml.tcl


source array.tcl

# build Tablelist from array

set lb .lb
tablelist::tablelist $lb -height 16 -width 100 -showseparators 1 -titlecolumns 3 -labelcommand tablelist::sortByColumn







>
|
|
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
#\
exec wish8.6 "$0" "$@"

package require Tk
package require tablelist

set auto_path [linsert $auto_path 0 ..]
if {[catch {package require ooxml}]} {
  source ../ooxml.tcl
}

source array.tcl

# build Tablelist from array

set lb .lb
tablelist::tablelist $lb -height 16 -width 100 -showseparators 1 -titlecolumns 3 -labelcommand tablelist::sortByColumn

Changes to examples/sample4.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
#\
exec tclsh8.6 "$0" "$@"

lappend auto_path .
if {[catch {package require ooxml}]} {
    source ../ooxml.tcl
}

source array.tcl

set spreadsheet [::ooxml::xl_write new -creator {Alexander Schöpe}]
if {[set sheet [$spreadsheet worksheet {Tabelle 1}]] > -1} {
  $spreadsheet row $sheet




|

|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
#\
exec tclsh8.6 "$0" "$@"

set auto_path [linsert $auto_path 0 ..]
if {[catch {package require ooxml}]} {
  source ../ooxml.tcl
}

source array.tcl

set spreadsheet [::ooxml::xl_write new -creator {Alexander Schöpe}]
if {[set sheet [$spreadsheet worksheet {Tabelle 1}]] > -1} {
  $spreadsheet row $sheet

Changes to examples/sample5.tcl.

1
2
3
4

5
6

7
8
9
10
11
12
13
14
15
16
#!/bin/sh
#\
exec tclsh8.6 "$0" "$@"


#package require ooxml
source ../ooxml.tcl


set spreadsheet [::ooxml::xl_write new -creator {Alexander Schöpe}]
if {[set sheet [$spreadsheet worksheet {Tabelle 1}]] > -1} {
  set date [$spreadsheet style -numfmt [$spreadsheet numberformat -datetime]]
  $spreadsheet defaultdatestyle $date
  # 2018-03-02 17:39 -> 43161.73542
  $spreadsheet cell $sheet "2018-03-02 17:39" -index 0,0
  $spreadsheet write export5.xlsx
}
$spreadsheet destroy




>
|
|
>










1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
#\
exec tclsh8.6 "$0" "$@"

set auto_path [linsert $auto_path 0 ..]
if {[catch {package require ooxml}]} {
  source ../ooxml.tcl
}

set spreadsheet [::ooxml::xl_write new -creator {Alexander Schöpe}]
if {[set sheet [$spreadsheet worksheet {Tabelle 1}]] > -1} {
  set date [$spreadsheet style -numfmt [$spreadsheet numberformat -datetime]]
  $spreadsheet defaultdatestyle $date
  # 2018-03-02 17:39 -> 43161.73542
  $spreadsheet cell $sheet "2018-03-02 17:39" -index 0,0
  $spreadsheet write export5.xlsx
}
$spreadsheet destroy

Changes to examples/sample6.tcl.

1
2
3
4

5
6

7
8
9
10
11
12
13
#!/bin/sh
#\
exec tclsh8.6 "$0" "$@"


#package require ooxml
source ../ooxml.tcl


set spreadsheet [::ooxml::xl_write new -creator {Alexander Schöpe}]
if {[set sheet [$spreadsheet worksheet {Blatt 1}]] > -1} {
  set bold [$spreadsheet style -font [$spreadsheet font -bold]]
  set italic [$spreadsheet style -font [$spreadsheet font -italic]]
  set underline [$spreadsheet style -font [$spreadsheet font -underline]]





>
|
|
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
#\
exec tclsh8.6 "$0" "$@"

set auto_path [linsert $auto_path 0 ..]
if {[catch {package require ooxml}]} {
  source ../ooxml.tcl
}

set spreadsheet [::ooxml::xl_write new -creator {Alexander Schöpe}]
if {[set sheet [$spreadsheet worksheet {Blatt 1}]] > -1} {
  set bold [$spreadsheet style -font [$spreadsheet font -bold]]
  set italic [$spreadsheet style -font [$spreadsheet font -italic]]
  set underline [$spreadsheet style -font [$spreadsheet font -underline]]

Changes to examples/sample7.tcl.

1
2
3
4

5
6

7
8
9
10
11
12
13
14
15
#!/bin/sh
#\
exec tclsh8.6 "$0" "$@"


#package require ooxml
source ../ooxml.tcl


array set workbook [ooxml::xl_read original_excel.xlsx]

set spreadsheet [::ooxml::xl_write new]
$spreadsheet presetstyles workbook
$spreadsheet presetsheets workbook
$spreadsheet write export7.xlsx
$spreadsheet destroy





>
|
|
>









1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
#\
exec tclsh8.6 "$0" "$@"

set auto_path [linsert $auto_path 0 ..]
if {[catch {package require ooxml}]} {
  source ../ooxml.tcl
}

array set workbook [ooxml::xl_read original_excel.xlsx]

set spreadsheet [::ooxml::xl_write new]
$spreadsheet presetstyles workbook
$spreadsheet presetsheets workbook
$spreadsheet write export7.xlsx
$spreadsheet destroy

Changes to examples/sample8.tcl.

1
2
3
4

5
6

7
8
9
10
11
12
13
#!/bin/sh
#\
exec tclsh8.6 "$0" "$@"


#package require ooxml
source ../ooxml.tcl


array set workbook [ooxml::xl_read form8.xlsx]

set data(NAME) {Erika Mustermann}
set data(ANSCHRIFT) {Heidestrasse 17}
set data(PLZORT) {51147 Köln}
set data(positionen) 3




>
|
|
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
#\
exec tclsh8.6 "$0" "$@"

set auto_path [linsert $auto_path 0 ..]
if {[catch {package require ooxml}]} {
  source ../ooxml.tcl
}

array set workbook [ooxml::xl_read form8.xlsx]

set data(NAME) {Erika Mustermann}
set data(ANSCHRIFT) {Heidestrasse 17}
set data(PLZORT) {51147 Köln}
set data(positionen) 3