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

Closed

Problem DataType

description

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
 
thanks,
greetings
Closed Apr 25 at 9: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.

comments

MDeLeon wrote Jul 20, 2012 at 5: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;