开发者

How to rotate text in Excel spreadsheet cell using OpenXML and C#

开发者 https://www.devze.com 2023-03-07 13:21 出处:网络
I\'m trying to finish little application which is creating MS Excel spreadsheet filled with some data taken from a database. I got stucked with few things. One of these is 开发者_如何学编程how to rota

I'm trying to finish little application which is creating MS Excel spreadsheet filled with some data taken from a database. I got stucked with few things. One of these is 开发者_如何学编程how to rotate a text in a spreadsheet cell. I was trying to do it in that way:

SpreadsheetStyle style = SpreadsheetReader.GetDefaultStyle(spreadSheet);
    style.AddAlignment(new Alignment() {
       TextRotation = 90
    });

but of course it didn't work. I'm using WorksheetWriter class to build excel doc.

I couldn't find anything helpful in Google so I hope to find some help here :)

0

精彩评论

暂无评论...
验证码 换一张
取 消