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


Problem DataType


My problem is when pass asenumerable collection for example;
ws.Cell(1,1).Value = resultado.AsEnumerable();
resultado is product of linq query
and my problem is when pass field of type int how string to excel, no respect the type, in excel not see the type text, just general
i try diferent ways like .DataType = the type here, but, not work
i am use ClosedXML 0.65.2
Closed Apr 25 at 8:39 PM by igitur
Please try the latest version of ClosedXML (v0.87.1 at this stage). If you still experience the issue, log it on the new GitHub page.


MDeLeon wrote Jul 20, 2012 at 4:45 PM

I don't understand the problem. The following works fine (you get a list of numbers in Excel)
        var wb = new XLWorkbook();
        var ws = wb.AddWorksheet("Sheet1");
        var list = new List {1, 2, 3, 4, 5};
        ws.FirstCell().Value = list;