Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #371: Incorrectly configured static routes on the corerouters.


comp / comp.lang.tcl / Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 released

SubjectAuthor
* ANNOUNCE: Excel file format reader/writer package OOXML 1.9 releasedHarald Oehlmann
`* Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 releasedTorstenBerg
 `* Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 releasedHarald Oehlmann
  `* Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 releasedRalf Fassel
   `* Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 releasedHarald Oehlmann
    `* Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 releasedTorstenBerg
     +- Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 releasedHarald Oehlmann
     `- Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 releasedRalf Fassel

1
Subject: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 released
From: Harald Oehlmann
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Fri, 29 Nov 2024 14:27 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: wortkarg3@yahoo.com (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 released
Date: Fri, 29 Nov 2024 15:27:38 +0100
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <vicj0q$10cg3$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 29 Nov 2024 15:27:38 +0100 (CET)
Injection-Info: dont-email.me; posting-host="067de7bf8f90fe1f0c7a15c59f28d2ec";
logging-data="1061379"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xRyM7cs+CUHIzivP7bVeq"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:q+Ab6ZqeLCNrpiqt0pHf0ocXrvU=
Content-Language: en-GB
View all headers

Dear TCL team,

OOXML may read and write Excel files.

New features are:
- Set header/footer
- TCL 8.6: optionally read using tcllib::zip::read module, so binary
package vfs::zip is not required any more
- If vfs::zip is used, version 1.0.4 is required
- More checks on file read on invalid files

So, the requirements are:
- TDOM 0.9
- TCL 8.6.7

And for reading one of:
- TCLLIB::ZIP:READ
- VFS::ZIP version 1.0.4 or better

The download page is here:
https://fossil.sowaswie.de/ooxml/uv/download.html

Thanks to all contributors !
Harald (on behalf of the very busy group)

Subject: Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 released
From: TorstenBerg
Newsgroups: comp.lang.tcl
Organization: novaBBS
Date: Thu, 5 Dec 2024 12:06 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!news.quux.org!news.nk.ca!rocksolid2!i2pn2.org!.POSTED!not-for-mail
From: berg@typoscriptics.de (TorstenBerg)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 released
Date: Thu, 5 Dec 2024 12:06:34 +0000
Organization: novaBBS
Message-ID: <23d440f2cbb17d78d4e5446b910ef11d@www.novabbs.com>
References: <vicj0q$10cg3$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="1386232"; mail-complaints-to="usenet@i2pn2.org";
posting-account="xPTk8ic+ltIs4SDkCn9Fp7eV+RMOfXYjsd4WptzKKdI";
User-Agent: Rocksolid Light
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Posting-User: a57e9dbaf481589bcf993cc1252a6f6a094c850c
X-Rslight-Site: $2y$10$dJmsZHUcsukNRC9PXerane2JVDtAs3IzNBEo.as3KdYX33.oYqT7q
View all headers

Hi,

thanks for the new version. This is much appreciated and the new options
on paper size and orientation work nicely.

One issue that I found:

When I have a Tcl script encoded in utf-8 and that script writes the
xlsx file, then umlauts come out weird. Is there an option that can
handle this or does ooxml assume or expect text input to be in a
specific encoding?

And an idea:

When formatting cells using the '-style' option of the 'cell' method,
it would be cool to be able to specify more than one style (e.g. as a
list of styleIDs). Then you could have one style for font styling and
another for borders and then combine those two to get cells with a
specific font and border. Conflicting elements of two different styles
of the list could be handled so that a style later in the list would
overwrite settings for the identical option in a previous style in the
list.

Regards, Torsten

Subject: Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 released
From: Harald Oehlmann
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Thu, 5 Dec 2024 12:53 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: wortkarg3@yahoo.com (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9
released
Date: Thu, 5 Dec 2024 13:53:04 +0100
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <vis7nh$1idt0$1@dont-email.me>
References: <vicj0q$10cg3$2@dont-email.me>
<23d440f2cbb17d78d4e5446b910ef11d@www.novabbs.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 05 Dec 2024 13:53:05 +0100 (CET)
Injection-Info: dont-email.me; posting-host="06c3a575ba4389d4db04bb9be5ea5904";
logging-data="1652640"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ubbA2dcCfByNc+6pLUnRy"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:e2S02ICtJ6gCQf8xnRcQgZLC0CI=
In-Reply-To: <23d440f2cbb17d78d4e5446b910ef11d@www.novabbs.com>
Content-Language: en-GB
View all headers

Hi Torsten,
thanks for the message. Please use the tickets in the tracker:
https://fossil.sowaswie.de/ooxml/ticket
You may author two tickets.

About the "Umlauts". This should be an internal issue. The outputted
data is utf-8 afaik. But this is critical.
I have tested Umlauts when reading and that works.
I had to add an "encoding convertfrom utf-8 $data" to make it work.

Take care,
Harald

Am 05.12.2024 um 13:06 schrieb TorstenBerg:
> Hi,
>
> thanks for the new version. This is much appreciated and the new options
> on paper size and orientation work nicely.
>
> One issue that I found:
>
> When I have a Tcl script encoded in utf-8 and that script writes the
> xlsx file, then umlauts come out weird. Is there an option that can
> handle this or does ooxml assume or expect text input to be in a
> specific encoding?
>
>
> And an idea:
>
> When formatting cells using theĀ  '-style' option of the 'cell' method,
> it would be cool to be able to specify more than one style (e.g. as a
> list of styleIDs). Then you could have one style for font styling and
> another for borders and then combine those two to get cells with a
> specific font and border. Conflicting elements of two different styles
> of the list could be handled so that a style later in the list would
> overwrite settings for the identical option in a previous style in the
> list.
>
> Regards, Torsten

Subject: Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 released
From: Ralf Fassel
Newsgroups: comp.lang.tcl
Date: Thu, 5 Dec 2024 14:46 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: ralfixx@gmx.de (Ralf Fassel)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 released
Date: Thu, 05 Dec 2024 15:46:57 +0100
Lines: 14
Message-ID: <ygamsha89we.fsf@akutech.de>
References: <vicj0q$10cg3$2@dont-email.me>
<23d440f2cbb17d78d4e5446b910ef11d@www.novabbs.com>
<vis7nh$1idt0$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net Jb3QCpd87DK+MBtn6bWgwQvURY36qHaVj196oyvFYKYrvATkM=
Cancel-Lock: sha1:Q9ccuqJtYn6gOlq1EwNkDcmL5/0= sha1:sc9w9pHhzJ28tT2LKCBeEt4Z7ck= sha256:dyNp1BnBJgWItbJ/mBiMMogyafw66vrJg9z/Eow1E40=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
View all headers

* Harald Oehlmann <wortkarg3@yahoo.com>
| About the "Umlauts". This should be an internal issue. The outputted
| data is utf-8 afaik. But this is critical.
| I have tested Umlauts when reading and that works.
| I had to add an "encoding convertfrom utf-8 $data" to make it work.

Wouldn't that not also depend on how exactly the TCL script is sourced?
I.e. an tcl script containing literal utf-8 data (not the \uxxxx form)
on Windows with the default system encoding (eg cp1252) would require an
explicit -encoding utf8 for the 'source' command to read it properly.
The OP did not specify what OS he was on, and how the tcl script
containing utf-8 data was sourced...

R'

Subject: Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 released
From: Harald Oehlmann
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Thu, 5 Dec 2024 15:16 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: wortkarg3@yahoo.com (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9
released
Date: Thu, 5 Dec 2024 16:16:41 +0100
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <visg4p$1ltsf$1@dont-email.me>
References: <vicj0q$10cg3$2@dont-email.me>
<23d440f2cbb17d78d4e5446b910ef11d@www.novabbs.com>
<vis7nh$1idt0$1@dont-email.me> <ygamsha89we.fsf@akutech.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 05 Dec 2024 16:16:42 +0100 (CET)
Injection-Info: dont-email.me; posting-host="06c3a575ba4389d4db04bb9be5ea5904";
logging-data="1767311"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+pKvbJZqKj3pzMQl9iUvvg"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:zBn0S9KTL9o4W2ZnRfzQMFzMzt8=
Content-Language: en-GB
In-Reply-To: <ygamsha89we.fsf@akutech.de>
View all headers

Am 05.12.2024 um 15:46 schrieb Ralf Fassel:
> * Harald Oehlmann <wortkarg3@yahoo.com>
> | About the "Umlauts". This should be an internal issue. The outputted
> | data is utf-8 afaik. But this is critical.
> | I have tested Umlauts when reading and that works.
> | I had to add an "encoding convertfrom utf-8 $data" to make it work.
>
> Wouldn't that not also depend on how exactly the TCL script is sourced?
> I.e. an tcl script containing literal utf-8 data (not the \uxxxx form)
> on Windows with the default system encoding (eg cp1252) would require an
> explicit -encoding utf8 for the 'source' command to read it properly.
> The OP did not specify what OS he was on, and how the tcl script
> containing utf-8 data was sourced...
>
> R'

Ralf,
my message was mis-leading: I have introduced the converfrom into the
source code for reading Excel (not writing). Eventually, this is missing
or there is another error, I don't know.

Looking a bit in the source code:
proc ooxml::Dom2zip {zf node path cd count} {
upvar $cd mycd
upvar $count mycount
append mycd [::ooxml::add_str_to_archive $zf $path [$node asXML
-indent none -xmlDeclaration 1 -encString "UTF-8"]]
incr mycount
}

Ok, always UTF-8

Later:
proc ::ooxml::add_str_to_archive {zipchan path data {comment {}}} {
....
set utfdata [encoding convertto utf-8 $data]

So, I see no issue in the code. I have no idea, what happens here.

I would write the relevant data to an utf-8 flat file for debug

set h [open debug.txt w]
fconfigure $h -encoding utf-8
puts $h $data
close $h

Thanks,
Harald

Subject: Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 released
From: TorstenBerg
Newsgroups: comp.lang.tcl
Organization: novaBBS
Date: Thu, 5 Dec 2024 21:52 UTC
References: 1 2 3 4 5
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!news.quux.org!news.nk.ca!rocksolid2!i2pn2.org!.POSTED!not-for-mail
From: berg@typoscriptics.de (TorstenBerg)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 released
Date: Thu, 5 Dec 2024 21:52:35 +0000
Organization: novaBBS
Message-ID: <0a76d4aaa305cdbcc9cc441d12347c84@www.novabbs.com>
References: <vicj0q$10cg3$2@dont-email.me> <23d440f2cbb17d78d4e5446b910ef11d@www.novabbs.com> <vis7nh$1idt0$1@dont-email.me> <ygamsha89we.fsf@akutech.de> <visg4p$1ltsf$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="1454039"; mail-complaints-to="usenet@i2pn2.org";
posting-account="xPTk8ic+ltIs4SDkCn9Fp7eV+RMOfXYjsd4WptzKKdI";
User-Agent: Rocksolid Light
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Site: $2y$10$F7t2cBcp6ENr0W/6f942pud66lOM3t8KRY0cJHUl.9nONOKvZTVPO
X-Rslight-Posting-User: a57e9dbaf481589bcf993cc1252a6f6a094c850c
View all headers

Hi,

thanks for your ideas wrt. the encoding. I will investigate further and
see whether I can find the culprit. The phenomenon is found on a Windows
machine running a script being utf-8 with Tcl 8.6. So, maybe this
combination is already bad (it probably is) since Windows will expect
the Tcl file tobe in cp1252 or so ...

Subject: Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 released
From: Harald Oehlmann
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Fri, 6 Dec 2024 07:31 UTC
References: 1 2 3 4 5 6
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: wortkarg3@yahoo.com (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9
released
Date: Fri, 6 Dec 2024 08:31:01 +0100
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <viu97l$26vb1$1@dont-email.me>
References: <vicj0q$10cg3$2@dont-email.me>
<23d440f2cbb17d78d4e5446b910ef11d@www.novabbs.com>
<vis7nh$1idt0$1@dont-email.me> <ygamsha89we.fsf@akutech.de>
<visg4p$1ltsf$1@dont-email.me>
<0a76d4aaa305cdbcc9cc441d12347c84@www.novabbs.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 06 Dec 2024 08:31:02 +0100 (CET)
Injection-Info: dont-email.me; posting-host="c2499876a6e605d2c54b97c97dfe8e81";
logging-data="2325857"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/HNH13oZbXaxRIlzRDcKBI"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:BMkqC+qxoA9RK6bxzpJCKIiOsak=
Content-Language: en-GB
In-Reply-To: <0a76d4aaa305cdbcc9cc441d12347c84@www.novabbs.com>
View all headers

Am 05.12.2024 um 22:52 schrieb TorstenBerg:
> Hi,
>
> thanks for your ideas wrt. the encoding. I will investigate further and
> see whether I can find the culprit. The phenomenon is found on a Windows
> machine running a script being utf-8 with Tcl 8.6. So, maybe this
> combination is already bad (it probably is) since Windows will expect
> the Tcl file tobe in cp1252 or so ...

All my pckingdex files have this:

source -encoding utf-8 $file

Subject: Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 released
From: Ralf Fassel
Newsgroups: comp.lang.tcl
Date: Fri, 6 Dec 2024 10:01 UTC
References: 1 2 3 4 5 6
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: ralfixx@gmx.de (Ralf Fassel)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: Excel file format reader/writer package OOXML 1.9 released
Date: Fri, 06 Dec 2024 11:01:01 +0100
Lines: 26
Message-ID: <ygaikrx871e.fsf@akutech.de>
References: <vicj0q$10cg3$2@dont-email.me>
<23d440f2cbb17d78d4e5446b910ef11d@www.novabbs.com>
<vis7nh$1idt0$1@dont-email.me> <ygamsha89we.fsf@akutech.de>
<visg4p$1ltsf$1@dont-email.me>
<0a76d4aaa305cdbcc9cc441d12347c84@www.novabbs.com>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net ayxUSIR0G6fXQNYUZ8NQoAEm8xt7ICcP8cEpciXLLxFbb5Neg=
Cancel-Lock: sha1:o4l0fD/v4n+U+ySdsuSH/wyKizs= sha1:V5RV/bwURzTqXoiR/eksOetQX9Q= sha256:X/WB7o7zlALJBwag01lujY8zsAZh6olm2w48sk7OP+g=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
View all headers

* berg@typoscriptics.de (TorstenBerg)
| thanks for your ideas wrt. the encoding. I will investigate further and
| see whether I can find the culprit. The phenomenon is found on a Windows
| machine running a script being utf-8 with Tcl 8.6. So, maybe this
| combination is already bad (it probably is) since Windows will expect
| the Tcl file tobe in cp1252 or so ...

Definitely:

https://www.tcl.tk/man/tcl/TclCmd/source.htm

SYNOPSIS
source fileName
source -encoding encodingName fileName

[...]
The -encoding option is used to specify the encoding of the data stored
in fileName. When the -encoding option is omitted, the system encoding
is assumed.

See also Harald's response (always specify the encoding with 'source'
when the file is not ASCII). You could use the \u-Notation if there are
only a few Unicode characters in the file (with many, the file becomes
unreadable IMHO).

R'

1

rocksolid light 0.9.8
clearnet tor