XEROF

 

xlsgen 4.5.0.4 : CSV, HTML, JSON, XML : custom data mapping


Build 4.5.0.4 of xlsgen adds support for custom data mapping when importing data from CSV, HTML, JSON and XML files.

If you know in advance that in column 2 of your file, there's data of the form 152 kms, where kms is short for kilometers, xlsgen will by default import the data as a string and as a result it will not be possible to make numeric calculations on this column without first translating strings into numbers.

Beginning with this build, with the introduction of the ColumnDataMappingFormatByIndex property, you can specify a custom data mapping, before importing the file, which takes care of this and as a result imports the data as numbers with the appropriate number format. The consequence is that any calculation can be triggered right after the import phase process without manual changes.

Here is an example of source code, for an HTML file, but this works equally well for CSV, HTML, JSON and XML files :


xlsgen::IXlsWorkbookPtr wbk = engine->New( L"output.xlsx" );

xlsgen::IXlsWorksheetPtr wksht = wbk->AddWorksheet( L"Sheet1" );

wksht->Import->HTML->Options->ColumnDataMappingFormatByIndex[3] = L"0 \"kms\""; // note the use of double-quotes

wksht->Import->HTML->ImportFile(L"input\\data.html");

wbk->Close();


There is hope that in the course of 2018, pattern recognition, some form of AI, will be added so that xlsgen can figure out those patterns alone, so automatic type inference will be more powerful. It has already been improved in xlsgen 4.5

Posted on 28-February-2018 15:46 | Category: xlsgen, Excel generator | comment[0] | trackback[0]

 

 

<-- previous page

< July >
0102030405
0607080910
1112131415
1617181920
2122232425
2627282930
31



 

 

This site
Home
Articles

DevTools
CPU-Z
EditPlus
ExplorerXP
Kill.exe
OllyDbg
DependencyWalker
Process Explorer
autoruns.exe
Araxis
COM Trace injection
CodeStats
NetBrute
FileMon/Regmon
BoundsChecker
AQTime profiler
Source monitor
GDI leaks tracking
Rootkit revealer
Rootkit removal
RunAsLimitedUser(1)
RunAsLimitedUser(2)

 

 

Liens
Le Plan B
Un jour à Paris
Meneame
Rezo.net (aggr)
Reseau voltaire
Cuba solidarity project
Le grand soir
L'autre journal
Le courrier suisse
L'Orient, le jour
Agoravox (aggr)