简体   繁体   中英

How to rotate Excel sheet horizontally using C# with Excel interop?

I created an Excel sheet with different size of columns and in some cells their are images placed using Excel interop api and some third party dll (gembox).

Here's a screenshot of that Excel sheet:

excel 图像

Now client want to rotate it horizontally because last column text getting outside of the sheet.

I tried with some existing answers, like using transpose etc.

Is there anyone who knows method to directly rotate sheet with the images pasted in cell?

Thank you

Try below code.

xlWorkSheet.PageSetup.Orientation = Microsoft.Office.Interop.Excel.XlPageOrientation.xlLandscape; 
// here xlWorkSheet is your worksheet.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM