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

荒凉一梦 提交于 2019-12-02 13:06:54

问题


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 :)

来源:https://stackoverflow.com/questions/6059666/how-to-rotate-text-in-excel-spreadsheet-cell-using-openxml-and-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!