This project has moved. For the latest updates, please go here.

Excel Formatting and worksheet initialization

May 26, 2015 at 7:23 PM
[Coding Lang : C#]

Question :1
I'm using following code for getting "new line" in a cell and then adjusting rows height to properly display the cell content. Although the new line functionality is working properly but row height is not proper (Only the first line is visible).

IXLWorksheet ws = _Workbook.AddWorksheet("test");
ws.Cell(1,1).FormulaA1 = "=" + "\"New\"" + "&CHAR(10)&" + "\"Line\"";
ws.Style.Alignment.WrapText = true;

Question :2
As we can initialize a worksheet by a DataTable as follows:
var ws = _Workbook.Worksheets.Add(data_table, "sheet_name");
I need to initialize a worksheet from multiple data_tables (all having different structure) stacked side by side.