从excel文件中的数据创建图表 [英] Create Graph from data in an excel file

查看:101
本文介绍了从excel文件中的数据创建图表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从excel文件(.xls或.xlsx)中提取数据,并根据数据显示图表/图表。所显示的图形/图表应该具有过滤器/机制,该过滤器/机制基于来自那里的选择来改变图形/图表,类似于在Excel中的自动过滤器。 excel文件可能有6列以上的数据。



我如何继续?我是Java新手。请帮助。

解决方案



你的第一步是更熟悉Java本身,因为在你做其他事情之前你需要这个基础。首先访问 Java教程并了解一些基础知识。



掌握了Java的基础知识并了解GUI开发之后,就可以继续阅读Excel文件中的数据。我推荐作为从Excel读取数据的好工具。



您的下一步当然是了解Java中的图形和绘图,在这里您可能会发现诸如 JFreeChart 非常有帮助。

所有这些在Java中都是可行和可行的,这取决于您的承诺水平,以及您是否想投入一些时间开发这个解决方案。

或者,如果您不想编写自己的系统,为什么不使用 LibreOffice 或Microsoft Excel都可以打开文档,提取数据和创建图表,并将提供强大的工具,就像您想要的一样。

I need to pull data from an excel file (.xls or .xlsx) and display a graph/chart based on the data. The graph/chart displayed should have filters/mechanism which changes the graph/chart based on the selection from there, similar to Auto-filter in excel. The excel file may have more than 6 columns of data.

How do I proceed? I am new to Java. Please help.

解决方案

This is a complicated question with an equally complicated answer.

Your first steps would be to become more familiar with Java itself, as you will need this foundation before you do anything else. Visit The Java Tutorials first and learn some of the basics.

Once you've mastered the basics of Java, and understand GUI development, you can move forward to reading data from an Excel file. I recommend Apache POI as a great tool to read data from Excel.

Your next step is of course to learn about graphs and plotting in Java, here you might find something like JFreeChart of great help.

All of this is possible and doable in Java, it really depends on your level of commitment and whether you wish to invest some time into developing this solution.

Alternatively, if you are NOT inclined to write your own system, why not make use of LibreOffice or Microsoft Excel as both can open the documents, extract data and create charts and will provide powerful tools just like you want.

这篇关于从excel文件中的数据创建图表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆