ooxml

Check-in [b72ce0e7de]
Login

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

Overview
Comment:xl_read section columns changed array index ws,col,idx
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b72ce0e7de468b126ba0eada4ffabe625aecd0e505ee3eb7e87f490217fbcda5
User & Date: alex 2019-11-27 14:58:19
Context
2019-11-28
14:25
merged from tcltest check-in: a789d06e7e user: alex tags: trunk
2019-11-27
15:00
merged from trunk check-in: 47e17db8b5 user: alex tags: tcltest
14:58
xl_read section columns changed array index ws,col,idx check-in: b72ce0e7de user: alex tags: trunk
2019-11-23
07:16
added license.terms check-in: 93c38d23d6 user: alex tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ooxml.tcl.

1209
1210
1211
1212
1213
1214
1215

1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230

1231
1232
1233
1234
1235
1236
1237
      fconfigure $fd -encoding utf-8
      if {![catch {dom parse [read $fd]} doc]} {
	$doc documentElement root
        $doc selectNodesNamespaces [list M $xmlns(M) r $xmlns(r) mc $xmlns(mc) x14ac $xmlns(x14ac)]
	set idx -1
	foreach col [$root selectNodes /M:worksheet/M:cols/M:col] {
	  incr idx

	  foreach item {min max width style bestFit customWidth} {
	    if {[$col hasAttribute $item]} {
	      switch -- $item {
	        min - max {
		  lappend wb($sheet,col,$idx) [string tolower $item] [expr {[$col @$item] - 1}]
		}
		default {
		  lappend wb($sheet,col,$idx) [string tolower $item] [$col @$item]
		}
	      }
	    } else {
	      lappend wb($sheet,col,$idx) [string tolower $item] 0
	    }
	  }
	  lappend wb($sheet,col,$idx) string 0 nozero 0 calcfit 0

	}
	set wb($sheet,cols) [incr idx]
	foreach cell [$root selectNodes /M:worksheet/M:sheetData/M:row/M:c] {
	  if {[$cell hasAttribute t]} {
	    set type [$cell @t]
	  } else {
	    set type n







>




|


|



|


|
>







1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
      fconfigure $fd -encoding utf-8
      if {![catch {dom parse [read $fd]} doc]} {
	$doc documentElement root
        $doc selectNodesNamespaces [list M $xmlns(M) r $xmlns(r) mc $xmlns(mc) x14ac $xmlns(x14ac)]
	set idx -1
	foreach col [$root selectNodes /M:worksheet/M:cols/M:col] {
	  incr idx
	  set cols {}
	  foreach item {min max width style bestFit customWidth} {
	    if {[$col hasAttribute $item]} {
	      switch -- $item {
	        min - max {
		  lappend cols [string tolower $item] [expr {[$col @$item] - 1}]
		}
		default {
		  lappend cols [string tolower $item] [$col @$item]
		}
	      }
	    } else {
	      lappend cols [string tolower $item] 0
	    }
	  }
	  lappend cols string 0 nozero 0 calcfit 0
	  set wb($sheet,col,[dict get $cols min]) $cols
	}
	set wb($sheet,cols) [incr idx]
	foreach cell [$root selectNodes /M:worksheet/M:sheetData/M:row/M:c] {
	  if {[$cell hasAttribute t]} {
	    set type [$cell @t]
	  } else {
	    set type n