You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 96dc00a
Browse filesBrowse the repository at this point in the historyBrowse files
PyExcelerate also permits you to write data to ranges directly, which is faster than writing cell-by-cell.
49
51
52
+
#### Fastest
53
+
50
54
```python
51
55
from pyexcelerate import Workbook
52
56
@@ -59,6 +63,24 @@ wb.save("output.xlsx")
59
63
60
64
### Writing cell data
61
65
66
+
#### Faster
67
+
68
+
```python
69
+
from datetime import datetime
70
+
from pyexcelerate import Workbook
71
+
72
+
wb = Workbook()
73
+
ws = wb.new_sheet("sheet name")
74
+
ws.set_cell_value(1, 1, 15) # a number
75
+
ws.set_cell_value(1, 2, 20)
76
+
ws.set_cell_value(1, 3, "=SUM(A1,B1)") # a formula
77
+
ws.set_cell_value(1, 4, datetime.now()) # a date
78
+
wb.save("output.xlsx")
79
+
80
+
```
81
+
82
+
#### Fast
83
+
62
84
```python
63
85
from datetime import datetime
64
86
from pyexcelerate import Workbook
@@ -100,7 +122,48 @@ wb.save("output.xlsx")
100
122
101
123
### Styling cells
102
124
103
-
Styling cells causes **non-negligible** overhead. It **will** increase your execution time (up to 10x longer!). Only style cells if absolutely necessary.
125
+
Styling cells causes **non-negligible** overhead. It **will** increase your execution time (up to 10x longer if done improperly!). Only style cells if absolutely necessary.
126
+
127
+
#### Fastest
128
+
129
+
```python
130
+
from pyexcelerate import Workbook, Color, Style, Font, Fill
0 commit comments