Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Spreadsheet::ParseExcel
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Hannes Wyss  
View profile  
(3 users)  More options Feb 7 2006, 3:29 am
Newsgroups: comp.lang.ruby
From: Hannes Wyss <hannes.w...@gmail.com>
Date: Tue, 7 Feb 2006 17:29:11 +0900
Local: Tues, Feb 7 2006 3:29 am
Subject: [ANN] Spreadsheet::ParseExcel
Spreadsheet::ParseExcel - Get information from an Excel file.
============
Version: 0.3.2
Date: 2005-12-15

Short Description:
Spreadsheet::ParseExcel allows you to get information out of a simple Excel file
This Package is an - as of today incomplete - translation of Kawai
Takanoris Perl-Module.

Requirements
------------

  * ruby 1.8

Install
-------

  De-Compress archive and enter its top directory.
  Then type:

    $ ruby setup.rb config
    $ ruby setup.rb setup
   ($ su)
    # ruby setup.rb install

  You can also install files into your favorite directory
  by supplying setup.rb some options. Try "ruby setup.rb --help".

Usage
-----
        workbook = Spreadsheet::ParseExcel.parse(path_to_file)
        worksheet = workbook.worksheet(0)
        worksheet.each(1) { |row|
                puts row.at(0)
        }

License
-------

        LGPL

URL: http://download.ywesee.com/parseexcel
Author: Hannes Wyss <hw...@ywesee.com>

Enjoy, and thanks for your feedback!
Hannes


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James H.  
View profile  
(1 user)  More options Feb 7 2006, 9:04 am
Newsgroups: comp.lang.ruby
From: "James H." <james.herd...@gmail.com>
Date: 7 Feb 2006 06:04:12 -0800
Local: Tues, Feb 7 2006 9:04 am
Subject: Re: Spreadsheet::ParseExcel
Excellent!  I'll definitely be using this in the near future.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Anu Sebastian  
View profile  
 More options Aug 4, 4:50 am
Newsgroups: comp.lang.ruby
From: Anu Sebastian <a...@maxxion.com>
Date: Tue, 4 Aug 2009 03:50:56 -0500
Local: Tues, Aug 4 2009 4:50 am
Subject: Re: Spreadsheet::ParseExcel
Hi,

I am using ruby ruby 1.8.6 and spreadsheet (0.6.4).
I am trying to oarse an excel file.
My code is like :

    require 'rubygems'
    require 'spreadsheet'
    require 'parseexcel'
    equire 'parseexcel/parseexcel'
    require 'parseexcel/parser'

      workbook =
Spreadsheet::ParseExcel.parse("public/downloads/commissions/google/test.xls ")
      worksheet = workbook.worksheet(0)

        worksheet.each { |row|
                puts row.at(0).to_s

        }

But it prints 'nil'. I have data in my excel file.

Could you please help me?

Thanks,
Anu

--
Posted via http://www.ruby-forum.com/.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Norman Smith  
View profile  
 More options Aug 4, 8:15 am
Newsgroups: comp.lang.ruby
From: Norman Smith <smit...@saic.com>
Date: Tue, 4 Aug 2009 07:15:36 -0500
Local: Tues, Aug 4 2009 8:15 am
Subject: Re: Spreadsheet::ParseExcel

nil usually means empty rows. Also each row is an array of cells. You
could use inspect instead of to_s to see what's really there. This is
how I get data from a spreadsheet:

  ws.each { |row|
      if row != nil
            #
            # cycle over each cell in this row if it's not an empty row
            #
        row.each { |cell|
          if cell != nil
            contents = cell.to_s('latin1')
            puts("Cell Contents: #{contents}\n")
          end
        }
      end
  }

--
Posted via http://www.ruby-forum.com/.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Anu Sebastian  
View profile  
 More options Aug 4, 8:42 am
Newsgroups: comp.lang.ruby
From: Anu Sebastian <a...@maxxion.com>
Date: Tue, 4 Aug 2009 07:42:53 -0500
Local: Tues, Aug 4 2009 8:42 am
Subject: Re: Spreadsheet::ParseExcel
Hi,

Thanks for the response.
My excel file has data in it. When i give row.inspect i get the
following :
#<Spreadsheet::Excel::Row:0xffffffdbd3f67a
@worksheet=#<Spreadsheet::Excel::Worksheet:0xb70d75fc> @height=
@hidden=false @default_format= @outline_level=0 @formats= @idx=0 []>

But it doesn't print anything inside the loop
Any idea?

Thanks,
Anu

--
Posted via http://www.ruby-forum.com/.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google