使用asp.net在Excel中将单元格文本转换为垂直方向 [英] Converting Cell Text to vertical orientation in Excel using asp.net
本文介绍了使用asp.net在Excel中将单元格文本转换为垂直方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都可以让我知道如何将Excel工作表中的数据旋转90度。简单的说,我需要垂直放置一个excel表中的文本。
请通过使用HtmlTextWriter和StringWriter,而不是GridView,让我知道如何做到这一点。
我已经使用了StringBuider并开始创建一个xml格式的Excel工作表。
谢谢
Vamsi
Hi,
Can anyone let me know how to rotate the data in a excel sheet by 90 degrees. Simple talking, I need to place a text in a excel sheet vertically.
Please let me know how to do this by using HtmlTextWriter and StringWriter, not from a GridView.
I''ve taken StringBuider and started creating an excel sheet with xml format.
Thanks
Vamsi
推荐答案
对于Excel中的垂直方向,你可以按以下方式使用
For vertical orientation in Excel you can use by following way
Sheet.Range("A1").Orientation = 90
有一个看这里: http://stackoverflow.com/questions/9998122/openxml-spreadsheetml-sideways-text [ ^ ]
您需要使用 CellFormat [ ^ ] 方向 [ ^ ] property。
Have a look here: http://stackoverflow.com/questions/9998122/openxml-spreadsheetml-sideways-text[^]
You need to use CellFormat[^] with Orientation[^] property.
这篇关于使用asp.net在Excel中将单元格文本转换为垂直方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文