Autosize column not working when I use Style.Rotation = (short)90

May 27, 2011 at 11:24 AM

Hello,

I want that first row of excel should have vertical texts for that I had write below code then i get excel sheet with vertical texts.

Style.Rotation = (short)90

But I also want Auto size column command for all columns in excel sheets. Then it gives me exception as below. 

 

Base Error Description: System.NotImplementedException: The method or operation is not implemented. at NPOI.HSSF.UserModel.HSSFSheet.AutoSizeColumn(Int32 column, Boolean useMergedCells) at NPOI.HSSF.UserModel.HSSFSheet.AutoSizeColumn(Int32 column) at TalentnowReportsLibrary.Excel.FillSheet(HSSFWorkbook oHSSFWorkbook, HSSFSheet oSheet, DataTable dt) at TalentnowReportsLibrary.Excel.GenerateExcel(DataSet oDstTalentNowJobPortal, String savePath, String& fileName)

Base Error Message: The method or operation is not implemented.

Base Error Source: NPOI

Base Error StackTrace: at NPOI.HSSF.UserModel.HSSFSheet.AutoSizeColumn(Int32 column, Boolean useMergedCells) at NPOI.HSSF.UserModel.HSSFSheet.AutoSizeColumn(Int32 column) at TalentnowReportsLibrary.Excel.FillSheet(HSSFWorkbook oHSSFWorkbook, HSSFSheet oSheet, DataTable dt) at TalentnowReportsLibrary.Excel.GenerateExcel(DataSet oDstTalentNowJobPortal, String savePath, String& fileName)

Last Error Description: System.NotImplementedException: The method or operation is not implemented. at NPOI.HSSF.UserModel.HSSFSheet.AutoSizeColumn(Int32 column, Boolean useMergedCells) at NPOI.HSSF.UserModel.HSSFSheet.AutoSizeColumn(Int32 column) at TalentnowReportsLibrary.Excel.FillSheet(HSSFWorkbook oHSSFWorkbook, HSSFSheet oSheet, DataTable dt) at TalentnowReportsLibrary.Excel.GenerateExcel(DataSet oDstTalentNowJobPortal, String savePath, String& fileName)

Provide me the solution for that as soon as possible.

 

Thanks,

Saharsh

Coordinator
May 30, 2011 at 11:52 PM

The width calculation of text rotation is never supported. This is a known issue. Sorry for that.