Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View Direction dont change to rtl in XLSX-Style

I want to export a rtl direction xlsx file using XLSX-Style According to official documents I use below code to change view direction to rtl

    if (!wb.Workbook) wb.Workbook = {};
    if (!wb.Workbook.Views) wb.Workbook.Views = [];
    if (!wb.Workbook.Views[0]) wb.Workbook.Views[0] = {};
    wb.Workbook.Views[0].RTL = true;

but again exported view direction is ltr

like image 639
Mohammad didehvar Avatar asked Nov 16 '25 03:11

Mohammad didehvar


1 Answers

try this :

const workbook = {
Sheets : {
  'data' : worksheet
},
SheetNames : ['data'],
Workbook: {
  Views: [
    {RTL: true}
  ]
}
}
like image 109
amirreza sharifi Avatar answered Nov 17 '25 19:11

amirreza sharifi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!