xlwings 0.30.12__tar.gz → 0.30.13__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xlwings-0.30.12 → xlwings-0.30.13}/Cargo.lock +20 -31
- {xlwings-0.30.12 → xlwings-0.30.13}/Cargo.toml +5 -5
- {xlwings-0.30.12 → xlwings-0.30.13}/PKG-INFO +3 -7
- {xlwings-0.30.12 → xlwings-0.30.13}/README.rst +1 -6
- {xlwings-0.30.12 → xlwings-0.30.13}/setup.py +1 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/src/lib.rs +8 -1
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/__init__.py +1 -1
- xlwings-0.30.13/xlwings/addin/xlwings.xlam +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/cli.py +5 -61
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/js/xlwings.js +1 -1
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/js/xlwings.ts +1 -1
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/main.py +1 -1
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/pro/__init__.py +0 -1
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/pro/embedded_code.py +1 -7
- xlwings-0.30.13/xlwings/quickstart_addin.xlam +0 -0
- xlwings-0.30.13/xlwings/quickstart_addin_ribbon.xlam +0 -0
- xlwings-0.30.13/xlwings/quickstart_standalone.xlsm +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/udfs.py +1 -24
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/xlwings.bas +15 -20
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/xlwings_custom_addin.bas +15 -20
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings.egg-info/PKG-INFO +3 -7
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings.egg-info/SOURCES.txt +3 -4
- xlwings-0.30.12/xlwings32-0.30.12.dll → xlwings-0.30.13/xlwings32-0.30.13.dll +0 -0
- xlwings-0.30.12/xlwings64-0.30.12.dll → xlwings-0.30.13/xlwings64-0.30.13.dll +0 -0
- xlwings-0.30.12/xlwings/addin/xlwings.xlam +0 -0
- xlwings-0.30.12/xlwings/pro/module_permissions.py +0 -114
- xlwings-0.30.12/xlwings/quickstart_addin.xlam +0 -0
- xlwings-0.30.12/xlwings/quickstart_addin_ribbon.xlam +0 -0
- xlwings-0.30.12/xlwings/quickstart_standalone.xlsm +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/LICENSE.txt +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/LICENSE_PRO.txt +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/MANIFEST.in +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/setup.cfg +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/tests/test_active.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/tests/test_app.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/tests/test_book.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/tests/test_characters.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/tests/test_chunking.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/tests/test_conversion.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/tests/test_e2e.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/tests/test_fileformats.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/tests/test_font.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/tests/test_markdown.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/tests/test_names.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/tests/test_range.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/tests/test_shape.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/tests/test_sheet.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/tests/test_table.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/_win32patch.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/_xlmac.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/_xlwindows.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/addin/Dictionary.cls +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/addin/IWebAuthenticator.cls +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/addin/WebClient.cls +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/addin/WebHelpers.bas +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/addin/WebRequest.cls +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/addin/WebResponse.cls +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/base_classes.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/com_server.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/constants.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/conversion/__init__.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/conversion/framework.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/conversion/numpy_conv.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/conversion/pandas_conv.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/conversion/standard.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/expansion.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/ext/__init__.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/ext/sql.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/html/xlwings-alert.html +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mac_dict.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mistune/__init__.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mistune/block_parser.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mistune/directives/__init__.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mistune/directives/admonition.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mistune/directives/base.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mistune/directives/include.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mistune/directives/toc.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mistune/inline_parser.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mistune/markdown.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mistune/plugins/__init__.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mistune/plugins/abbr.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mistune/plugins/def_list.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mistune/plugins/extra.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mistune/plugins/footnotes.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mistune/plugins/table.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mistune/plugins/task_lists.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mistune/renderers.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mistune/scanner.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/mistune/util.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/pro/_xlcalamine.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/pro/_xlofficejs.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/pro/_xlremote.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/pro/reports/__init__.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/pro/reports/filters.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/pro/reports/image.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/pro/reports/main.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/pro/reports/markdown.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/pro/reports/pdf.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/pro/udfs_officejs.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/pro/utils.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/quickstart.xlsm +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/quickstart_fastapi/main.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/quickstart_fastapi/requirements.txt +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/reports.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/rest/__init__.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/rest/api.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/rest/serializers.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/server.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings/utils.py +0 -0
- /xlwings-0.30.12/xlwings/xlwings-0.30.12.applescript → /xlwings-0.30.13/xlwings/xlwings-0.30.13.applescript +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings.egg-info/dependency_links.txt +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings.egg-info/entry_points.txt +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings.egg-info/not-zip-safe +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings.egg-info/requires.txt +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwings.egg-info/top_level.txt +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwingsjs/__init__.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwingsjs/build.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwingsjs/check_version.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwingsjs/custom_functions.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwingsjs/devserver.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwingsjs/tests/__init__.py +0 -0
- {xlwings-0.30.12 → xlwings-0.30.13}/xlwingsjs/tests/udf_tests_officejs.py +0 -0
|
@@ -28,8 +28,8 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
|
|
|
28
28
|
|
|
29
29
|
[[package]]
|
|
30
30
|
name = "calamine"
|
|
31
|
-
version = "0.
|
|
32
|
-
source = "git+https://github.com/xlwings/calamine?rev=
|
|
31
|
+
version = "0.22.0"
|
|
32
|
+
source = "git+https://github.com/xlwings/calamine?rev=ed0a4bde9ae0d0abaeeaed26b0fbd5b20cce91b8#ed0a4bde9ae0d0abaeeaed26b0fbd5b20cce91b8"
|
|
33
33
|
dependencies = [
|
|
34
34
|
"byteorder",
|
|
35
35
|
"chrono",
|
|
@@ -50,11 +50,10 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|
|
50
50
|
|
|
51
51
|
[[package]]
|
|
52
52
|
name = "chrono"
|
|
53
|
-
version = "0.4.
|
|
53
|
+
version = "0.4.31"
|
|
54
54
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
55
|
-
checksum = "
|
|
55
|
+
checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38"
|
|
56
56
|
dependencies = [
|
|
57
|
-
"num-integer",
|
|
58
57
|
"num-traits",
|
|
59
58
|
"serde",
|
|
60
59
|
]
|
|
@@ -144,9 +143,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
|
|
|
144
143
|
|
|
145
144
|
[[package]]
|
|
146
145
|
name = "memoffset"
|
|
147
|
-
version = "0.
|
|
146
|
+
version = "0.9.0"
|
|
148
147
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
149
|
-
checksum = "
|
|
148
|
+
checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
|
|
150
149
|
dependencies = [
|
|
151
150
|
"autocfg",
|
|
152
151
|
]
|
|
@@ -160,16 +159,6 @@ dependencies = [
|
|
|
160
159
|
"adler",
|
|
161
160
|
]
|
|
162
161
|
|
|
163
|
-
[[package]]
|
|
164
|
-
name = "num-integer"
|
|
165
|
-
version = "0.1.45"
|
|
166
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
167
|
-
checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
|
|
168
|
-
dependencies = [
|
|
169
|
-
"autocfg",
|
|
170
|
-
"num-traits",
|
|
171
|
-
]
|
|
172
|
-
|
|
173
162
|
[[package]]
|
|
174
163
|
name = "num-traits"
|
|
175
164
|
version = "0.2.15"
|
|
@@ -181,9 +170,9 @@ dependencies = [
|
|
|
181
170
|
|
|
182
171
|
[[package]]
|
|
183
172
|
name = "once_cell"
|
|
184
|
-
version = "1.
|
|
173
|
+
version = "1.18.0"
|
|
185
174
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
186
|
-
checksum = "
|
|
175
|
+
checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
|
|
187
176
|
|
|
188
177
|
[[package]]
|
|
189
178
|
name = "parking_lot"
|
|
@@ -219,9 +208,9 @@ dependencies = [
|
|
|
219
208
|
|
|
220
209
|
[[package]]
|
|
221
210
|
name = "pyo3"
|
|
222
|
-
version = "0.
|
|
211
|
+
version = "0.19.2"
|
|
223
212
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
224
|
-
checksum = "
|
|
213
|
+
checksum = "e681a6cfdc4adcc93b4d3cf993749a4552018ee0a9b65fc0ccfad74352c72a38"
|
|
225
214
|
dependencies = [
|
|
226
215
|
"cfg-if",
|
|
227
216
|
"chrono",
|
|
@@ -237,9 +226,9 @@ dependencies = [
|
|
|
237
226
|
|
|
238
227
|
[[package]]
|
|
239
228
|
name = "pyo3-build-config"
|
|
240
|
-
version = "0.
|
|
229
|
+
version = "0.19.2"
|
|
241
230
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
242
|
-
checksum = "
|
|
231
|
+
checksum = "076c73d0bc438f7a4ef6fdd0c3bb4732149136abd952b110ac93e4edb13a6ba5"
|
|
243
232
|
dependencies = [
|
|
244
233
|
"once_cell",
|
|
245
234
|
"target-lexicon",
|
|
@@ -247,9 +236,9 @@ dependencies = [
|
|
|
247
236
|
|
|
248
237
|
[[package]]
|
|
249
238
|
name = "pyo3-ffi"
|
|
250
|
-
version = "0.
|
|
239
|
+
version = "0.19.2"
|
|
251
240
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
252
|
-
checksum = "
|
|
241
|
+
checksum = "e53cee42e77ebe256066ba8aa77eff722b3bb91f3419177cf4cd0f304d3284d9"
|
|
253
242
|
dependencies = [
|
|
254
243
|
"libc",
|
|
255
244
|
"pyo3-build-config",
|
|
@@ -257,9 +246,9 @@ dependencies = [
|
|
|
257
246
|
|
|
258
247
|
[[package]]
|
|
259
248
|
name = "pyo3-macros"
|
|
260
|
-
version = "0.
|
|
249
|
+
version = "0.19.2"
|
|
261
250
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
262
|
-
checksum = "
|
|
251
|
+
checksum = "dfeb4c99597e136528c6dd7d5e3de5434d1ceaf487436a3f03b2d56b6fc9efd1"
|
|
263
252
|
dependencies = [
|
|
264
253
|
"proc-macro2",
|
|
265
254
|
"pyo3-macros-backend",
|
|
@@ -269,9 +258,9 @@ dependencies = [
|
|
|
269
258
|
|
|
270
259
|
[[package]]
|
|
271
260
|
name = "pyo3-macros-backend"
|
|
272
|
-
version = "0.
|
|
261
|
+
version = "0.19.2"
|
|
273
262
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
274
|
-
checksum = "
|
|
263
|
+
checksum = "947dc12175c254889edc0c02e399476c2f652b4b9ebd123aa655c224de259536"
|
|
275
264
|
dependencies = [
|
|
276
265
|
"proc-macro2",
|
|
277
266
|
"quote",
|
|
@@ -280,9 +269,9 @@ dependencies = [
|
|
|
280
269
|
|
|
281
270
|
[[package]]
|
|
282
271
|
name = "quick-xml"
|
|
283
|
-
version = "0.
|
|
272
|
+
version = "0.30.0"
|
|
284
273
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
285
|
-
checksum = "
|
|
274
|
+
checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956"
|
|
286
275
|
dependencies = [
|
|
287
276
|
"encoding_rs",
|
|
288
277
|
"memchr",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "xlwings"
|
|
3
|
-
version = "0.30.
|
|
3
|
+
version = "0.30.13"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
publish = false
|
|
6
6
|
|
|
@@ -8,11 +8,11 @@ publish = false
|
|
|
8
8
|
name = "xlwings.xlwingslib"
|
|
9
9
|
|
|
10
10
|
[lib]
|
|
11
|
-
name = "
|
|
11
|
+
name = "xlwings"
|
|
12
12
|
crate-type = ["cdylib"]
|
|
13
13
|
|
|
14
14
|
[dependencies]
|
|
15
|
-
calamine = {git = "https://github.com/xlwings/calamine", rev = "
|
|
16
|
-
chrono = { version = "0.4.
|
|
15
|
+
calamine = {git = "https://github.com/xlwings/calamine", rev = "ed0a4bde9ae0d0abaeeaed26b0fbd5b20cce91b8", features = ["dates"] }
|
|
16
|
+
chrono = { version = "0.4.31", features = ["serde"], default-features = false }
|
|
17
17
|
# abi3 wheels aren't supported as DateTime is not part of the ABI spec (PEP 384)
|
|
18
|
-
pyo3 = { version = "0.
|
|
18
|
+
pyo3 = { version = "0.19.2", features = ["extension-module", "chrono"] }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: xlwings
|
|
3
|
-
Version: 0.30.
|
|
3
|
+
Version: 0.30.13
|
|
4
4
|
Summary: Make Excel fly: Interact with Excel from Python and vice versa.
|
|
5
5
|
Home-page: https://www.xlwings.org
|
|
6
6
|
Author: Zoomer Analytics LLC
|
|
@@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
21
|
Classifier: Topic :: Office/Business :: Financial :: Spreadsheet
|
|
21
22
|
Classifier: License :: OSI Approved :: BSD License
|
|
22
23
|
Requires-Python: >=3.8
|
|
@@ -101,9 +102,4 @@ Links
|
|
|
101
102
|
* Book (O'Reilly, 2021): https://www.xlwings.org/book
|
|
102
103
|
* Video Course: https://training.xlwings.org/p/xlwings
|
|
103
104
|
* Source Code: https://github.com/xlwings/xlwings
|
|
104
|
-
|
|
105
|
-
xltrail
|
|
106
|
-
-------
|
|
107
|
-
|
|
108
|
-
The Excel files are also tracked with `xltrail <https://www.xltrail.com>`_. You can see the diffs
|
|
109
|
-
`here <https://app.xltrail.com/#/?path=github.com%2Fxlwings%2Fxlwings.git&branch=main&public=true>`_.
|
|
105
|
+
* xltrail (Version control for Excel files): https://www.xltrail.com
|
|
@@ -59,9 +59,4 @@ Links
|
|
|
59
59
|
* Book (O'Reilly, 2021): https://www.xlwings.org/book
|
|
60
60
|
* Video Course: https://training.xlwings.org/p/xlwings
|
|
61
61
|
* Source Code: https://github.com/xlwings/xlwings
|
|
62
|
-
|
|
63
|
-
xltrail
|
|
64
|
-
-------
|
|
65
|
-
|
|
66
|
-
The Excel files are also tracked with `xltrail <https://www.xltrail.com>`_. You can see the diffs
|
|
67
|
-
`here <https://app.xltrail.com/#/?path=github.com%2Fxlwings%2Fxlwings.git&branch=main&public=true>`_.
|
|
62
|
+
* xltrail (Version control for Excel files): https://www.xltrail.com
|
|
@@ -125,6 +125,7 @@ setup(
|
|
|
125
125
|
"Programming Language :: Python :: 3.9",
|
|
126
126
|
"Programming Language :: Python :: 3.10",
|
|
127
127
|
"Programming Language :: Python :: 3.11",
|
|
128
|
+
"Programming Language :: Python :: 3.12",
|
|
128
129
|
"Topic :: Office/Business :: Financial :: Spreadsheet",
|
|
129
130
|
"License :: OSI Approved :: BSD License",
|
|
130
131
|
],
|
|
@@ -26,7 +26,9 @@ pub enum CellValue {
|
|
|
26
26
|
Int(i64),
|
|
27
27
|
Float(f64),
|
|
28
28
|
String(String),
|
|
29
|
+
Time(chrono::NaiveTime),
|
|
29
30
|
DateTime(NaiveDateTime),
|
|
31
|
+
Timedelta(chrono::Duration),
|
|
30
32
|
Bool(bool),
|
|
31
33
|
Error(CellErrorType),
|
|
32
34
|
Empty,
|
|
@@ -39,7 +41,9 @@ impl IntoPy<PyObject> for CellValue {
|
|
|
39
41
|
CellValue::Float(v) => v.to_object(py),
|
|
40
42
|
CellValue::String(v) => v.to_object(py),
|
|
41
43
|
CellValue::Bool(v) => v.to_object(py),
|
|
44
|
+
CellValue::Time(v) => v.to_object(py),
|
|
42
45
|
CellValue::DateTime(v) => v.to_object(py),
|
|
46
|
+
CellValue::Timedelta(v) => v.to_object(py),
|
|
43
47
|
CellValue::Empty => py.None(),
|
|
44
48
|
// Errors are already converted to String or Empty
|
|
45
49
|
CellValue::Error(_) => String::from("Error").to_object(py),
|
|
@@ -120,8 +124,11 @@ fn get_values(
|
|
|
120
124
|
DataType::DateTimeIso(_v) => {
|
|
121
125
|
result_row.push(CellValue::DateTime(value.as_datetime().unwrap()))
|
|
122
126
|
}
|
|
127
|
+
DataType::Duration(_v) => {
|
|
128
|
+
result_row.push(CellValue::Timedelta(value.as_duration().unwrap()))
|
|
129
|
+
}
|
|
123
130
|
DataType::DurationIso(_v) => {
|
|
124
|
-
result_row.push(CellValue::
|
|
131
|
+
result_row.push(CellValue::Time(value.as_time().unwrap()))
|
|
125
132
|
}
|
|
126
133
|
};
|
|
127
134
|
}
|
|
Binary file
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import argparse
|
|
2
|
-
import hashlib
|
|
3
2
|
import json
|
|
4
3
|
import os
|
|
5
4
|
import shutil
|
|
6
|
-
import socket
|
|
7
5
|
import subprocess
|
|
8
6
|
import sys
|
|
9
|
-
import tempfile
|
|
10
7
|
import time
|
|
11
8
|
import uuid
|
|
12
9
|
from keyword import iskeyword
|
|
@@ -511,41 +508,6 @@ def code_embed(args):
|
|
|
511
508
|
}
|
|
512
509
|
|
|
513
510
|
|
|
514
|
-
def print_permission_json(scope):
|
|
515
|
-
from .pro import dump_embedded_code
|
|
516
|
-
|
|
517
|
-
assert scope in ["cwd", "book"]
|
|
518
|
-
if scope == "cwd":
|
|
519
|
-
source_files = Path(".").glob("*.py")
|
|
520
|
-
else:
|
|
521
|
-
tempdir = tempfile.TemporaryDirectory(prefix="xlwings-")
|
|
522
|
-
source_files = Path(tempdir.name).glob("*.py")
|
|
523
|
-
dump_embedded_code(xw.books.active, tempdir.name)
|
|
524
|
-
|
|
525
|
-
payload = {"modules": []}
|
|
526
|
-
for source_file in source_files:
|
|
527
|
-
with open(source_file, "rb") as f:
|
|
528
|
-
content = f.read()
|
|
529
|
-
payload["modules"].append(
|
|
530
|
-
{
|
|
531
|
-
"file_name": source_file.name,
|
|
532
|
-
"sha256": hashlib.sha256(content).hexdigest(),
|
|
533
|
-
"machine_names": [socket.gethostname()],
|
|
534
|
-
}
|
|
535
|
-
)
|
|
536
|
-
print(json.dumps(payload, indent=2))
|
|
537
|
-
if scope == "book":
|
|
538
|
-
tempdir.cleanup()
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
def permission_cwd(args):
|
|
542
|
-
print_permission_json("cwd")
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
def permission_book(args):
|
|
546
|
-
print_permission_json("book")
|
|
547
|
-
|
|
548
|
-
|
|
549
511
|
def copy_os(args):
|
|
550
512
|
copy_code(Path(this_dir) / "js" / "xlwings.ts")
|
|
551
513
|
|
|
@@ -576,7 +538,7 @@ def copy_code(fpath):
|
|
|
576
538
|
'Please install either "pandas" or "pyperclip" to use the copy command.'
|
|
577
539
|
)
|
|
578
540
|
|
|
579
|
-
with open(fpath, "r") as f:
|
|
541
|
+
with open(fpath, "r", encoding="utf-8") as f:
|
|
580
542
|
if "bas" in str(fpath):
|
|
581
543
|
text = (
|
|
582
544
|
f.read()
|
|
@@ -791,9 +753,9 @@ def export_vba_modules(book, overwrite=False):
|
|
|
791
753
|
if vb_component.Type == 100:
|
|
792
754
|
# Remove the meta info so it can be distinguished from regular
|
|
793
755
|
# classes when running "xlwings vba import"
|
|
794
|
-
with open(file_path, "r") as f:
|
|
756
|
+
with open(file_path, "r", encoding="utf-8") as f:
|
|
795
757
|
exported_code = f.readlines()
|
|
796
|
-
with open(file_path, "w") as f:
|
|
758
|
+
with open(file_path, "w", encoding="utf-8") as f:
|
|
797
759
|
f.writelines(exported_code[9:])
|
|
798
760
|
return path_to_type
|
|
799
761
|
|
|
@@ -845,7 +807,7 @@ def vba_import(args):
|
|
|
845
807
|
pass
|
|
846
808
|
book.api.VBProject.VBComponents.Import(path)
|
|
847
809
|
elif path.suffix in (".cls", ".frm"):
|
|
848
|
-
with open(path, "r") as f:
|
|
810
|
+
with open(path, "r", encoding="utf-8") as f:
|
|
849
811
|
vba_code = f.readlines()
|
|
850
812
|
if vba_code:
|
|
851
813
|
if vba_code[0].startswith("VERSION "):
|
|
@@ -902,7 +864,7 @@ def vba_edit(args):
|
|
|
902
864
|
module_type = path_to_type[path]
|
|
903
865
|
vb_component = book.api.VBProject.VBComponents(module_name)
|
|
904
866
|
if change_type == Change.modified:
|
|
905
|
-
with open(path, "r") as f:
|
|
867
|
+
with open(path, "r", encoding="utf-8") as f:
|
|
906
868
|
vba_code = f.readlines()
|
|
907
869
|
line_count = vb_component.CodeModule.CountOfLines
|
|
908
870
|
if line_count > 0:
|
|
@@ -1186,24 +1148,6 @@ def main():
|
|
|
1186
1148
|
)
|
|
1187
1149
|
code_create_parser.set_defaults(func=code_embed)
|
|
1188
1150
|
|
|
1189
|
-
# Permission
|
|
1190
|
-
permission_parser = subparsers.add_parser(
|
|
1191
|
-
"permission",
|
|
1192
|
-
help='"xlwings permission cwd" prints a JSON string that can'
|
|
1193
|
-
" be used to permission the execution of all modules in"
|
|
1194
|
-
" the current working directory via GET request. "
|
|
1195
|
-
'"xlwings permission book" does the same for code '
|
|
1196
|
-
"that is embedded in the active workbook.",
|
|
1197
|
-
)
|
|
1198
|
-
permission_subparsers = permission_parser.add_subparsers(dest="subcommand")
|
|
1199
|
-
permission_subparsers.required = True
|
|
1200
|
-
|
|
1201
|
-
permission_cwd_parser = permission_subparsers.add_parser("cwd")
|
|
1202
|
-
permission_cwd_parser.set_defaults(func=permission_cwd)
|
|
1203
|
-
|
|
1204
|
-
permission_book_parser = permission_subparsers.add_parser("book")
|
|
1205
|
-
permission_book_parser.set_defaults(func=permission_book)
|
|
1206
|
-
|
|
1207
1151
|
# Release
|
|
1208
1152
|
release_parser = subparsers.add_parser(
|
|
1209
1153
|
"release",
|
|
@@ -41,7 +41,7 @@ function runPython(
|
|
|
41
41
|
url,
|
|
42
42
|
{ auth = "", apiKey = "", include = "", exclude = "", headers = {} } = {}
|
|
43
43
|
) {
|
|
44
|
-
const version = "0.30.
|
|
44
|
+
const version = "0.30.13";
|
|
45
45
|
const workbook = SpreadsheetApp.getActive();
|
|
46
46
|
const sheets = workbook.getSheets();
|
|
47
47
|
|
|
@@ -45,7 +45,7 @@ async function runPython(
|
|
|
45
45
|
headers = {},
|
|
46
46
|
}: Options = {}
|
|
47
47
|
): Promise<void> {
|
|
48
|
-
const version = "0.30.
|
|
48
|
+
const version = "0.30.13";
|
|
49
49
|
const sheets = workbook.getWorksheets();
|
|
50
50
|
// Config
|
|
51
51
|
let configSheet = workbook.getWorksheet("xlwings.conf");
|
|
@@ -3052,7 +3052,7 @@ class RangeColumns(Ranges):
|
|
|
3052
3052
|
|
|
3053
3053
|
def __getitem__(self, key):
|
|
3054
3054
|
if isinstance(key, slice):
|
|
3055
|
-
return
|
|
3055
|
+
return RangeColumns(rng=self.rng[:, key])
|
|
3056
3056
|
elif isinstance(key, int):
|
|
3057
3057
|
return self.rng[:, key]
|
|
3058
3058
|
else:
|
|
@@ -12,7 +12,6 @@ Commercial licenses can be purchased at https://www.xlwings.org
|
|
|
12
12
|
"""
|
|
13
13
|
|
|
14
14
|
from .embedded_code import dump_embedded_code, runpython_embedded_code
|
|
15
|
-
from .module_permissions import verify_execute_permission
|
|
16
15
|
from .reports import Markdown, MarkdownStyle
|
|
17
16
|
from .udfs_officejs import (
|
|
18
17
|
custom_functions_call,
|
|
@@ -18,8 +18,7 @@ from functools import lru_cache
|
|
|
18
18
|
from pathlib import Path
|
|
19
19
|
|
|
20
20
|
from ..main import Book
|
|
21
|
-
from ..utils import
|
|
22
|
-
from .module_permissions import verify_execute_permission
|
|
21
|
+
from ..utils import read_config_sheet
|
|
23
22
|
from .utils import LicenseHandler, get_embedded_code_temp_dir
|
|
24
23
|
|
|
25
24
|
LicenseHandler.validate_license("pro")
|
|
@@ -60,9 +59,4 @@ def dump_embedded_code(book, target_dir):
|
|
|
60
59
|
|
|
61
60
|
def runpython_embedded_code(command):
|
|
62
61
|
dump_embedded_code(Book.caller(), TEMPDIR)
|
|
63
|
-
if (
|
|
64
|
-
get_cached_user_config("permission_check_enabled")
|
|
65
|
-
and get_cached_user_config("permission_check_enabled").lower() == "true"
|
|
66
|
-
):
|
|
67
|
-
verify_execute_permission(command=command)
|
|
68
62
|
exec(command)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -8,7 +8,6 @@ import logging
|
|
|
8
8
|
import os
|
|
9
9
|
import os.path
|
|
10
10
|
import re
|
|
11
|
-
import sys
|
|
12
11
|
import tempfile
|
|
13
12
|
import threading
|
|
14
13
|
from importlib import (
|
|
@@ -24,10 +23,9 @@ from win32com.client import Dispatch
|
|
|
24
23
|
import xlwings
|
|
25
24
|
|
|
26
25
|
from . import Book, LicenseError, Range, __pro__, apps, conversion
|
|
27
|
-
from .utils import VBAWriter, exception,
|
|
26
|
+
from .utils import VBAWriter, exception, read_config_sheet
|
|
28
27
|
|
|
29
28
|
if __pro__:
|
|
30
|
-
from .pro import verify_execute_permission
|
|
31
29
|
from .pro.embedded_code import TEMPDIR, dump_embedded_code
|
|
32
30
|
|
|
33
31
|
logger = logging.getLogger(__name__)
|
|
@@ -359,11 +357,6 @@ async def delayed_resize_dynamic_array_formula(target_range, caller):
|
|
|
359
357
|
exception(logger, "couldn't resize")
|
|
360
358
|
|
|
361
359
|
|
|
362
|
-
# Setup temp dir for embedded code
|
|
363
|
-
if __pro__:
|
|
364
|
-
sys.path[0:0] = [TEMPDIR] # required for permissioning
|
|
365
|
-
|
|
366
|
-
|
|
367
360
|
def get_udf_module(module_name, xl_workbook):
|
|
368
361
|
module_info = udf_modules.get(module_name, None)
|
|
369
362
|
if module_info is not None:
|
|
@@ -385,15 +378,6 @@ def get_udf_module(module_name, xl_workbook):
|
|
|
385
378
|
elif __pro__:
|
|
386
379
|
dump_embedded_code(wb, TEMPDIR)
|
|
387
380
|
|
|
388
|
-
# Permission check
|
|
389
|
-
if (
|
|
390
|
-
get_cached_user_config("permission_check_enabled")
|
|
391
|
-
and get_cached_user_config("permission_check_enabled").lower()
|
|
392
|
-
) == "true":
|
|
393
|
-
if not __pro__:
|
|
394
|
-
raise LicenseError("Permission checks require xlwings PRO.")
|
|
395
|
-
verify_execute_permission(module_names=(module_name,))
|
|
396
|
-
|
|
397
381
|
module = import_module(module_name)
|
|
398
382
|
filename = os.path.normcase(module.__file__.lower())
|
|
399
383
|
|
|
@@ -428,13 +412,6 @@ def call_udf(module_name, func_name, args, this_workbook=None, caller=None):
|
|
|
428
412
|
"""
|
|
429
413
|
This method executes the UDF synchronously from the COM server thread
|
|
430
414
|
"""
|
|
431
|
-
if (
|
|
432
|
-
get_cached_user_config("permission_check_enabled")
|
|
433
|
-
and get_cached_user_config("permission_check_enabled").lower() == "true"
|
|
434
|
-
):
|
|
435
|
-
if not __pro__:
|
|
436
|
-
raise LicenseError("Permission checks require xlwings PRO.")
|
|
437
|
-
verify_execute_permission(module_names=(module_name,))
|
|
438
415
|
module = get_udf_module(module_name, this_workbook)
|
|
439
416
|
func = getattr(module, func_name)
|
|
440
417
|
func_info = func.__xlfunc__
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Attribute VB_Name = "xlwings"
|
|
2
2
|
#Const App = "Microsoft Excel" 'Adjust when using outside of Excel
|
|
3
|
-
'Version: 0.30.
|
|
3
|
+
'Version: 0.30.13
|
|
4
4
|
|
|
5
5
|
'xlwings is distributed under a BSD 3-clause license.
|
|
6
6
|
'
|
|
@@ -41,29 +41,29 @@ Attribute VB_Name = "xlwings"
|
|
|
41
41
|
Private Declare PtrSafe Function system Lib "libc.dylib" (ByVal Command As String) As Long
|
|
42
42
|
#End If
|
|
43
43
|
#If Win64 Then
|
|
44
|
-
Const XLPyDLLName As String = "xlwings64-0.30.
|
|
45
|
-
Declare PtrSafe Function XLPyDLLActivateAuto Lib "xlwings64-0.30.
|
|
46
|
-
Declare PtrSafe Function XLPyDLLNDims Lib "xlwings64-0.30.
|
|
47
|
-
Declare PtrSafe Function XLPyDLLVersion Lib "xlwings64-0.30.
|
|
44
|
+
Const XLPyDLLName As String = "xlwings64-0.30.13.dll"
|
|
45
|
+
Declare PtrSafe Function XLPyDLLActivateAuto Lib "xlwings64-0.30.13.dll" (ByRef Result As Variant, Optional ByVal Config As String = "", Optional ByVal mode As Long = 1) As Long
|
|
46
|
+
Declare PtrSafe Function XLPyDLLNDims Lib "xlwings64-0.30.13.dll" (ByRef src As Variant, ByRef dims As Long, ByRef transpose As Boolean, ByRef dest As Variant) As Long
|
|
47
|
+
Declare PtrSafe Function XLPyDLLVersion Lib "xlwings64-0.30.13.dll" (tag As String, VERSION As Double, arch As String) As Long
|
|
48
48
|
#Else
|
|
49
|
-
Private Const XLPyDLLName As String = "xlwings32-0.30.
|
|
50
|
-
Declare PtrSafe Function XLPyDLLActivateAuto Lib "xlwings32-0.30.
|
|
51
|
-
Private Declare PtrSafe Function XLPyDLLNDims Lib "xlwings32-0.30.
|
|
52
|
-
Private Declare PtrSafe Function XLPyDLLVersion Lib "xlwings32-0.30.
|
|
49
|
+
Private Const XLPyDLLName As String = "xlwings32-0.30.13.dll"
|
|
50
|
+
Declare PtrSafe Function XLPyDLLActivateAuto Lib "xlwings32-0.30.13.dll" (ByRef Result As Variant, Optional ByVal Config As String = "", Optional ByVal mode As Long = 1) As Long
|
|
51
|
+
Private Declare PtrSafe Function XLPyDLLNDims Lib "xlwings32-0.30.13.dll" (ByRef src As Variant, ByRef dims As Long, ByRef transpose As Boolean, ByRef dest As Variant) As Long
|
|
52
|
+
Private Declare PtrSafe Function XLPyDLLVersion Lib "xlwings32-0.30.13.dll" (tag As String, VERSION As Double, arch As String) As Long
|
|
53
53
|
#End If
|
|
54
54
|
Private Declare PtrSafe Function LoadLibrary Lib "KERNEL32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
|
|
55
55
|
#Else
|
|
56
56
|
#If Mac Then
|
|
57
57
|
Private Declare Function system Lib "libc.dylib" (ByVal Command As String) As Long
|
|
58
58
|
#End If
|
|
59
|
-
Private Const XLPyDLLName As String = "xlwings32-0.30.
|
|
60
|
-
Private Declare Function XLPyDLLActivateAuto Lib "xlwings32-0.30.
|
|
61
|
-
Private Declare Function XLPyDLLNDims Lib "xlwings32-0.30.
|
|
59
|
+
Private Const XLPyDLLName As String = "xlwings32-0.30.13.dll"
|
|
60
|
+
Private Declare Function XLPyDLLActivateAuto Lib "xlwings32-0.30.13.dll" (ByRef Result As Variant, Optional ByVal Config As String = "", Optional ByVal mode As Long = 1) As Long
|
|
61
|
+
Private Declare Function XLPyDLLNDims Lib "xlwings32-0.30.13.dll" (ByRef src As Variant, ByRef dims As Long, ByRef transpose As Boolean, ByRef dest As Variant) As Long
|
|
62
62
|
Private Declare Function LoadLibrary Lib "KERNEL32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
|
|
63
|
-
Declare Function XLPyDLLVersion Lib "xlwings32-0.30.
|
|
63
|
+
Declare Function XLPyDLLVersion Lib "xlwings32-0.30.13.dll" (tag As String, VERSION As Double, arch As String) As Long
|
|
64
64
|
#End If
|
|
65
65
|
|
|
66
|
-
Public Const XLWINGS_VERSION As String = "0.30.
|
|
66
|
+
Public Const XLWINGS_VERSION As String = "0.30.13"
|
|
67
67
|
Public Const PROJECT_NAME As String = "xlwings"
|
|
68
68
|
|
|
69
69
|
Public Function RunPython(PythonCommand As String)
|
|
@@ -143,11 +143,6 @@ Public Function RunPython(PythonCommand As String)
|
|
|
143
143
|
End If
|
|
144
144
|
End If
|
|
145
145
|
|
|
146
|
-
' Handle module execute permission (for embedded code that happens in Python)
|
|
147
|
-
If LCase(GetConfig("PERMISSION_CHECK_ENABLED", , source:="user")) = "true" And uses_embedded_code = False Then
|
|
148
|
-
PythonCommand = "import xlwings.pro;xlwings.pro.verify_execute_permission('" & SourcePythonCommand & "');" & PythonCommand
|
|
149
|
-
End If
|
|
150
|
-
|
|
151
146
|
' Call Python platform-dependent
|
|
152
147
|
#If Mac Then
|
|
153
148
|
Application.StatusBar = "Running..." ' Non-blocking way of giving feedback that something is happening
|
|
@@ -1300,7 +1295,7 @@ Function RunRemotePython( _
|
|
|
1300
1295
|
Optional include As String, _
|
|
1301
1296
|
Optional exclude As String, _
|
|
1302
1297
|
Optional headers As Variant, _
|
|
1303
|
-
Optional timeout As
|
|
1298
|
+
Optional timeout As Long, _
|
|
1304
1299
|
Optional proxyServer As String, _
|
|
1305
1300
|
Optional proxyBypassList As String, _
|
|
1306
1301
|
Optional proxyUsername As String, _
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Attribute VB_Name = "xlwings"
|
|
2
2
|
#Const App = "Microsoft Excel" 'Adjust when using outside of Excel
|
|
3
|
-
'Version: 0.30.
|
|
3
|
+
'Version: 0.30.13
|
|
4
4
|
|
|
5
5
|
'xlwings is distributed under a BSD 3-clause license.
|
|
6
6
|
'
|
|
@@ -41,29 +41,29 @@ Attribute VB_Name = "xlwings"
|
|
|
41
41
|
Private Declare PtrSafe Function system Lib "libc.dylib" (ByVal Command As String) As Long
|
|
42
42
|
#End If
|
|
43
43
|
#If Win64 Then
|
|
44
|
-
Const XLPyDLLName As String = "xlwings64-0.30.
|
|
45
|
-
Declare PtrSafe Function XLPyDLLActivateAuto Lib "xlwings64-0.30.
|
|
46
|
-
Declare PtrSafe Function XLPyDLLNDims Lib "xlwings64-0.30.
|
|
47
|
-
Declare PtrSafe Function XLPyDLLVersion Lib "xlwings64-0.30.
|
|
44
|
+
Const XLPyDLLName As String = "xlwings64-0.30.13.dll"
|
|
45
|
+
Declare PtrSafe Function XLPyDLLActivateAuto Lib "xlwings64-0.30.13.dll" (ByRef Result As Variant, Optional ByVal Config As String = "", Optional ByVal mode As Long = 1) As Long
|
|
46
|
+
Declare PtrSafe Function XLPyDLLNDims Lib "xlwings64-0.30.13.dll" (ByRef src As Variant, ByRef dims As Long, ByRef transpose As Boolean, ByRef dest As Variant) As Long
|
|
47
|
+
Declare PtrSafe Function XLPyDLLVersion Lib "xlwings64-0.30.13.dll" (tag As String, VERSION As Double, arch As String) As Long
|
|
48
48
|
#Else
|
|
49
|
-
Private Const XLPyDLLName As String = "xlwings32-0.30.
|
|
50
|
-
Declare PtrSafe Function XLPyDLLActivateAuto Lib "xlwings32-0.30.
|
|
51
|
-
Private Declare PtrSafe Function XLPyDLLNDims Lib "xlwings32-0.30.
|
|
52
|
-
Private Declare PtrSafe Function XLPyDLLVersion Lib "xlwings32-0.30.
|
|
49
|
+
Private Const XLPyDLLName As String = "xlwings32-0.30.13.dll"
|
|
50
|
+
Declare PtrSafe Function XLPyDLLActivateAuto Lib "xlwings32-0.30.13.dll" (ByRef Result As Variant, Optional ByVal Config As String = "", Optional ByVal mode As Long = 1) As Long
|
|
51
|
+
Private Declare PtrSafe Function XLPyDLLNDims Lib "xlwings32-0.30.13.dll" (ByRef src As Variant, ByRef dims As Long, ByRef transpose As Boolean, ByRef dest As Variant) As Long
|
|
52
|
+
Private Declare PtrSafe Function XLPyDLLVersion Lib "xlwings32-0.30.13.dll" (tag As String, VERSION As Double, arch As String) As Long
|
|
53
53
|
#End If
|
|
54
54
|
Private Declare PtrSafe Function LoadLibrary Lib "KERNEL32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
|
|
55
55
|
#Else
|
|
56
56
|
#If Mac Then
|
|
57
57
|
Private Declare Function system Lib "libc.dylib" (ByVal Command As String) As Long
|
|
58
58
|
#End If
|
|
59
|
-
Private Const XLPyDLLName As String = "xlwings32-0.30.
|
|
60
|
-
Private Declare Function XLPyDLLActivateAuto Lib "xlwings32-0.30.
|
|
61
|
-
Private Declare Function XLPyDLLNDims Lib "xlwings32-0.30.
|
|
59
|
+
Private Const XLPyDLLName As String = "xlwings32-0.30.13.dll"
|
|
60
|
+
Private Declare Function XLPyDLLActivateAuto Lib "xlwings32-0.30.13.dll" (ByRef Result As Variant, Optional ByVal Config As String = "", Optional ByVal mode As Long = 1) As Long
|
|
61
|
+
Private Declare Function XLPyDLLNDims Lib "xlwings32-0.30.13.dll" (ByRef src As Variant, ByRef dims As Long, ByRef transpose As Boolean, ByRef dest As Variant) As Long
|
|
62
62
|
Private Declare Function LoadLibrary Lib "KERNEL32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
|
|
63
|
-
Declare Function XLPyDLLVersion Lib "xlwings32-0.30.
|
|
63
|
+
Declare Function XLPyDLLVersion Lib "xlwings32-0.30.13.dll" (tag As String, VERSION As Double, arch As String) As Long
|
|
64
64
|
#End If
|
|
65
65
|
|
|
66
|
-
Public Const XLWINGS_VERSION As String = "0.30.
|
|
66
|
+
Public Const XLWINGS_VERSION As String = "0.30.13"
|
|
67
67
|
Public Const PROJECT_NAME As String = "myaddin"
|
|
68
68
|
|
|
69
69
|
Public Function RunPython(PythonCommand As String)
|
|
@@ -143,11 +143,6 @@ Public Function RunPython(PythonCommand As String)
|
|
|
143
143
|
End If
|
|
144
144
|
End If
|
|
145
145
|
|
|
146
|
-
' Handle module execute permission (for embedded code that happens in Python)
|
|
147
|
-
If LCase(GetConfig("PERMISSION_CHECK_ENABLED", , source:="user")) = "true" And uses_embedded_code = False Then
|
|
148
|
-
PythonCommand = "import xlwings.pro;xlwings.pro.verify_execute_permission('" & SourcePythonCommand & "');" & PythonCommand
|
|
149
|
-
End If
|
|
150
|
-
|
|
151
146
|
' Call Python platform-dependent
|
|
152
147
|
#If Mac Then
|
|
153
148
|
Application.StatusBar = "Running..." ' Non-blocking way of giving feedback that something is happening
|
|
@@ -1281,7 +1276,7 @@ Function RunRemotePython( _
|
|
|
1281
1276
|
Optional include As String, _
|
|
1282
1277
|
Optional exclude As String, _
|
|
1283
1278
|
Optional headers As Variant, _
|
|
1284
|
-
Optional timeout As
|
|
1279
|
+
Optional timeout As Long, _
|
|
1285
1280
|
Optional proxyServer As String, _
|
|
1286
1281
|
Optional proxyBypassList As String, _
|
|
1287
1282
|
Optional proxyUsername As String, _
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: xlwings
|
|
3
|
-
Version: 0.30.
|
|
3
|
+
Version: 0.30.13
|
|
4
4
|
Summary: Make Excel fly: Interact with Excel from Python and vice versa.
|
|
5
5
|
Home-page: https://www.xlwings.org
|
|
6
6
|
Author: Zoomer Analytics LLC
|
|
@@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
21
|
Classifier: Topic :: Office/Business :: Financial :: Spreadsheet
|
|
21
22
|
Classifier: License :: OSI Approved :: BSD License
|
|
22
23
|
Requires-Python: >=3.8
|
|
@@ -101,9 +102,4 @@ Links
|
|
|
101
102
|
* Book (O'Reilly, 2021): https://www.xlwings.org/book
|
|
102
103
|
* Video Course: https://training.xlwings.org/p/xlwings
|
|
103
104
|
* Source Code: https://github.com/xlwings/xlwings
|
|
104
|
-
|
|
105
|
-
xltrail
|
|
106
|
-
-------
|
|
107
|
-
|
|
108
|
-
The Excel files are also tracked with `xltrail <https://www.xltrail.com>`_. You can see the diffs
|
|
109
|
-
`here <https://app.xltrail.com/#/?path=github.com%2Fxlwings%2Fxlwings.git&branch=main&public=true>`_.
|
|
105
|
+
* xltrail (Version control for Excel files): https://www.xltrail.com
|
|
@@ -5,8 +5,8 @@ LICENSE_PRO.txt
|
|
|
5
5
|
MANIFEST.in
|
|
6
6
|
README.rst
|
|
7
7
|
setup.py
|
|
8
|
-
xlwings32-0.30.
|
|
9
|
-
xlwings64-0.30.
|
|
8
|
+
xlwings32-0.30.13.dll
|
|
9
|
+
xlwings64-0.30.13.dll
|
|
10
10
|
src/lib.rs
|
|
11
11
|
tests/test_active.py
|
|
12
12
|
tests/test_app.py
|
|
@@ -42,7 +42,7 @@ xlwings/reports.py
|
|
|
42
42
|
xlwings/server.py
|
|
43
43
|
xlwings/udfs.py
|
|
44
44
|
xlwings/utils.py
|
|
45
|
-
xlwings/xlwings-0.30.
|
|
45
|
+
xlwings/xlwings-0.30.13.applescript
|
|
46
46
|
xlwings/xlwings.bas
|
|
47
47
|
xlwings/xlwings_custom_addin.bas
|
|
48
48
|
xlwings.egg-info/PKG-INFO
|
|
@@ -93,7 +93,6 @@ xlwings/pro/_xlcalamine.py
|
|
|
93
93
|
xlwings/pro/_xlofficejs.py
|
|
94
94
|
xlwings/pro/_xlremote.py
|
|
95
95
|
xlwings/pro/embedded_code.py
|
|
96
|
-
xlwings/pro/module_permissions.py
|
|
97
96
|
xlwings/pro/udfs_officejs.py
|
|
98
97
|
xlwings/pro/utils.py
|
|
99
98
|
xlwings/pro/reports/__init__.py
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Required Notice: Copyright (C) Zoomer Analytics GmbH.
|
|
3
|
-
|
|
4
|
-
xlwings PRO is dual-licensed under one of the following licenses:
|
|
5
|
-
|
|
6
|
-
* PolyForm Noncommercial License 1.0.0 (for noncommercial use):
|
|
7
|
-
https://polyformproject.org/licenses/noncommercial/1.0.0
|
|
8
|
-
* xlwings PRO License (for commercial use):
|
|
9
|
-
https://github.com/xlwings/xlwings/blob/main/LICENSE_PRO.txt
|
|
10
|
-
|
|
11
|
-
Commercial licenses can be purchased at https://www.xlwings.org
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
import hashlib
|
|
15
|
-
import re
|
|
16
|
-
import socket
|
|
17
|
-
import sys
|
|
18
|
-
from functools import lru_cache
|
|
19
|
-
from pathlib import Path
|
|
20
|
-
|
|
21
|
-
try:
|
|
22
|
-
import requests
|
|
23
|
-
except ImportError:
|
|
24
|
-
requests = None
|
|
25
|
-
|
|
26
|
-
from .. import XlwingsError
|
|
27
|
-
from ..utils import read_user_config
|
|
28
|
-
from .utils import LicenseHandler
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
@lru_cache(None)
|
|
32
|
-
def verify_execute_permission(command=None, module_names=None):
|
|
33
|
-
LicenseHandler.validate_license("permissioning")
|
|
34
|
-
if command:
|
|
35
|
-
assert not module_names
|
|
36
|
-
if re.compile(r"from .* import .*").search(command):
|
|
37
|
-
raise XlwingsError("Can't verify 'from x import y' imports.")
|
|
38
|
-
module_names = re.findall(r"import ([^;]*)", command)
|
|
39
|
-
elif module_names:
|
|
40
|
-
assert not command
|
|
41
|
-
else:
|
|
42
|
-
raise ValueError("You must either provide command or module_names!")
|
|
43
|
-
file_names = [module + ".py" for module in module_names]
|
|
44
|
-
file_hashes = {}
|
|
45
|
-
for fn in file_names:
|
|
46
|
-
for path in sys.path:
|
|
47
|
-
# Can't use pkgutil or importlib as they may import, i.e. run the module
|
|
48
|
-
if (Path(path) / fn).is_file():
|
|
49
|
-
with open(Path(path) / fn, "rb") as f:
|
|
50
|
-
content = f.read()
|
|
51
|
-
file_hashes[fn] = hashlib.sha256(content).hexdigest()
|
|
52
|
-
break
|
|
53
|
-
if fn not in file_hashes:
|
|
54
|
-
raise FileNotFoundError(f"Couldn't find {fn}")
|
|
55
|
-
|
|
56
|
-
config = read_user_config()
|
|
57
|
-
method = config.get("permission_check_method", "GET").upper()
|
|
58
|
-
|
|
59
|
-
if method == "GET":
|
|
60
|
-
response = requests.get(config["permission_check_url"], timeout=10)
|
|
61
|
-
if response.status_code != 200:
|
|
62
|
-
raise XlwingsError(
|
|
63
|
-
f"Failed to connect to permission server. Error {response.status_code}."
|
|
64
|
-
)
|
|
65
|
-
response = response.json()
|
|
66
|
-
checked_files = []
|
|
67
|
-
for file_name in file_names:
|
|
68
|
-
for module in response["modules"]:
|
|
69
|
-
if file_name == module["file_name"]:
|
|
70
|
-
correct_sha256 = file_hashes[file_name] == module["sha256"]
|
|
71
|
-
permitted_machine = (
|
|
72
|
-
module["machine_names"] == "*"
|
|
73
|
-
or "*" in module["machine_names"]
|
|
74
|
-
or socket.gethostname() in module["machine_names"]
|
|
75
|
-
)
|
|
76
|
-
if correct_sha256 and permitted_machine:
|
|
77
|
-
checked_files.append(file_name)
|
|
78
|
-
break
|
|
79
|
-
else:
|
|
80
|
-
raise XlwingsError(
|
|
81
|
-
f"Failed to get permission for the following file: "
|
|
82
|
-
f"{file_name}"
|
|
83
|
-
)
|
|
84
|
-
missing_permissions = set(file_names).difference(set(checked_files))
|
|
85
|
-
if missing_permissions:
|
|
86
|
-
raise XlwingsError(
|
|
87
|
-
f"Failed to get permission for the following file(s): "
|
|
88
|
-
f"{', '.join(missing_permissions)}"
|
|
89
|
-
)
|
|
90
|
-
elif method == "POST":
|
|
91
|
-
payload = {"machine_name": socket.gethostname(), "modules": []}
|
|
92
|
-
for file_name, sha256 in file_hashes.items():
|
|
93
|
-
payload["modules"].append({"file_name": file_name, "sha256": sha256})
|
|
94
|
-
headers = (
|
|
95
|
-
{"Authorization": config["permission_check_authorization"]}
|
|
96
|
-
if config.get("permission_check_authorization")
|
|
97
|
-
else None
|
|
98
|
-
)
|
|
99
|
-
response = requests.post(
|
|
100
|
-
config["permission_check_url"],
|
|
101
|
-
json=payload,
|
|
102
|
-
timeout=10,
|
|
103
|
-
headers=headers,
|
|
104
|
-
)
|
|
105
|
-
|
|
106
|
-
if response.status_code == 200:
|
|
107
|
-
return True
|
|
108
|
-
else:
|
|
109
|
-
raise XlwingsError(
|
|
110
|
-
f"Failed to get permission for the following file(s): "
|
|
111
|
-
f"{', '.join(file_names)}. Error {response.status_code}."
|
|
112
|
-
)
|
|
113
|
-
else:
|
|
114
|
-
raise ValueError("PERMISSION_CHECK_URL must be either GET or POST.")
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|