Coder Social home page Coder Social logo

generatehtmltable's Introduction

#Generate HTML Tables Generate a beautiful HTML tables to show any tabular data, like this:

HTML Table generated

  • Generated CSSs is inline, to be compatible with the major email clients.
  • The cells of the HTML Table can also contains HTML code.
  • The first row of the matrix represents the header of the HTML Table.

##How to use Create a matrix representing your data. As said before, the matrix also can have HTML as content. Here's an example:

class Main{
    public static void main(String[] args) {
        String[][] matrix = new String[4][3];
        matrix[0][0] = "Country";
        matrix[0][1] = "Language";
        matrix[0][2] = "Currency";

        matrix[1][0] = "Brazil";
        matrix[1][1] = "Portuguese";
        matrix[1][2] = "Real";

        matrix[2][0] = "Germany";
        matrix[2][1] = "Deutsch";
        matrix[2][2] = "Euro";

        matrix[3][0] = "United States of America";
        matrix[3][1] = "English";
        matrix[3][2] = "Dollar";

        String html = new TableGeneratorImpl().generateHtmlTable(matrix).toString();
        
        System.out.println(html);
    }
}

generatehtmltable's People

Contributors

edpichler avatar

Watchers

 avatar

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.