Parseexcel

Hi all,

I can use parseexcel to open excel file and process the data within
excel. 1)But I am not sure how to write the processed data back to excel
using parseexcel. What is the syntax for this? 2) How to select a range
of cells, for example, row1,column 1 to row 3,column 10 instead of
whole columns or whole rows.

Thank you in advance,

Li

Hi Li

On 12/18/06, Li Chen [email protected] wrote:

1)But I am not sure how to write the processed data back to excel
using parseexcel. What is the syntax for this?
ParseExcel does not write Excel files. For that you will have to use
the SpreadSheet::Excel library developed by Daniel B… I plan to
merge the two libraries in the future, but that will have to wait
until late 2007.

Both libraries are available here, or via gem install:
http://rubyforge.org/frs/?group_id=678

  1. How to select a range
    of cells, for example, row1,column 1 to row 3,column 10 instead of
    whole columns or whole rows.
    There are no methods that do directly what you want - you’ll have to
    do something like:
    1.upto(3) do |row|
    1.upto(10) do |col|
    puts worksheet.cell(row, col)
    end
    end

hth

Hannes

Hannes W. wrote:

  1. How to select a range
    of cells, for example, row1,column 1 to row 3,column 10 instead of
    whole columns or whole rows.
    There are no methods that do directly what you want - you’ll have to
    do something like:
    1.upto(3) do |row|
    1.upto(10) do |col|
    puts worksheet.cell(row, col)
    end
    end

Thanks. I’ll give them a try tonight to see if they work.

Li

Hannes W. wrote:

  1. How to select a range
    of cells, for example, row1,column 1 to row 3,column 10 instead of
    whole columns or whole rows.
    There are no methods that do directly what you want - you’ll have to
    do something like:
    1.upto(3) do |row|
    1.upto(10) do |col|
    puts worksheet.cell(row, col)
    end
    end

Hi Hannes,

Do you know what the advantages of using parseexcel are , compared to
export data from excel into text file, parse them,then import them back
into excel using spreadsheetexcel?

Thanks,

Li

Li

On 12/19/06, Li Chen [email protected] wrote:

Do you know what the advantages of using parseexcel are , compared to
export data from excel into text file, parse them,then import them back
into excel using spreadsheetexcel?

I probably would not call them advantages, but circumstances:

  • if you cannot choose your input format, and thus would have to
    perform that export to text (csv?) manually, use parseexcel.
  • parseexcel can give you information on the data contained in a cell
    (Cell#type returns :date, :numeric or :text) - if you need that
    information, use parseexcel.

hth

Hannes

Hannes W. wrote:

Li

On 12/19/06, Li Chen [email protected] wrote:

Do you know what the advantages of using parseexcel are , compared to
export data from excel into text file, parse them,then import them back
into excel using spreadsheetexcel?

I probably would not call them advantages, but circumstances:

  • if you cannot choose your input format, and thus would have to
    perform that export to text (csv?) manually, use parseexcel.
  • parseexcel can give you information on the data contained in a cell
    (Cell#type returns :date, :numeric or :text) - if you need that
    information, use parseexcel.

hth

Hannes

Can anyone Help me, how do I use excel file for data driven
testing in Selenium Remote Control. Basically My problem is, we have
100 records,how can i fetch Username & password field to execute my
application with every User

On Apr 16, 1:13 am, Andy PS [email protected] wrote:

Can anyone Help me, how do I use excel file for data driven
testing in Selenium Remote Control. Basically My problem is, we have
100 records,how can i fetch Username & password field to execute my
application with every User


Posted viahttp://www.ruby-forum.com/.

Andy-

I know nothing about Selenium. If, however, you are on a Windows
machine with Excel installed, you could use win32ole to automate
Excel. If you think that has potential, you’ll find more info here:

David