<commit_before># example 1: open a book, print the cells, rows, and columns of a sheet
require "fileutils"

require File.join(File.dirname(__FILE__), '../lib/robust_excel_ole')

include RobustExcelOle

ExcelApp.close_all
begin
  simple_file = '../spec/data/simple.xls'
  simple_save_file = '../spec/data/simple_save.xls'
  File.delete @simple_save_file rescue nil
  FileUtils.copy simple_file, simple_save_file
  book = Book.open(simple_save_file)
  sheet = book[0]
  cell = sheet[0,0]
  i = 0
  sheet.each do |cell|
  	i = i + 1
  	puts "#{i}. cell: #{cell.value}"
  end
  i = 0
  sheet.each_row do |row|
  	i = i + 1
  	puts "#{i}. row: #{row.value}"
  end
  i = 0
  sheet.each_column do |column|
  i = i + 1
  	puts "#{i}. column: #{column.value}"
  end
  sheet[0,0] = "complex"
  book.save
  book.close
ensure
  ExcelApp.close_all
end
<commit_msg>examples: tried with spec_helper<commit_after># example 1: open a book, print the cells, rows, and columns of a sheet

require File.join(File.dirname(__FILE__), '../lib/robust_excel_ole')

#require File.join(File.dirname(__FILE__), '../spec/spec_helper')

require "fileutils"

include RobustExcelOle

ExcelApp.close_all
begin
  dir = create_tmpdir
  simple_file = dir + '/simple.xls'
  simple_save_file = dir + '/simple_save.xls'
  File.delete simple_save_file rescue nil
  book = Book.open(simple_file)
  sheet = book[0]
  cell = sheet[0,0]
  i = 0
  sheet.each do |cell|
  	i = i + 1
  	puts "#{i}. cell: #{cell.value}"
  end
  i = 0
  sheet.each_row do |row|
  	i = i + 1
  	puts "#{i}. row: #{row.value}"
  end
  i = 0
  sheet.each_column do |column|
  i = i + 1
  	puts "#{i}. column: #{column.value}"
  end
  sheet[0,0] = "complex"
  book.save
  book.close
ensure
  ExcelApp.close_all


end

  
{'fraction_non_alphanumeric': 0.13763563677898344, 'fraction_numerical': 0.013706453455168474, 'mean_word_length': 3.3046683046683047, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1736480', 'n_tokens_mistral': 707, 'n_tokens_neox': 683, 'n_words': 181}