ClosedXML insertData(List<Double>, True) results in only the first row as a Number while rest of the rows as general

18 Views Asked by At

I am using ClosedXML to handle exporting data from an addin to an excel file. I first get my data as List and convert it to List:

 List<double> columnData_lst = curr_data_woHdrs_lst[colIndex].Select(str => (double)KDS_Convert.parseOrDefault(str, 0.00)).ToList();

I then inserts it, Transposed since i want it to go in as a Column not as a row:

worksheet.Cell(startRow, currCol).InsertData(curr_data_woHdrs_LstTrans_lst[colIndex], true);

My Expectation is that the whole column would be formatted as Number in Excel. Instead, the first cell of the current Column is formatted as Number. Any ideas of what i am doing wrong?

1

There are 1 best solutions below

0
Fawzi Masri On

sorry guys, all work as expected. i had an issue with the Transpose field in insertData, it should have been set to false, not true. this misunderstanding and another write happening over the same region got me a bit confused about what is happening. So code works as expected...