File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed
main/java/org/dhatim/fastexcel
test/java/org/dhatim/fastexcel Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,17 @@ IntStream.rangeClosed(3,5).forEach(ws::hideRow);
230
230
IntStream . rangeClosed(3 ,5 ). forEach(ws:: hideColumn);
231
231
```
232
232
233
+ Hide grid lines
234
+ ``` java
235
+ ws. hideGridLines();
236
+ ```
237
+
238
+ Display the worksheet from right to left
239
+ ``` java
240
+ ws. rightToLeft();
241
+ ```
242
+
243
+
233
244
Group rows or colums
234
245
235
246
``` java
Original file line number Diff line number Diff line change @@ -137,6 +137,11 @@ public class Worksheet implements Closeable {
137
137
* Whether grid lines are displayed
138
138
*/
139
139
private boolean showGridLines = true ;
140
+
141
+ /**
142
+ * Display the worksheet from right to left
143
+ */
144
+ private boolean rightToLeft = false ;
140
145
/**
141
146
* Sheet view zoom percentage
142
147
*/
@@ -1017,6 +1022,9 @@ public void flush() throws IOException {
1017
1022
if (!showGridLines ) {
1018
1023
writer .append (" showGridLines=\" false\" " );
1019
1024
}
1025
+ if (rightToLeft ) {
1026
+ writer .append (" rightToLeft=\" true\" " );
1027
+ }
1020
1028
if (zoomScale != 100 ) {
1021
1029
writer .append (" zoomScale=\" " ).append (zoomScale ).append ("\" " );
1022
1030
}
@@ -1156,6 +1164,13 @@ public void hideGridLines() {
1156
1164
this .showGridLines = false ;
1157
1165
}
1158
1166
1167
+ /**
1168
+ * Display the worksheet from right to left
1169
+ */
1170
+ public void rightToLeft () {
1171
+ this .rightToLeft = true ;
1172
+ }
1173
+
1159
1174
/**
1160
1175
* Set sheet view zoom level in percent. Default is 100 (100%).
1161
1176
* @param zoomPercent - zoom level from 10 to 400
Original file line number Diff line number Diff line change @@ -539,6 +539,20 @@ void testForIssue261() throws Exception {
539
539
//}
540
540
}
541
541
542
+ @ Test
543
+ void testForIssue63 () throws Exception {
544
+ // try (FileOutputStream fileOutputStream = new FileOutputStream("D://right_to_left.xlsx")) {
545
+ byte [] bytes = writeWorkbook (wb -> {
546
+ Worksheet ws1 = wb .newWorksheet ("Worksheet 1" );
547
+ Worksheet ws2 = wb .newWorksheet ("Worksheet 2" );
548
+ ws1 .rightToLeft ();
549
+ ws1 .value (0 ,0 ,"Hello" );
550
+ ws1 .value (0 ,1 ,"World" );
551
+ });
552
+ // fileOutputStream.write(bytes);
553
+ // }
554
+ }
555
+
542
556
@ Test
543
557
void testForIssue259 () throws Exception {
544
558
//try (FileOutputStream fileOutputStream = new FileOutputStream("D://group_cols_test.xlsx")) {
You can’t perform that action at this time.
0 commit comments