Writing column by column not row by row:
I used this(row by row), this will be for writing the entire row, I left out the first line, because of the heading:
IWorksheet worksheet = workbook.Worksheets[0];//1. worksheet
for (int i = 0; i < _excelObjekt.Count; i++)
{
worksheet.ImportArray(_excelObjekt[i], 2 + i, 1, false);
}
But now I need generate an EXCEL without a physically file, actually from the memory( some kind of association between the heading and the data that belongs to it( heading and data should be from type of string).
I need to write the entire column including the heading:
- the first line should be the heading and than it should be filled with the data, after the first column is filled the next column should be filled and so on, until everything is done.
How to do it ?