Posted on 12-April-2018 11:00 | Category: xlsgen, Excel generator | Tags: generating Excel spreadsheets xlsgen 4.5.0.12 : Faster calculations Build 4.5.0.12 of xlsgen improves the speed of calculations by 25%
Work has been done in two scenarios : cell traversal (i.e. calculations with many depending cells carrying little or no formulas) ; and deep nesting (i.e. calculations with formulas depending on a chain of other formulas). That's 25% faster. And that includes 10% less memory page faults for the former scenario.
|  |  | Posted on 10-April-2018 06:43 | Category: xlsgen, Excel generator | Tags: generating Excel spreadsheets xlsgen 4.5.0.11 : Special cellsBuild 4.5.0.11 of xlsgen adds exposure to the SpecialCells property in xlsgen, which is a mechanism for selecting cells based on one of a number of conditions. The application interface for special cells in xlsgen is the programmatic equivalent of the special cells user interface dialog in Excel, raised from Ctrl+G and then the Special button. Special cells is a range of cells, single area or a union of areas, that meets a certain criteria. One example, is cells carrying a formula. Another is cells with number literals. The conditions are one of these : specialcells_type_allformatconditions : cells with conditional formatting(s)specialcells_type_allvalidation : cells with data validation(s)specialcells_type_blanks : blank (empty) cellsspecialcells_type_comments : cells with comment notesspecialcells_type_constants : cells with non-formula values (*)specialcells_type_formulas : cells carrying formulas (*)specialcells_type_lastcell : last cell of the range (bottom right corner)specialcells_type_sameformatconditions : cells with the same conditional formattingspecialcells_type_samevalidation : cells with the same data validationspecialcells_type_visible : visible cells (neither row nor column are hidden)
(*) : If the chosen condition is either constants or formulas, then the application may filter according to the literal data type, one or more of the following : specialcells_value_na : not applicable (no filter)specialcells_value_error : cells with formula errorsspecialcells_value_logical : cells with a logical (boolean) valuespecialcells_value_number : cells with numbers (integer, float, date)specialcells_value_text : cells with text
Special cells is exposed as a range property, so an existing range must be specified to limit the bounding area where the special cells filtering applies. If the client application knows no such area, it can pass either A1 as range or use the UsedRange which is the area of the current worksheet that encompasses all content and formulas. Here is an example : Java code | // find cells with a formula, turn them red XlsRange r = workbook.getWorksheetByIndex(1). getUsedRange().getSpecialCells(xlsgen.specialcells_type_formulas, xlsgen.specialcells_value_na); r.getStyle().getPattern().putBackgroundColor(0xFF0000); r.Apply();
|
|  |  | Posted on 06-April-2018 14:43 | Category: xlsgen, Excel generator | Tags: generating Excel spreadsheets xlsgen 4.5.0.10 : Fixed GDI leak Build 4.5.0.10 of xlsgen fixes a GDI leak that occurred during print/preview/PDF generation/XPS generation. It could have harmed the ability to run xlsgen in server environments.
|  |  | Posted on 02-April-2018 18:41 | Category: xlsgen, Excel generator | Tags: generating Excel spreadsheets xlsgen 4.5.0.9 : Fix for named ranges Build 4.5.0.9 of xlsgen ensures that named ranges are copied over during a worksheet duplicate, whether they have a local scope (to the worksheet being copied), or a global scope (with a range definition restricted to the worksheet being copied).
|  |  | Posted on 30-March-2018 16:14 | Category: xlsgen, Excel generator | Tags: generating Excel spreadsheets xlsgen 4.5.0.8 : CSV, HTML, JSON, XML : charset and languageBuild 4.5.0.8 of xlsgen adds support for charset and language for the 4 import file formats : CSV, HTML, JSON and XML. By default, xlsgen infers data types using the user's regional settings when it comes to the language, and it relies on charset markup built in files, whenever applicable, to parse files. Regarding language, such as en_US, en_GB and fr_FR, those affect how data type inference recognizes numbers, currencies and dates. When you know in advance the file being imported is of a given language, you can pass it to xlsgen before importing it by setting the following property : worksheet.Import.CSV.Options.Language = "fr_FR"; // example of custom language used in an imported CSV file And this option is equally available for HTML, JSON and XML files and buffers. Worth noting the syntax of the language parameter. This is made of the primary language initials, followed by an underscore, and the secondary language initials. As such, US English behaves differently than British English. It's normalized as RFC 1766. Regarding charsets, it's a bit more involved, because charset may be present or not in each file being imported, and specs vary depending on the file format. - CSV file : the charset can be implicit for Unicode 2 and Unicode UTF-8 with the presence of BOM markers at the beginning of the file. xlsgen already handles BOM. Otherwise it is assumed the charset is the user's current code page. This can be overridden by setting the following property : worksheet.Import.CSV.Options.Charset = "iso-8859-1"; // example of custom charset used in an imported CSV file - XML file : the charset is explicit in the XML markup, in the first line. This can be overridden by setting the following property : worksheet.Import.XML.Options.Charset = "iso-8859-1"; // example of custom charset used in an imported XML file - JSON file : the charset is defaulting to Unicode UTF-8. This can be overridden by setting the following property : worksheet.Import.JSON.Options.Charset = "iso-8859-1"; // example of custom charset used in an imported JSON file - HTML file : the charset is explicit in the HTML markup, in optional meta HTTP equiv markup. This can be overridden by setting the following property : worksheet.Import.HTML.Options.Charset = "iso-8859-1"; // example of custom charset used in an imported HTML file When any of those files are imported from the internet, the HTTP response headers have a charset spec too, that is seen and passed along by xlsgen. But the custom charset setting always override everything else. |  |  | Posted on 24-March-2018 17:48 | Category: xlsgen, Excel generator | Tags: generating Excel spreadsheets xlsgen 4.5.0.7 : Fix for calculations Build 4.5.0.7 of xlsgen fixes a default setting for formulas in calculations. The setting is now defaulting to recalc on open, which makes sure that when generated files are eventually opened in Excel, Excel checks whether values resulting from formulas are up-to-date.
It was 2 years it wasn't the case anymore, and a client application could have defaulting to this by changing the setting in workbook.CalculationOptions.AutoRecalc.
|  |  | Posted on 24-March-2018 17:25 | Category: xlsgen, Excel generator | Tags: generating Excel spreadsheets xlsgen 4.5.0.6 : Fix pack for pivot tables (II) Build 4.5.0.6 adds another fix pack for pivot tables. It has the following :
- improved integrity check avoiding the creation of a corrupt file case for XLS files (subtotals parameters applied to fields in the Page area)
- improved integrity check avoiding the creation of a corrupt file case for XLSX files (expected data type for columns)
- support for XLSX pivot table styles in XLS files
- support for sorting pivot table columns in XLS files
|  |  | Posted on 14-March-2018 08:39 | Category: xlsgen, Excel generator | Tags: generating Excel spreadsheets xlsgen 4.5.0.5 : Fix pack for pivot tables Build 4.5.0.5 of xlsgen is a fix pack for pivot tables in XLSX (and variants), XLSB and XLS files.
It includes the following :
- improved pivot table insertion point whenever the pivot table has at least one field in the Page area (also known as Report filters area). The insertion point refers to row headers, and page headers are above it. Inserting at row 1 would cause Excel to show an error message "There isn't enough memory to complete this action. " only because internally the row for page headers becomes negative, equivalent to a very large 32-bit number, and Excel can't allocate the corresponding memory. The error message is mostly bogus anyway, but with this fix it won't appear anymore.
- exposure of the ShowExpandControls boolean property in pivot table options : defaulting to true, this option shows or hides the [-] expand/collapse controls next to row items
- exposure of the ResizeOnUpdate boolean property in pivot table options : defaulting to true, instructs Excel to reshape and resize whenever there is a data refresh.
- exposure of the MergeItems boolean property in pivot table options : defaulting to false, instructs Excel to show row items merged wherever applicable.
- exposure of the ShowGrandTotalsForRows boolean property in pivot table options : defaulting to true, instructs Excel to show grand totals for rows.
- exposure of the ShowGrandTotalsForColumns boolean property in pivot table options : defaulting to true, instructs Excel to show grand totals for columns.
|  |  | Posted on 13-March-2018 08:39 | Category: xlsgen, Excel generator | Tags: generating Excel spreadsheets xlsgen 4.5.0.4 : CSV, HTML, JSON, XML : custom data mappingBuild 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 | Tags: generating Excel spreadsheets xlsgen 4.5.0.3 : Fix for copy/paste Build 4.5.0.3 of xlsgen fixes a problem related to copy/paste. Under a particular scenario, shared formulas could be incorrectly written during a copy/paste, preventing them from appearing in the output Excel file.
|  |  | Posted on 03-February-2018 13:21 | Category: xlsgen, Excel generator | Tags: generating Excel spreadsheets xlsgen 4.5.0.2 : Unicode CSV Build 4.5.0.2 of xlsgen adds support for Unicode-based CSV files. Those files are encoded using either Unicode UCS2 (i.e. fix 2-byte characters), or Unicode UTF-8 (i.e. variable length character size, neutrally convertible to Unicode UCS2 and vice versa).
The interesting bit is that it is automatically detected when a CSV file is submitted to xlsgen for opening/importing. So there is no need to know in advance that the CSV file (or buffer) is encoded with Unicode or not, and there is no need to set the corresponding CSV import option (by the way, only the UTF8 option is available in the xlsgen object model, so even if you knew that your CSV file was encoded using Unicode UCS2, there was no mechanism to make xlsgen read it).
This adds up to the arsenal of automatic inference tooling in xlsgen.
|  |  | Posted on 01-January-2018 10:52 | Category: xlsgen, Excel generator | Tags: generating Excel spreadsheets xlsgen 4.5.0.1 : Fix for column deletions Build 4.5.0.1 of xlsgen fixes a problem related to deleting columns (worksheet.Columns("A:F").Delete(); for instance). Under certain circumstances, xlsgen could write back the resulting file with negative column indexes, and Excel would identify this as a file corruption problem.
|  |  | Posted on 01-January-2018 10:47 | Category: xlsgen, Excel generator | Tags: generating Excel spreadsheets xlsgen 4.5 ships ! xlsgen 4.5 ships!
8 major features are part of it :
- OpenOffice becomes first class-citizen (high-fidelity reading of existing .ODS files) - R programming interface - Native PDF charts - XML import - Traffic lights and gauges - Advanced OpenOffice output - Improved data type inference - Forecast chart
In other words, xlsgen 4.5 can work with more file types than before, create better output than before, interface with foreign environments and add up business intelligence capabilities.
|  |  | Posted on 03-November-2017 21:59 | Category: xlsgen, Excel generator | Tags: generating Excel spreadsheets xlsgen 4.5 preview #8 : Forecast chart Creating forecastsChart forecast allows to predict future values of a measure. Contrary to the existing trendline foreward capabilities which provide a simple mechanism for projecting a regression curve with the obvious limit that it is projecting itself, forecast actually infers future values without a regression curve as a model. In the picture above, the continuous line is the data and the dashed line is the forecast values. Dash denotes the non-actual nature of what is depicted, compared to the continuous line. Continuous and forecast values are tied together where the data ends, which also is where forecast begins. xlsgen computes everything so there is no need for prior knowledge for mathematical/statistical models. Creating a chart of type forecast and attaching one or more data series to it is all what is needed. C++ code | xlsgen::IXlsChartPtr chart = wksht->NewChart(xlsgen::charttype_forecast, 4, 3, 18, 8); xlsgen::IXlsChartDynamicDataSourceSeriesPtr serie001 = chart->DynamicDataSource->AddSerie(); serie001->DataLabelsFormula = L"=C3:C21"; serie001->SeriesValuesFormula = L"=D3:D21";
|
|  |  | Posted on 03-November-2017 20:30 | Category: xlsgen, Excel generator | Tags: generating Excel spreadsheets xlsgen 4.5 preview #7 : Improved data type inference A few months back, CSV import was improved by automatically inferring percent values in the data. That is whenever xlsgen would read a string such as "35%", xlsgen would actually store 0.35 in the current cell and associate a percent number format to it so it shows 35% in Excel and is a number.
With xlsgen 4.5, this automatic inference of percent values is extended to all other 3 input file types which are JSON, HTML and XML.
xlsgen 4.5 also introduces automatic inference for currencies. That is, if there is a string such as $340 or 340 €, xlsgen actually stores the corresponding number and asociates a currency number format to it. This works with all input file types, i.e. CSV, JSON, HTML and XML.
Overall, automatic inference differentiates numbers and strings, and disambiguates percent values and currency values. In other words, without any prior knowledge is the data being imported, xlsgen tries to understand what it imports and keep it usable in Excel.
Last but not least, CSV import now supports both files and memory buffers whereas before only files were accepted.
|  |  | Posted on 02-November-2017 08:29 | Category: xlsgen, Excel generator | Tags: generating Excel spreadsheets xlsgen 4.5 preview #6 : Advanced OpenOffice outputOpenOffice output (.ODS files from the OpenOffice Calc application) has been available since xlsgen 2.9. But xlsgen 4.5 improves the output in more than twenty ways : - OpenOffice output support for conditions in number formats (such as [>100]##0).
- write all conditional formattings in OpenOffice files (including databars, time condition, top, ...)
- shapes in OpenOffice files have a proper width and height.
- rich strings in cells are now created in OpenOffice files.
- write vector shapes in OpenOffice files. And proper border styles for text boxes.
- compatibility between LibreOffice and Apache's OpenOffice.
- fixed position of comments in OpenOffice files.
- fix for correctly creating pictures in OpenOffice files. The implementation could create negative offsets.
- fix for correctly creating stand-alone charts in OpenOffice files.
- improved default col width and row height and styles for OpenOffice files.
- write row repeats when writing OpenOffice files instead of iterating over single rows (performance problems).
- support text reading order in cells in OpenOffice files.
- better chart position and size in OpenOffice files. Also pie3D can be created.
- correct chart types in OpenOffice files.
- axis formatting in charts in OpenOffice files.
- support data label and marker formatting in charts in OpenOffice files.
- data points in charts in OpenOffice files.
- support for trendlines and error bars in charts in OpenOffice files.
- support for secondary axis and chart types in OpenOffice files.
- pivot tables for OpenOffice files.
- support for in-memory scenarios for OpenOffice files.
- more versatile shape border width for the OpenOffice ODS output.
|  |  | Posted on 01-November-2017 08:24 | Category: xlsgen, Excel generator | Tags: generating Excel spreadsheets xlsgen 4.5 preview #5 : Traffic lights and gaugesTraffic lights and gauges need not much explanation. They can be programmatically set to reflect levels or states that are part of business decision making. Contrary to other visual components in xlsgen (vu-meter, sparklines, google charts, geomaps, ...), whole arrays of traffic lights or gauges can be created in the same bounding area, not just one. Name | Type | Description | SetGreenThreshold | integer or double | value below which traffic light signals green. Default value is 0. | SetOrangeThreshold | integer or double | value around which traffic light signals orange. Default value is 50. | SetRedThreshold | integer or double | value above which traffic light signals red. Default value is 100. | SetVertical | boolean | force the orientation of the traffic light(s) | SetValue | integer or double (or range of integers or doubles) | value itself or range of values. | SetTitle | string (or range of strings) | title or range of titles. | ResetValues | None | deletes current value(s). |
Here is how to create traffic lights :
C/C++ code |
xlsgen::IXlsEnginePtr engine( __uuidof(xlsgen::CoXlsEngine) );
xlsgen::IXlsWorkbookPtr wbk = engine->New( L"trafficlights.xlsx" );
xlsgen::IXlsWorksheetPtr wksht = wbk->AddWorksheet( L"Sheet1" );
xlsgen::IXlsVisualComponentPtr comp = wksht->NewVisualComponent(L"TrafficLight.ARsTdesign.1", 2,5, // row1, col1 6,8, // row2, col2 0,0,0,0);
// three traffic lights comp->ParameterByName[L"SetValue"]->Formula = L"={80;50;70}"; comp->ParameterByName[L"SetTitle"]->Formula = L"={\"my title (80)\";\"2nd title\";\"3rd title\"}";
wbk->Close();
|
|  |  | Posted on 31-October-2017 07:55 | Category: xlsgen, Excel generator | Tags: generating Excel spreadsheets xlsgen 4.5 preview #4 : XML importxlsgen imports structured data inside an XML file/stream/buffer with and without XPath selection. xlsgen provides auto-import and custom-import. Auto-import infers table columns as well as data types. Custom import lets you add personal formatting, particularly number and color formatting. Auto-import XML files is achieved by passing an XML file (local or url) to the engine Open() method. Auto-import will find structured data inside the XML document. For instance here is a sample XML document, a bookstore holding a number of books : <?xml version="1.0" encoding="UTF8"?> <Bookstore> <!--J&R Booksellers Database--> <Book Genre="" In_Stock="Yes"> <Title>The Round Door</Title> <Author>Tom Evans</Author> <Year_Published>1996</Year_Published> <ISBN>0-9546-0274-3</ISBN> <Price>$23.00</Price> <Review>An Intriguing Tale Of A Round Door In A Wall</Review> </Book> <Book Genre="Non-Fiction" In_Stock="Yes"> <Title>Creating Real Xml Applications</Title> <Author>Bill Eaton</Author> <Year_Published>1998</Year_Published> <ISBN>7-4562-0167-8</ISBN> <Price>$35.00</Price> <Review>A Look At How To Build Real Xml Applications</Review> </Book> <Book Genre="Fiction" In_Stock="No"> <Title>Over The Hills Of Yukon2</Title> <Author>Bert Colewell</Author> <Year_Published>1993</Year_Published> <ISBN>5-6524-3054-1</ISBN> <Price>$22.00</Price> <Review>A Warm Story About A Man And A Moose In Yukon</Review> </Book> <Book Genre="Fiction" In_Stock="Yes"> <Title>The Lion's Gold</Title> <Author>Daphne Griswald</Author> <Year_Published>1989</Year_Published> <ISBN>6-7896-2498-2</ISBN> <Price>$15.00</Price> <Review>One Of The Most Compelling Books Since "The Tiger's Silver".</Review> </Book> </Bookstore>
In order to import the books into a spreadsheet, the following sample code can be used : VB/VB.NET code | Dim engine Set engine = CreateObject("ExcelGenerator.ARsTdesign")
Dim wbk As IXlsWorkbook Set wbk = engine.Open "C:\tmp\Bookstore.xml", "output.xlsx" wbk.Close
|
XML document imported in xlsgenCustom-import is available in the worksheet import interface. If for the need of an application, the structured data must be filtered or selected inside the XML document, it is possible to pass an XPath selector, which is available in the custom-import interface. Here are XPath selection examples :>
- /Bookstore/Book
Fully qualified path to the XML elements of interest. In the example above, this is the list of all 4 books.
- //Book
XML elements of interest that are direct or indirect descendant. In the example above, this is the list of all 4 books.
- /Bookstore/Book[2]
2nd element of the XML element list of interest. In the example above, this selection includes the book by Bill Eaton
- /Bookstore/Book[2,3]
2nd and 3rd elements of the XML element list of interest. In the example above, this selection includes the books by Bill Eaton and Bert Colewell
And here is the corresponding source code : VB/VB.NET code |
Dim engine Set engine = CreateObject("ExcelGenerator.ARsTdesign")
Dim wbk As IXlsWorkbook Set wbk = engine.New( "output.xlsx" )
Dim wksht As IXlsWorksheet Set wksht = wbk.AddWorksheet( "Sheet1" )
wksht.Import.XML.Options.XPath = "/Bookstore/Book" wksht.Import.XML.ImportFile( "C:\\tmp\\Bookstore.xml" )
wbk.Close
|
|  |  | Posted on 30-October-2017 09:42 | Category: xlsgen, Excel generator | Tags: generating Excel spreadsheets Posted on 29-October-2017 12:43 | Category: xlsgen, Excel generator | Tags: generating Excel spreadsheets <-- previous page
|
|