Spire.DataExport for .NET is a 100% pure data .NET library suit for exporting data into MS Word, Excel, RTF, Access, PDF, XPS, HTML, XML, Text, CSV, DBF, SYLK, SQL Script, DIF, Clipboard, etc.

Mon Dec 22, 2014 3:26 pm

How do you control the row height as i'm adding an image in each row as part of my dataexport but I need to expand the height of the row so I can see the images

ascotford
 
Posts: 12
Joined: Wed Sep 18, 2013 3:34 pm

Tue Dec 23, 2014 6:42 am

Dear ascotford,

Thanks for your inquiry.

You can set the "DefRowHeight" property, for example:
Code: Select all
WorkSheet ws = new WorkSheet();
ws.DataSource = ExportSource.DataTable;
ws.DataTable = dataGridView1.DataSource as DataTable;
ws.StartDataCol = Convert.ToByte(0);
//Row Height
ws.DefRowHeight = 20;
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Wed Dec 24, 2014 8:53 am

Dear ascotford,

Have you tried the code I provided? Did it work?

Please give us some feedback if convenience. Thank you.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Mon Jan 05, 2015 9:20 am

No sorry that's not doing anything for me as in row height is coming out as 12.75 (which i think is the excel standard height):

locCellExport = New Spire.DataExport.XLS.CellExport()
locWorkSheet = New Spire.DataExport.XLS.WorkSheet()

sqlCon.Open()

sqlCom = New SqlCommand(Session("Export_SQL").ToString(), sqlCon)
sqlCom.CommandTimeout = CInt(System.Configuration.ConfigurationManager.AppSettings("EXCELExport_CommandTimeout").ToString())

locWorkSheet.DataSource = Spire.DataExport.Common.ExportSource.SqlCommand
locWorkSheet.SQLCommand = sqlCom

Response.Buffer = True
Response.ClearContent()
Response.ClearHeaders()
Response.Expires = 0
Response.Clear()

locWorkSheet.AutoFitColWidth = True
locWorkSheet.StartDataCol = CType(0, Byte)
locWorkSheet.DefRowHeight = 20

locCellExport.Sheets.Add(locWorkSheet)

locCellExport.ActionAfterExport = Spire.DataExport.Common.ActionType.OpenView

locCellExport.SaveToHttpResponse(Session("Export_Filename").ToString(), Response, Spire.DataExport.Common.SaveType.Attachment)

sqlCom.Dispose()
sqlCon.Close()
Response.Flush()

ascotford
 
Posts: 12
Joined: Wed Sep 18, 2013 3:34 pm

Tue Jan 06, 2015 1:44 am

Dear ascotford,

After some investigation, I reproduced this problem and posted it to our dev team. We will inform you if there is any update.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.DataExport

cron