From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A7E28158041 for ; Thu, 21 Mar 2024 22:02:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C794DE29E1; Thu, 21 Mar 2024 22:02:29 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 185B5E29B1 for ; Thu, 21 Mar 2024 22:02:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1711058542; x=1711663342; i=warp_7@gmx.de; bh=te7oK5fBul3QKOpC9tkWK7kcK55mqtzTKdW+cipeuwY=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=fBbHbbG1t0XTtfouTkGdFPqw/OzEvv6D12AJBf+OJTqx+hkkRheFUfRNJf/3L7Wl rjoR9p9U6gocMSJZKRatRoJhHzDW8ZvUrB93TQiV7zpwDDNZpxGcwcjJdTgDPZOz7 AbAIAM1jliDavrmXV/TVjZScL5bUTeREPrhc7FZfxupsMuVkgRt6Hqw8YeLUtyjp2 vabIXDZhevcy4aq5nPe40WqJ5rzP4JGnBTyiAIV4jtS7HEzwcTRuvyq5mSDj9KREE pYT2/C0sd0CtSJqa8Ca6FYgymBmCICFL2GhW8WnskbSh21dBLRIqXaxqBZwE9SRoS 3b659eHIUcXM6M6ZJQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from tp ([87.122.76.23]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MTAFb-1rKZaj2gil-00Uegd for ; Thu, 21 Mar 2024 23:02:22 +0100 Date: Thu, 21 Mar 2024 23:02:21 +0100 From: Frank Steinmetzger To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] How do I zap a specific area of a gnumeric spreadsheet page? Message-ID: Mail-Followup-To: gentoo-user@lists.gentoo.org References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5GYvbAYS6WPigFXg" Content-Disposition: inline In-Reply-To: User-Agent: Mutt 2.2.12; VIM - Vi IMproved 9.1 X-Provags-ID: V03:K1:otek6Fk7MtdbJf6i2+NEVarrWoMU9cESGUXF0QZLmDgYQUAzU/g FCMx5HnMN7d4hGu5Bc3qwT4lVjBtsWuqw0cWkg+wThQB2ZQPBWUiGE4Z2bNIwHHLw7R6LCq yUzToXa7gBzRecjFIXtH3cZTBLjq7gUapkR5iDmGwDzbb5ByBAWsx/RRenTC+w+2SIIWGgz vohHxaoEbDM9VvV0XxTlQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:m4yg0PotRFk=;UeIZfHHnR3QeFoUTew0xxnu4xwh OnrL3r4w8r3izKp9Mg72Ocz80PQpkCf1PxwIaMj/Rm1XD8d2gD9ogQc+abwLCo36pHHrAd+IN BWoWvVOZdCbyDuHelvHCkw7orkrFc2tWZhOEkJmIeIK5g9mQfLf+DhGT8PGIrsB13W0hLbUKY 9rRdeXKF+p5d2lSS0fY4+pdGanYrc02K16yet5tilp205l3urhyJO/sVxpnPrYv2QN9GlBAKK OaGxOyWqXXoFJAojlKnblmiU4oY3eLvBnXa2y+XRXHiSoK1Z3quPSoG3UNKIlXnSBpF/duF9n SFsW4G/mCkXvXFXHJA3zxv62dejMjFF09T5kyP5rsbZYkk8jDpAmBiXU/YKvHD4RnMS8J+lp9 qRP9eisihF4eM5V8bDanpNSaIex1HH58sjCVWUsCJF4YlpuH+eBVjyafBZWNLj3vteOVzxiyu Imy/YeMWoh90a9/ytYzRMSXul18a0ThrCkDyC3GWJH62VvmxjVkaipqcLuXFUvRm4W/nY1ije CVD3TJ1tSuD6ZMQHw28fNoSBDujspq/5gWXnKtYT030JGI+uj6VLhquDxWTOQgjTtFeKeGtXA WZ1Yco7z32h+wLWS8/Unm+2+mAHXHUCO1dDmR2PEHWVhvS18x7NBbJ/ZG9Svs+Law9GzfdrcE BBtg3occOEzcwhZqmQEPk5WEK0NLyyN8BcpgI0VV/NeTrCuAg10E8MWlwZ9TYKIPejM579YyB NLlxogtjgApA4YLUd+Th+aXmgG3HCQo4jQDiPtApef+u/B0176B3lfQwBVw3UJRLvia9Nbubv DomJGEW+JpewvHkS8ET+QqAbcwKy5MnB3XDr65XKAS6TU= X-Archives-Salt: a15c90b6-3364-488a-8b21-6dc1e3586eee X-Archives-Hash: db922954d4e28b6655e15c7b2915c3d9 --5GYvbAYS6WPigFXg Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am Thu, Mar 21, 2024 at 05:46:31PM -0400 schrieb Walter Dnes: > The province of Ontario does weekly Covid data updates which I > summarize and post on the DSLReports Canchat subforum, e.g. > https://www.dslreports.com/forum/r33854514-#google_vignette Note the > data gap in the pink and brown lines on the 3rd and 4th graphs. That's > actual missing data. In the underlying spreadsheet page those gaps > initially show up as zeros. I manually blank out region B1258:C1299 > (i.e. 2023/09/09 to 2023/10/20) every week when I update so that it > doesn't show up as zero hospitalizations. How do I set up and execute a > macro to to zap the contents of region B1258:C1299 on a page? Why not make the alteration one step before -- in the CSV? There are CSV abstraction tools like `q`, which gives you a SQL-like=20 interface to a csv file. Or you could write a quick transformer in python,= =20 if you know the language a bit. Pseudo code, as I haven=E2=80=99t worked with csv in Python in a looong tim= e: import csv with csv.open("input file", 'r') as A: with csv.open("output file", 'w') as B: for rownum, row in enumerate(A): if rownum >=3D 1258 or rownum <=3D 1299: # write a modified row which has columns B and C blanked B.write( [row[0] + ['', ''] + row[3:] ) else: B.write(row) > Note that I have to first remove the previous week's file, because wget > won't overwrite it, and skips the download altogether. Maybe remove the -r from rm, just to peace of mind. Also, such minimalist= =20 scripts that don=E2=80=99t use bash features can be sh scripts instead. Thi= s=20 increases performance, as sh loads faster than bash. ;-) --=20 Gr=C3=BC=C3=9Fe | Greetings | Salut | Qapla=E2=80=99 Please do not share anything from, with or about me on any social network. It is not enough to have no opinion, you must also be unable to express it. --5GYvbAYS6WPigFXg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEVbE9o2D2lE5fhoVsizG+tUDUMMoFAmX8rmoACgkQizG+tUDU MMoY9hAAvhX7XfF/Lf4YtD9BKBybDudWtV/PfstUmeqNj7D/A0EX8PY7ZXuPXcTI mBXRo24hstLNa5gMl0KeEcZwp7TtoyTocNUIRAyNzy/N23DnEfKx1JC+Bs+zZUYD PCdjAqytSyX8NL1tuACHy/9W0gGT2UIaQmMvrhsW3WFWGofCwNjdyrHUUqvwo3Hf 9O1TBqvzv+Y2mothyaXD+Eb4f5FScuYq53BONxUfU8sKKTVFF0Ud00sXK0wY5Q/K GHYC6UeW4CwrbLrAjvlQZGbdsCgjGc/Zz15GCrwaBxxc1I2Vf5bh5+KZYDrBHMgj lrZ3Al9hrkFuH0Q0CrO2DPfDLgDsDTakMTaL6Os/enxxlSvWS6WLSCbJD9pirucM 3Ir7NYfa3e7OZwomLz8Pq2Lqh+ZdZX/8FyeVETsB9qf52ASgMII3LHGV9Bqx8F6H +N4zkFS0T/KG0N1NDajtWssSMTO4FUjaw/0BRLAsy0viyHZQx49pacdnEfAB+5Sr RDhI/ryZEyPOsPFC2CJQ/KzvjWDHop6dRJrBpHGRBf85XCsZUv9I8rhwBY73qNgI +ky+CncX1jNabObFlvGCtZhzmkJIoV1n2os2nzpB6UFegaSIJH3LJ6Abcv8TvQAY tbifcoPwPGySJCa5VSLxvd/gTDs2D/aAiUOls8G4UfUOJjvAsP4= =mxVV -----END PGP SIGNATURE----- --5GYvbAYS6WPigFXg--