josdeweger-zz / sheettoobjects Goto Github PK
View Code? Open in Web Editor NEWSimple library which aims to provide developers with an easy solution to map sheets (Google Sheets, Microsoft Excel, csv) to models
License: MIT License
Simple library which aims to provide developers with an easy solution to map sheets (Google Sheets, Microsoft Excel, csv) to models
License: MIT License
when a property is:
then in the column config a default value should be obligatory, otherwise there is no way to know to what value the property should be set (0? MinValue? MaxValue?)
I think it would be better to create a separate package for the protected sheets because it uses different nuget packages as reference: especially the google packages, I would not want them in my project if I didn't use them. Either way for the Refit package, which is not used for the protected sheets.
Any comments on this?
I am importing product data but when importing I do not know the number of rows so I provide a large value (for Excel), e.g. 100000 rows. It takes a serious amout of time to parse the document while there are only 10 rows available.
It should be nice to have a StopParsingRule, e.g.:
var sheetMapper = new SheetMapper()
.AddConfigFor<AdditionExcelImport>(cfg => cfg
.MapColumn(column => column
.WithHeader("Code")
.MapTo(m => m.Code)
.StopParsingWhen(x => x == null)
)
I might try and implement something like this but would like to know if anyone else have an interest in this feature.
Better documentation of the adapters will help people to quickly understand how to use this library.
It is impossible to extend the library with new adapters unless it's done in the same codebase. The classes in both the core and lib project needed to create a new adapter should be public for better extendability.
I would like to be able to do dotnet add package SheetToObjects.Providers.Excel
The SheetMapper already contains a Dictionary<Type, MappingConfig>, which stores MappingConfigs per Type
Create something similar like AutoMapper Profiles, that can be discovered via assembly scanning.
This will also allow for a services.AddSheetToObjects()
extension method that will handle all registrations
It would be nice to have a simple data converter to be able to some simple transformation e.g. 0/1 => false/true. I created a test to try some different ideas but would like to know if a PR with some kind of solution in this direction would be accepted.
Sample tests: https://github.com/jacobduijzer/Spielerei/blob/master/Spielerei.Tests/CustomMapper/CustomMapperShould.cs
Resolved by #22
Add validation for several parts of the fluent configuration, provide developer with proper feedback about their config
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.