excel-rb-appscript 0.0.0 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # Excel rb-appscript
2
+
3
+ This is just an extension on rb-appscript, for Excel.
4
+ Because of the lack of documentation how to use Ruby - Apple Script on Excel, the idea is to have some of most frequently used excel dictionary/actions.
5
+
6
+
7
+ ## Excel Structure
8
+
9
+ ### Excel Module
10
+
11
+ Application
12
+ |-- Workbooks
13
+ |-- Worksheets
14
+
15
+ ### Application
16
+
17
+ Excel::App.open(path_of_file)
18
+ This will start the Excel and open the file
19
+ Return the workbook name which it opened
20
+
21
+ Excel::App.close
22
+ Close the file and shut down Excel
23
+
24
+ Excel::App.workbooks
25
+ Return an array of all the opened workbooks
26
+
27
+ Excel::App.workbook(workbook_name)
28
+ Return the Workbook object
29
+
30
+ ### Workbook
31
+
32
+ Excel::App.workbook("workbook.xls").worksheets
33
+ Return all the worksheets in workbook "workbook.xls"
34
+
35
+ Excel::App.workbook("workbook.xls").worksheet(worksheet_name)
36
+ Return the Worksheet object
37
+
38
+ ### Worksheet
39
+
40
+ Excel::App.workbook("workbook.xls").worksheet("sheet1").get_cell_value(cell_name)
41
+ e.g. cell_name: "A1" will return the value of cell "A1" in "sheet1"
42
+
43
+ Excel::App.workbook("workbook.xls").worksheet("sheet1").set_cell_value(cell_name, "Hello")
44
+ e.g. cell_name: "A1" will update the value of cell "A1" in "sheet1" to "Hello"
Binary file
@@ -11,7 +11,7 @@ Gem::Specification.new do |gem|
11
11
  # gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
12
12
  gem.name = "excel-rb-appscript"
13
13
  gem.require_paths = ["lib"]
14
- gem.version = "0.0.0"
14
+ gem.version = "0.0.1"
15
15
 
16
16
 
17
17
  gem.add_runtime_dependency "rb-appscript"
data/lib/Excel/app.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'appscript'
2
+ require 'excel/workbook'
2
3
 
3
4
  module Excel
4
5
  class App
@@ -1,3 +1,5 @@
1
+ require 'excel/worksheet'
2
+
1
3
  module Excel
2
4
  class WorkBook
3
5
  @app_object = nil
@@ -1,5 +1,4 @@
1
1
  require 'excel/app'
2
- require 'excel/workbook'
3
- require 'excel/worksheet'
2
+
4
3
 
5
4
  include Excel
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: excel-rb-appscript
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -34,7 +34,8 @@ executables: []
34
34
  extensions: []
35
35
  extra_rdoc_files: []
36
36
  files:
37
- - README
37
+ - README.md
38
+ - excel-rb-appscript-0.0.0.gem
38
39
  - excel-rb-appscript.gemspec
39
40
  - lib/Excel/app.rb
40
41
  - lib/Excel/workbook.rb
data/README DELETED
File without changes