Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How to set right to left reading order? #162

Open
Mulli opened this issue Sep 6, 2021 · 1 comment
Open

Question: How to set right to left reading order? #162

Mulli opened this issue Sep 6, 2021 · 1 comment

Comments

@Mulli
Copy link

Mulli commented Sep 6, 2021

Just a question, cannot figure out how to set right to left column order in a sheet?

<ExcelFile element={<button>Download Data</button>}>
                <ExcelSheet data={dataSet1} name="לשונית ראשונה" horizontal={"right"} >
                    <ExcelColumn label="שדה 1" value="name"/>
                    <ExcelColumn label="שדה 2" value="amount"/>
                    <ExcelColumn label="שדה 3" value="sex"/>
                    <ExcelColumn label="הרבה מילים"
                                 value={(col) => col.is_married ? "Married" : "Single"}/>
                </ExcelSheet>
                <ExcelSheet data={dataSet2} name="לשונית שניה" readingOrder={{horizontal:"right"}}>
                    <ExcelColumn label="כאן יהיו" value="name"/>
                    <ExcelColumn label="עוד הרבה" value="total"/>
                    <ExcelColumn label="נתונים" value="remaining"/>
                </ExcelSheet>
            </ExcelFile>

@clleker
Copy link

clleker commented Sep 18, 2021

Use "Excel Export with Dataset", then in style set

alignment: {wrapText: true, horizontal: 'center', vertical: 'top'}.

For example:

[
columns: [{…}],
data:[
[{
value: 'Text',
style: {
font: { sz: '12' },
alignment: {readingOrder:2 wrapText: true, horizontal: 'center', vertical: 'top' },
border: { bottom: { style: 'thin', color: { rgb: '000000' } }
}
}]
]

   alignment: {readingOrder:2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants