Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
TODO: Description
Add this line to your application's Gemfile:
gem 'ooxml_excel'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ooxml_excel
OOXML::Excel
to read spreadsheet:ooxml_excel = OOXML::Excel.new('example.xlsx')
ooxml_excel.sheets # ['Test Sheet 1', 'Test Sheet 2']
sheet = ooxml_excel.sheet('Test Sheet 1')
# Rows
sheet[0] # Access the first row
sheet.rows[0] # Same as above
# Cells
sheet[0].cells # Fetch all cells
sheet.rows[0].cells # longer way to do it
sheet[0][0] # Access the first cell of the row
sheet.rows[0].cells[0] # longer way to do it
sheet[0][0].value # Access cell value
sheet.rows[0].cells[0].value # longer way to do it
ooxml_excel['Test Sheet 1'][0][0].value
# as an array of strings
ooxml_excel.sheet('Test Sheet 1').each_row do |row|
# Do something here...
p row # ['text', 'text']
end
# as an array of objects
ooxml_excel.sheet('Test Sheet 1').each_row_as_object do |row|
# Do something here...
p row.cells # [OOXML::Excel::Row::Cell, ...]
end
# Fetch all columns
ooxml_excel.sheet('Test Sheet 1').columns
# Checking if the column is hidden
ooxml_excel.sheet('Test Sheet 1').column(1).hidden? # column index
ooxml_excel.sheet('Test Sheet 1').column('A').hidden? # column letter
# Font
font_object = ooxml_excel.sheet('Test Sheet 1').font('A1')
font_object.bold? # false
font_object.name # Arial
font_object.rgb_color # FFE10000
font_object.size # 8
# Cell Fill
fill_object = ooxml_excel.sheet('Test Sheet 1').fill('A1')
fill_object.bg_color # FFE10000
fill_object.fg_color # FFE10000
# named range
ooxml_excel.named_range('my_named_range') # ['value' 'from', 'range']
# cell range
ooxml['Lists'!$A$1:$A$6] # ['1','2','3','4','5','6']
# or
ooxml['Lists'!A1:A6] # ['1','2','3','4','5','6']
# or loading a single value
ooxml['Lists'!A1] # ['1']
# or loading a box type values
ooxml['Lists!A1:B2'] # [['1', '2'], ['2','3']]
# All Validations
data_validations = ooxml_excel.sheet('Test Sheet 1').data_validations
# Specific validation for cell
data_validation = ooxml.sheet('Input Sheet').data_validation('D4')
data_validation.prompt # "Sample Validation Message"
data_validation.formula # 20
data_validation.type #textLength
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/halcjames/ooxml_excel.
FAQs
Unknown package
We found that ooxml_excel demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.