Importing the result of a linq query

Hi,

I have a simple linq query that produces a 2 dimensional result (no hierarchies)

var ScoresByBoard = from p in BoardAbstratProduct
join s in scores on new { p.a.AbstractHtmlID, p.p.PersonID } equals
new { s.AbstractHtmlID, s.PersonID } into productscores
from ps in productscores.DefaultIfEmpty()
select new { p.a.AbstractHtmlID, p.a.AbstractHtml1, p.p.PersonID, p.p.Registration_Surname, score = (int?)ps.ScoreID};

I have tried all of the importxxx methogs but failed to load the data into a sheet (I succeeded with a datatable in the past the first time).

How does one import this result into an excel sheet?

Regarsd, Tom

Hi,

Well, I am afraid we do not support to retrieve the results directly from a linq query, we will look into it soon. I think as a workaround, you may try to create/make a datatable or array using your own codes based on the results of the query and then use Cells.Importxxx method to fill a worksheet for your requirements.

Thank you.

That’s unfortunate because I am using linq queries throughout the whole project.

Thanks for providing a workaround



Regards, Tom