32

I have an Excel file that I want to use in my application. Using jexcel I read and write an Excel file in the application, but I don't know how to set up the view for that file in my application. Are there any spreadsheet widgets available for Android to show an Excel file?

Thomas Dignan
  • 7,052
  • 3
  • 40
  • 48
Sreedev
  • 6,563
  • 5
  • 43
  • 66
  • 2
    I think the search term you want is "spreadsheet widget". Google doesn't show any on a quick search, but it should be pretty simple to build one yourself using `TableLayout`. – perelman Feb 13 '12 at 05:06
  • 1
    It is not problem only if spread sheet is small. It mean for example 10x10. If it is too big can be problem with memory and speed. Then is necessary to build special component which will be render only visible part of grid, like ListView does. If I found some open source component that can do this I will be very happy because I need it for my next project :-( – ATom Mar 04 '12 at 16:03
  • 5
    https://github.com/dennis-sheil/android-spreadsheet – Dennis Sheil Mar 22 '12 at 21:25
  • look for google docs have no exp of using it but have seen it used for many types of documents.or if offline you can use proper intents to open excel file,if there are apps that can open this file user will be given option to select from them. – Its not blank Apr 15 '12 at 09:31

3 Answers3

1

Why not use a TableLayout widget and programatically fill in the rows and columns while looping through the excel data? TableLayout supports rows and columns.

Usage example: http://developer.android.com/resources/tutorials/views/hello-tablelayout.html

aggregate1166877
  • 2,196
  • 23
  • 38
  • It's a good workaround, I don't think a library like this exists because you already have your Excel Data and you want to show it. So this workaround is pretty simple to implement, because excel files are just 2D arrays, so include your TableLayout in a Layout within a ScrollView H+V, and your array will fit. You can also split your arrays each XX lines or each XX columns, with a navbar. Try it, I think it will be the most efficient solution. – Bourbon May 29 '12 at 21:10
1

I think it'd be best to just use a GridView. Make a custom Adapter which fills a textview from the cell content, tie that to a GridView and there you go.

Divide
  • 540
  • 5
  • 12
0

The best next thing to writing your own from the ground up:

If android-spreadsheet hasn't helped enough,

the work done with Calligra on Android is the furthest along.

or waiting to see if the LibreOffice Android port will be of any help.

Calligra will at least be some assistance to the problem.

I'd also add, the suggestion @Vincent offered in the comments isn't too terrible. Most phones/tablets come with a stock Office Suite for viewing (not editing) purposes. I understandably see the pitfalls in that solution though, but it would be much easier, albeit lazier.

TryTryAgain
  • 7,632
  • 11
  • 46
  • 82