Comments (5)
Sorry @bzaar, I don't have time to unzip your solution file. Can you provide a little more context and share the exact lines of code you're using.
from linqtoexcel.
using System;
namespace DictionaryCompiler
{
public class Row
{
public string HeadWord;
}
class Program
{
static void Main()
{
var xl = new LinqToExcel.ExcelQueryFactory {FileName = @"..\..\Test.xlsx"};
foreach (var row in xl.Worksheet ())
{
Console.WriteLine (row ["HeadWord"]);
}
xl.AddMapping <Row> (r => r.HeadWord, "HeadWord");
foreach (var row in xl.Worksheet <Row> ())
{
Console.WriteLine (row.HeadWord ?? "NULL");
}
}
}
}
Output:
some
test
data
NULL
NULL
NULL
NULL
NULL
Press any key to continue . . .
Expected output:
some
test
data
some
test
data
NULL
NULL
Press any key to continue . . .
Hope this helps.
from linqtoexcel.
yes having the same issue but found that mapping is not working for xlsx files and works in xls. but even in xls, mapping is not accurate. for mapped fields in xls files, data is not fetched and mapped fields are not working in where clause as well. please verify and advise any solution. thanks
from linqtoexcel.
hi isaeed , there might be have some accuracy when having multiple where clause , it better to get the values in memory and include your filtration in memory. i have been used linqtoexcel so much yet i dont have any problem with mapping, if your header name is mapped to the correctly i think u can fetch data.
if your issue persis upload ur excel together .
// i have simple where condition in my xlsx file its working good. if u have filtering try in memory.
var faceMechResult = excel.WorksheetRange("A5", "AS" + _faceMechRows.ToString(), facemechSheetName).
Where(i => i.WorkOrder != null).Select(x => x).ToList();
from linqtoexcel.
hi eldhoabe ,
thanks for your suggestion about in memory filtration and things are much improved with it.
from linqtoexcel.
Related Issues (20)
- Numbers returned as formatted value HOT 6
- İmpersonator Connection
- Start WorkSheet cast at desired row
- OleDbException when opening modified spreadsheet HOT 8
- Mapping Unmapped columns HOT 1
- Failure to map columns with square brackets in the header row HOT 1
- Read Zipped data
- Reading file returns only first record and only one property value HOT 1
- The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters...
- .NetCore 3.1 support? HOT 6
- Microsoft Access Database Engine Redistributable 2010 vs 2016 HOT 1
- How to map the merged columns ?
- New nuget package HOT 1
- WorksheetRangeNoHeader returning blank for cells with values
- Hangs on excelFile.GetWorksheetNames();
- DotNet 5 support HOT 2
- "Unspecified Error" when reading multiple files sequentially.
- Will the 'Microsoft.ACE.OLEDB.12.0 problem happen in azure?
- Log4Net dependency HOT 1
- Support for ListObjects (Excel Tables) ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linqtoexcel.