Reputation: 1
I am trying to convert a script from VBA to Javascript and I need help. The purpose is to move a spreadsheet into GDocs. First of all here's what the VBA script does along with its code.
Dim lngN As Long
Dim lngCol As Long
Cells.Unmerge
With ActiveSheet.UsedRange
On Error Resume Next
Range("A8:A100").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
On Error GoTo 0
Dim toDel(), i As Long
Dim RNG As Range, Cell As Long
Set RNG = Range("A9:J100")
RNG.RemoveDuplicates Columns:=9
Dim rLastRow As Range
Set rLastRow = Cells(Rows.Count, "A").End(xlUp)
'now delete last 10 rows:
rLastRow.Offset(0).Resize(2).EntireRow.Delete
Set sourceSheet = Worksheets("BMS Input")
sourceSheet.Activate
sourceSheet.Cells.Select
Selection.Copy
Set destSheet = Worksheets("BMS Data")
destSheet.Activate
destSheet.Cells.Select
destSheet.Paste
Sheets("BMS Input").Visible = False
MsgBox ("Data Input Successful")
MsgBox ("Please allow form data to update. This process may take up to 1 minute.")
ActiveWorkbook.RefreshAll
End With
End Sub
It does the following functions.
Is there anyone that can give some guidance as to changes I can/should make in this code to make it work in javascript.
-Thanks in Advance J
Upvotes: 0
Views: 2648
Reputation: 11
I perceive based on the type of methods and classes you are using in your code, you are a Die hard kind of code developer.
So, being in the same category as you, here is a good resource to help you succeed with your code.
This goes to a deeper level of code writing but, I feel like you can handle it.
It is about using Json, ( Java Script Object Notation), formalism along with the powerful cJObject parsing class. Just take a look by yourself.
The documentation and code examples are very thorough.
http://ramblings.mcpher.com/Home/excelquirks/json
If you need the actual book from where most of this reference came from, go here: http://curomediares.com/link/going-gas-free-download-ebook-pdf
Cheers...
Upvotes: 1
Reputation: 1269
Two things you will need to answer this question:
Upvotes: 1