Code Monkey home page Code Monkey logo

xylophone's Introduction

xylophone's People

Contributors

anlug1 avatar curs-jenkins avatar dependabot-preview[bot] avatar inponomarev avatar ioanngolovko avatar vaambival avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

xylophone's Issues

Копирование избыточного числа строк из шаблона

(и, вероятно, лишняя проверка для столбцов)

При использовании библиотеки столкнулся с проблемой копирования лишних строк. Пример данных для теста прилагаю.

Проблема оказалась в POIReportWriter: при вычислении rowFinish берется максимум из значений, которые обозначают разные вещи — номер строки в шаблоне и номер последней строки результата на текущей итерации. И дальше значение интерпретируется как номер строки в шаблоне. В результате с ростом числа строк в формирующемся документе растет число скопированных строк, и может быть скопировано больше, чем нужно.

Из лога изменений не понял, откуда там максимум появился, но тестов на это, видимо, нет, потому что изменение на номер строки в шаблоне:

int rowFinish = range.bottom();

исправило проблему на моем примере и не уронило тесты.

Дальше по коду аналогичный выбор для столбцов, но минимума. Он кажется избыточным, дальше проверка на null есть, так что вероятно достаточно будет (также не влияет на тесты):

int colFinish = range.right();

Кстати, спасибо за библиотеку, пригодилась. :)

Merge in multisheet reports

Merge in multisheet reports is done only on the last sheet.

This applies both to:

  • Cases where merge is done in template
  • Merge is done via | merge[left|up]: "ifequals|yes|no"; syntax

implement <map> tag inside <output>

At the moment, output tag initiates a call to ReportWriter.putSection. This method copies a section of template to result, substituting placeholders inside cells.

We need additional map tag inside output, that should look like this:

<output range="A3:B5">
  <map cell="A4"> <!-- cell address should lie inside the parent's range, 
                            otherwise throw an error during descriptor parsing -->
    foo~{@bar} <!--syntax is as usual in template-->
  </map>
</output>

After normal putSection execution, we should also iterate over all map tags, and set all the values in the appropriate result cells.

The rationale for this is as following:

  • we can move parts of report configuration from binary template to version-controlled text file
  • in the future, we are going to extend <map> functionality with more options, such as dynamically setting foreground/background colours etc.

Add informative error messages for invalid descriptors

As shown in documentation,

  • inside element tag only output or iteration are allowed,
  • inside iteration tag only element tags are allowed.

If we have something like <iteration><iteration> or <element><element>, no informative error is shown to user, but descriptor parsing may fail.

How to apply conditional formatting

Hello!

Is it possible to apply conditional formatting for created Excel document?

I'm tried to add conditional formatting to Excel template, but it did not apply in the output file.
Or is it impossible?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.