The excel file does not show changes when writing through ruby script using rubyXL

199 Views Asked by At

require "uri"
require "net/http"
require 'HTTParty' 
require 'Nokogiri'
require 'faker'
require 'watir-webdriver'
require 'rubyXL'

@workbook = RubyXL::Parser.parse("02.xlsx")
@worksheet = @workbook[0]
@worksheet.change_row_fill(0, 'FFFF00')
@workbook.write('02.xlsx')

This is my ruby script in which i am highlighting the first row. The problem is that the row is not highlighted when the file is already opened. But when i close the file and open it again the changes are there. Is there workaround to make the changes happen in real time when the file is already opened.

0

There are 0 best solutions below